Strong TLS certificates with acme.sh
384-bit of https
Disclaimer
I’m, in absolutely no regards, a security expert. I just fancy shiny new things of the interwebs.
This is why I’ve switched my default TLS certificates to use elliptic curve cryptography (ECC) instead of RSA. Now I have a sweet 100/100 on tls.imirhil.fr
You can learn (far) more by reading this topic and its linked resources.
Requirements
Installing acme.sh
For automation and ease of use purposes, I’m using acme.sh
Changing default authority
By default, acme.sh uses ZeroSSL to sign certificates. We need to change this to Let’s Encrypt because according to acme.sh, they’re the only ones offering ECC capabilities.
Using your DNS api
If available, the easiest way to issue a certificate is to use the DNS api of your DNS provider. acme.sh supports a lot of DNS providers.
Define an api key
Follow the docs for your DNS provider, usually:
Issue the cert
Using standalone mode
If you don’t have access to the DNS provider, we can use the standalone mode to spin up a temporary web server that will handle all the verifications.
Port 80
must be free.
Examples
Multi domains standalone
Wildcard domain DNS
Next steps
The ECC certificate alone will not grant you a high/perfect score.
TLS version
Limit TLS version to 1.2 and 1.3 (or just 1.3 as there is only a 5% compatibility gap with 1.2).
HSTS
Use the strict transport security header.
Cipher suite
Use recent and strong ciphers. This is where my knowledge hits its limit… I’m having a really hard time understanding what to use and why.
I’ve based my initial choices of ciphers on this list, cross referencing it with (older?) browser compatibility.
I then asked Aeris, the creator of tls.imirhil.fr, about it and he advised me to use the following:
In order to achieve a perfect score, we can be a little more restrictive with: