Cipher Suites in OpenSSL 3 for TLSv1.3
Guide to configuring secure Cipher Suites for OpenSSL 3.x to ensure strong AEAD encryption and modern TLS 1.3 and TLS 1.2 compatibility.
TLS 1.3 Ciphers
In TLS 1.3, cipher suites are streamlined and use only AEAD algorithms. You normally do not need to restrict them manually, but if you configure them explicitly:
TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256
TLS_AES_128_GCM_SHA256
TLS 1.2 Ciphers (Compatibility)
For TLS 1.2, carefully select AEAD cipher suites to exclude weak algorithms (such as CBC, RC4, 3DES, and SHA-1).
Recommended String (Mozilla Intermediate — ECDHE AEAD):
ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
Breakdown of a Strong Cipher
Example: ECDHE-RSA-AES256-GCM-SHA384
- ECDHE: Key Exchange (Elliptic Curve Diffie-Hellman Ephemeral) — Provides Perfect Forward Secrecy.
- RSA: Authentication (Certificate key type).
- AES256: Symmetric Encryption Algorithm (256-bit AES).
- GCM: Mode of Operation (Galois/Counter Mode) — Authenticated encryption with associated data (AEAD).
- SHA384: Hash function used for key derivation / PRF.
Configuration Examples
Apache
Edit /etc/apache2/mods-enabled/ssl.conf:
SSLEngine on
SSLProtocol -all +TLSv1.2 +TLSv1.3
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305
SSLCipherSuite TLSv1.3 TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
SSLHonorCipherOrder off
SSLSessionTickets off
Nginx
Edit /etc/nginx/nginx.conf or your virtual host config:
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers off;
ssl_session_tickets off;
Testing Your Configuration
After applying changes and reloading your web server, verify both TLS 1.3 and TLS 1.2 behavior:
-
Test TLS 1.3 and TLS 1.2 via
openssl:# Verify TLS 1.3 negotiation openssl s_client -connect yourdomain.com:443 -tls1_3 # Verify strong TLS 1.2 AEAD cipher support openssl s_client -connect yourdomain.com:443 -tls1_2 -cipher "ECDHE-RSA-AES256-GCM-SHA384" -
Scan your website with CheckTLS.nl (www.checktls.nl) and Qualys SSL Labs (www.ssllabs.com/ssltest/):
- Aim for green protocol/cipher results on CheckTLS.nl and an "A+" rating on SSL Labs.