TLS Cipher Suites – Choosing Secure Configurations

TLS Cipher Suites – Choosing Secure Configurations

Most TLS problems that show up in audits are not about certificates – they come from TLS cipher suites that were left enabled years ago and never revisited. When a scan flags “weak ciphers supported” on a server that has a valid certificate and an A-grade padlock in the browser, the cause is usually the cipher configuration. This article covers how to pick secure TLS cipher suites, which ones to remove, how to test the result, and when the standard advice needs adjusting.

What a Cipher Suite Actually Decides

A cipher suite is the set of algorithms a client and server agree on during the handshake. In TLS 1.2 it covers four things: key exchange, authentication, bulk encryption and the MAC or hash. A suite name like TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 lists them in order: ephemeral elliptic-curve Diffie-Hellman for key exchange, an RSA certificate for authentication, AES-128 in GCM mode for encryption, and SHA-256 for the PRF.

TLS 1.3 made this much simpler. It has five defined suites, three of which matter in practice: TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384 and TLS_CHACHA20_POLY1305_SHA256. Key exchange is always ephemeral, and RSA key transport, CBC mode and static Diffie-Hellman are gone. **Most of the misconfiguration risk now sits in the TLS 1.2 list.**

Certificate validity is a separate layer of the TLS stack, and the guide to SSL/TLS certificate validation covers it in detail. A perfect certificate does nothing to stop a client from negotiating 3DES if the server still offers it.

A Secure TLS Cipher Suites Baseline for 2026

An experienced auditor starts from the Mozilla SSL Configuration Generator’s “Intermediate” profile and works backwards from there. It supports almost every client released in the last eight to ten years. The profile allows TLS 1.2 and 1.3 only. For TLS 1.2 it allows only ECDHE or DHE key exchange with AES-GCM or ChaCha20-Poly1305.

A sensible TLS 1.2 list for nginx or Apache with OpenSSL 3.x looks like this:

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

Each of these suites gives you forward secrecy and authenticated encryption. Anything outside this set should only be enabled for a documented reason. Every suite you add needs that justification: as of 2026, a TLS 1.2 suite without ECDHE or without AEAD is almost always kept for a single legacy client.

The step-by-step process looks like this:

1. Inventory: run testssl.sh or nmap –script ssl-enum-ciphers against every public hostname, including API and mail endpoints, not just www.
2. Disable protocols: turn off SSLv3, TLS 1.0 and TLS 1.1. RFC 8996 formally deprecated the last two in March 2021.
3. Replace the TLS 1.2 list with the AEAD-only list above and remove RC4, 3DES, NULL, EXPORT, anonymous suites and static RSA key exchange.
4. Check TLS 1.3 separately: in nginx, ssl_ciphers does not control TLS 1.3 suites. Those are set through ssl_conf_command Ciphersuites (nginx 1.19.4 and later) or left at OpenSSL defaults, which are already fine.
5. Watch for 7-14 days: check access logs and the $ssl_protocol / $ssl_cipher variables for clients that fail or fall back before you call the change finished.

Why Static RSA and CBC Got Removed

Suites using RSA key transport, such as TLS_RSA_WITH_AES_128_GCM_SHA256, encrypt the session key with the server’s long-term private key. If that key leaks later, all recorded traffic can be decrypted after the fact. The ROBOT attack, published in 2017, also showed that many implementations still had Bleichenbacher-style padding oracles nearly 20 years after the original paper.

CBC suites in TLS 1.2 are not instantly exploitable, but they have produced a long run of padding-oracle and timing bugs, from Lucky Thirteen in 2013 to vendor-specific flaws found years later. 3DES is a clearer case: Sweet32 (CVE-2016-2183) showed that its 64-bit block size allows practical plaintext recovery on long-lived connections.

The AES-256 Myth

A common belief is that AES-256 should be ordered first because “256 is stronger than 128.” In practice, AES-128-GCM is not the weak point of any realistic threat model. The certificate key, the key exchange and the implementation quality matter far more. Forcing AES-256 first adds CPU cost on busy servers and gains nothing measurable.

ChaCha20-Poly1305 is not a downgrade either. On mobile CPUs without AES hardware acceleration it is faster, and its security is equivalent. For the same reason, Mozilla’s Intermediate profile sets ssl_prefer_server_ciphers off: modern clients choose well on their own, and letting them pick ChaCha20 on ARM devices helps battery life.

Common Mistakes in Cipher Configuration

The most frequent mistake is fixing the origin server and forgetting the edge. Once TLS terminates at Cloudflare, an AWS Application Load Balancer or Azure Front Door, the origin’s nginx config does not affect public clients at all. On an ALB, the security policy decides what clients are offered, for example ELBSecurityPolicy-TLS13-1-2-2021-06. Teams often harden nginx carefully while the load balancer still runs a 2016-era policy that allows TLS 1.0.

The second mistake is copying a cipher string from a 2015 blog post. Strings like HIGH:!aNULL:!MD5 look restrictive, but depending on the OpenSSL version they still expand to CBC and static RSA suites. Always check what a string actually expands to with openssl ciphers -v ‘STRING’ instead of trusting the keywords.

The third is testing only port 443 on the main domain. SMTP with STARTTLS on port 587, IMAPS on 993, admin panels on 8443 and old API subdomains often run different TLS stacks. A typical audit scenario: the main site scores A+ on Qualys SSL Labs, but a forgotten api-v1 hostname on an older appliance still accepts TLS 1.0 with 3DES. That hostname is what the compliance assessor flags.

When the Standard Advice Does Not Fit

Some environments cannot use the Intermediate profile as it stands. Payment terminals, older embedded devices and industrial controllers sometimes support only TLS 1.2 with CBC suites. In that case, put those clients on a dedicated hostname or listener with the legacy list, and keep the main site strict.

FIPS 140-3 environments, which are common in US federal work and some healthcare settings, have to exclude ChaCha20-Poly1305 because it is not a FIPS-approved algorithm. Those deployments should rely on AES-GCM only. For PCI DSS scope, early TLS had to be disabled by June 30, 2018, and an assessor will expect evidence that it stays disabled, as described in the PCI DSS basics.

Small teams of under 10 people with a single managed host often get the best result by using the hosting provider’s or CDN’s minimum-TLS setting and not hand-tuning ciphers at all. A hand-maintained list nobody reviews for five years is worse than a well-maintained provider default.

FAQ

Should I disable TLS 1.2 and run TLS 1.3 only?
For public websites, not yet. Some enterprise proxies, older Android versions and backend integrations still need TLS 1.2. A TLS 1.2 configuration limited to AEAD suites is secure, and TLS 1.3-only setups work well for internal services where you control every client.

Does cipher order still matter?
It matters much less than it used to. If every enabled suite is strong, letting the client choose is fine. Order only matters if you keep a legacy suite and need to make sure modern clients never negotiate it.

How often should cipher configuration be reviewed?
Review it at least once a year, and again after any OpenSSL major upgrade, load balancer policy change or CDN migration. Automated daily checks catch drift that happens between those reviews, such as a new subdomain deployed with default settings.

Final Practical Tip

Treat TLS cipher suites as configuration that drifts over time, not something you set once. Use TLS 1.2 and 1.3 only, keep TLS 1.2 to ECDHE with AES-GCM or ChaCha20, test every hostname and port rather than just the homepage, and check the edge before the origin. Once ciphers are in order, add HSTS so that no client is ever downgraded to plain HTTP. Understanding HTTP Strict Transport Security covers that step.