Security
SecurityAdvanced

Post-Quantum Encryption in Practice: ML-KEM, TLS 1.3, and Why Origins Lag Behind Browsers

Around 70% of browser traffic to Cloudflare already negotiates hybrid post-quantum key exchange (X25519MLKEM768), yet origin support trails at roughly 28.7%. How NIST FIPS 203, 204, and 205 work, why a 1,216-byte key share trips legacy middleboxes, and how to test and enable ML-KEM on Nginx and OpenSSL 3.5.

Cover image: Post-Quantum Encryption in Practice: ML-KEM, TLS 1.3, and Why Origins Lag Behind Browsers
Contents

Every major browser already speaks post-quantum TLS by default. According to Cloudflare Radar, roughly 70% of human HTTPS traffic hitting Cloudflare’s edge now negotiates hybrid post-quantum key exchange, up from under 3% at the start of 2024. Yet origin server support across the wider web lags far behind—hovering around 28.7% on Cloudflare’s origin readiness tracking.

That gap explains why post-quantum encryption is no longer an academic topic for cryptographers. The client side moved first via Chrome 131+, Edge 131+, and Firefox 132+. Now platform, security, and SRE teams are left dealing with the practical consequences: older OpenSSL builds on Linux origins, 1,216-byte key shares that split ClientHello across two TCP packets, and legacy corporate DPI boxes that choke on the handshake.

Post-quantum encryption cover: classical X25519 reinforced by an ML-KEM lattice prism in TLS 1.3

What Post-Quantum Cryptography Actually Protects Against

A common misconception is that quantum computers break all encryption equally. They do not. The threat splits cleanly between asymmetric (public-key) cryptography and symmetric cryptography:

  • Asymmetric key exchange and signatures (broken by Shor’s algorithm): RSA, Diffie-Hellman, ECDH (X25519, P-256), ECDSA, and Ed25519 rely on integer factorization or discrete logarithms. A sufficiently large fault-tolerant quantum computer running Peter Shor’s algorithm breaks them in polynomial time.
  • Symmetric encryption and hashes (resilient): AES-256, ChaCha20-Poly1305, SHA-256, and SHA-3 are only affected by Grover’s algorithm, which gives at most a quadratic speedup—roughly halving effective bit strength. AES-256 still provides ~128 bits of quantum security and does not need to be replaced.

That distinction drives the entire migration order. Symmetric data encryption at rest is already fine if you use AES-256. The immediate exposure is key exchange on the wire, because of Harvest Now, Decrypt Later (HNDL): an adversary can passively record encrypted TLS sessions today, store them cheaply, and decrypt them years later once cryptanalytically relevant quantum hardware exists.

Key exchange is urgent today because recorded traffic can be decrypted retroactively. Certificate signatures only need to resist forgery at the moment of verification, so key exchange (ML-KEM) ships years before post-quantum PKI (ML-DSA).

The NIST Post-Quantum Standards (FIPS 203, 204, 205)

In August 2024, NIST finalized its first three post-quantum cryptography standards. Unlike classical ECC keys that fit in 32–64 bytes, lattice and hash-based primitives trade compact keys for quantum resistance:

The NIST Post-Quantum Standards (FIPS 203, 204, 205)
Standard Derived From Purpose Default Variant Public Key Private Key Ciphertext / Signature
Classical X25519 Curve25519 Key exchange X25519 32 B 32 B 32 B (share)
FIPS 203 (ML-KEM) CRYSTALS-Kyber Key exchange (KEM) ML-KEM-768 1,184 B 2,400 B 1,088 B
Classical Ed25519 Curve25519 Digital signature Ed25519 32 B 32 B 64 B
FIPS 204 (ML-DSA) CRYSTALS-Dilithium Digital signature ML-DSA-65 1,952 B 4,032 B 3,309 B
FIPS 205 (SLH-DSA) SPHINCS+ Stateless hash signature SLH-DSA-128s 32 B 64 B 7,856 B
FIPS 205 (SLH-DSA) SPHINCS+ Fast hash signature SLH-DSA-128f 32 B 64 B 17,088 B

Notice the shared secret in ML-KEM is always 32 bytes regardless of parameter set (ML-KEM-512, 768, or 1024), so symmetric session keys downstream (AES-256-GCM or ChaCha20-Poly1305) stay identical. For signatures, ML-DSA-65 (FIPS 204) jumps from 64 bytes to 3,309 bytes, while SLH-DSA (FIPS 205) scales up to 7,856–49,856 bytes depending on whether you pick small (s) or fast (f) variants—which is why full post-quantum certificate chains take longer to roll out without bloating TLS handshakes.

NIST post-quantum cryptography byte sizes: ML-KEM, ML-DSA, and SLH-DSA compared against classical X25519 and Ed25519
Post-quantum key exchange adds roughly 1.1 KB, whereas hash-based signatures jump by two orders of magnitude.

Hybrid X25519MLKEM768: Why Both Algorithms Run Together

Instead of switching straight to pure ML-KEM-768, TLS 1.3 deployments use a hybrid key exchange standardized as X25519MLKEM768 (IANA group codepoint 0x11EC).

During the TLS 1.3 handshake, the client sends both key shares concatenated into one key_share extension:

  • 32 bytes for classical X25519
  • 1,184 bytes for ML-KEM-768 encapsulation key
  • 1,216 bytes total

Both shared secrets are fed into the TLS 1.3 key schedule. An attacker must break both elliptic-curve Diffie-Hellman and module-lattice learning-with-errors to recover the traffic keys. Even if future cryptanalysis weakens ML-KEM, the connection remains as strong as classical X25519. For a refresher on how TLS and mutual TLS handshakes bind identity and session keys, see mTLS vs TLS Explained.

The Hidden Network Trap: ClientHello Size, MTU, and Middleboxes

Expanding the key_share from 32 bytes to 1,216 bytes changes network behavior on the wire:

  • A classical TLS 1.3 ClientHello sits around 300–500 bytes, fitting comfortably inside a single TCP segment.
  • With X25519MLKEM768, ClientHello grows to 1,300–1,500+ bytes. Once TCP/IP headers and other TLS extensions are counted, it frequently crosses the typical ~1,400-byte MTU and splits across two TCP segments.
Classical X25519 ClientHello (~400 bytes in one packet) vs hybrid X25519MLKEM768 ClientHello (~1,450 bytes split across two TCP segments hitting DPI middleboxes)
Crossing the ~1,400-byte MTU exposes bugs in legacy firewalls and TLS inspection proxies.

That single-packet assumption breaks poorly written network gear:

  1. Legacy firewalls and load balancers that inspect only the first TCP segment of a ClientHello fail to reassemble the extension and reset the connection (ERR_SSL_PROTOCOL_ERROR).
  2. Corporate Deep Packet Inspection (DPI) proxies that do TLS decryption for DLP often reject unknown group codepoint 0x11EC instead of ignoring it and falling back to X25519.

How to Verify Post-Quantum TLS Today

You do not need special tooling to check whether your browser, edge, or origin negotiates X25519MLKEM768:

  1. In Chrome / Edge / Firefox: Open DevTools (F12) → Security tab → reload the page. Look at Connection → Key exchange. Modern Cloudflare-proxied sites show X25519MLKEM768.
  2. Check local OpenSSL support (requires OpenSSL 3.5+):
Terminal window
openssl list -kem-algorithms | grep -i mlkem
  1. Test any origin or edge endpoint directly over TLS 1.3:
Terminal window
openssl s_client -groups "X25519MLKEM768" -tls1_3 -connect your-domain.com:443 </dev/null 2>/dev/null | grep -i "Negotiated TLS1.3 group"

If the server supports it, the output prints Negotiated TLS1.3 group: X25519MLKEM768. If it prints X25519 or fails to negotiate, the origin’s TLS library is either older than OpenSSL 3.5 or has not enabled the group.

  1. Check via Cloudflare Radar API: Cloudflare exposes /radar/post_quantum/tls/support under the Cloudflare Radar API (authenticated with Authorization: Bearer <API_TOKEN>) alongside Logpush and HTTP Traffic Analytics for domain-level key-exchange telemetry.

How to Enable X25519MLKEM768 on Nginx and Your Origin

Cloudflare enables X25519MLKEM768 by default on the visitor-to-edge leg for proxied domains. However, if the edge-to-origin leg still falls back to classical X25519, traffic between Cloudflare and your origin server remains classical unless your origin stack supports it.

On Nginx, support depends on the OpenSSL binary Nginx is linked against—not just the OS default package. Check with nginx -V to verify OpenSSL 3.5 or newer, then configure TLS 1.3 to prioritize hybrid ML-KEM with a classical fallback:

nginx-pqc.conf
server {
listen 443 ssl;
ssl_protocols TLSv1.3;
ssl_ecdh_curve X25519MLKEM768:X25519;
ssl_certificate /etc/ssl/certs/fullchain.pem;
ssl_certificate_key /etc/ssl/private/privkey.pem;
}

Keeping :X25519 after X25519MLKEM768 ensures legacy clients and older middleboxes still connect cleanly instead of failing the handshake.

Why Only ~28.7% of Origins Support It (Linux, AWS, and CDNs)

The gap between ~70% browser/edge adoption and ~28.7% origin readiness comes down to TLS library packaging, not reluctance from teams:

Why Only ~28.7% of Origins Support It (Linux, AWS, and CDNs)
Layer Default Post-Quantum Status Underlying Stack & Reason
Browsers (Chrome 131+, Edge 131+, Firefox 132+) Enabled by default BoringSSL / NSS ship X25519MLKEM768 out of the box
Cloudflare Edge (Visitor → Edge) Enabled by default Proxied domains automatically advertise X25519MLKEM768
AWS (s2n-tls / CloudFront / KMS) Supported on modern endpoints AWS s2n-tls supports hybrid ML-KEM key exchange; check specific ALB/CloudFront policy support
Standard Linux Origins (Ubuntu 22.04/24.04, Debian 12) Disabled by default Default repos ship OpenSSL 3.0.x; native ML-KEM requires OpenSSL 3.5+ (or a custom BoringSSL/quictls build)

In practice, if your app sits behind a CDN or cloud load balancer, the external hop may already be post-quantum while the internal or edge-to-origin hop still negotiates classical X25519. If you are planning broader cryptographic hygiene for compliance frameworks like NIS2, pair this TLS audit with your NIS2 cloud compliance checklist and review where encryption vs tokenization fits in Tokenization vs Encryption.

Practical Migration Order for Engineering Teams

Do not treat post-quantum migration as a single monolithic rewrite:

  1. Keep AES-256 and SHA-256/SHA-3 as-is: Do not waste cycles swapping symmetric encryption.
  2. Inventory long-lived confidential data first: Any TLS traffic, VPN tunnel, or backup archive that must remain confidential for 5–15+ years is exposed to Harvest Now, Decrypt Later today.
  3. Upgrade TLS termination to OpenSSL 3.5+ / BoringSSL: Enable X25519MLKEM768:X25519 on public ingress, API gateways, and origin servers—not only at the CDN edge.
  4. Test middleboxes before strict enforcement: Watch for multi-packet ClientHello resets on corporate DPI and older hardware load balancers.
  5. Track ML-DSA (FIPS 204) for certificates later: Wait for ACME / CA ecosystems and certificate transparency tooling to standardize hybrid/PQC certificate chains before replacing ECDSA / RSA leaf certificates.

The Bottom Line

Post-quantum encryption has already crossed the threshold from research paper to live internet traffic on the key-exchange layer. Browsers and CDNs moved first; origin servers and enterprise middleboxes are the bottleneck now. Upgrading TLS termination to OpenSSL 3.5+, preferring X25519MLKEM768:X25519, and testing for multi-packet ClientHello drops closes the Harvest Now, Decrypt Later gap without touching your symmetric ciphers or waiting for post-quantum certificates.

mTLS vs TLS Explained: How Mutual Authentication Works

Frequently asked questions

What is post-quantum encryption and why does it matter before quantum computers exist?

Post-quantum encryption (or post-quantum cryptography, PQC) uses mathematical problems such as module lattices (ML-KEM, ML-DSA) and stateless hashes (SLH-DSA) that resist Shor's algorithm on fault-tolerant quantum computers. It matters today because of Harvest Now, Decrypt Later (HNDL): adversaries can record encrypted TLS traffic now and decrypt it years later once capable quantum hardware arrives. Upgrading key exchange today stops that retroactive decryption.

Does post-quantum cryptography mean we have to replace AES-256 and SHA-256?

No. Quantum computers threaten asymmetric public-key cryptography (RSA, Diffie-Hellman, ECDH, ECDSA, Ed25519) exponentially via Shor's algorithm. Symmetric ciphers like AES-256 and hash functions like SHA-256 or SHA-3 only face a quadratic speedup from Grover's algorithm, meaning AES-256 retains roughly 128-bit quantum security and remains safe.

What is X25519MLKEM768 in TLS 1.3?

X25519MLKEM768 (IANA codepoint 0x11EC) is a hybrid TLS 1.3 key-exchange group enabled by default in Chrome 131+, Edge 131+, Firefox 132+, Cloudflare, and OpenSSL 3.5+. It concatenates a 32-byte classical X25519 share with a 1,184-byte ML-KEM-768 encapsulation key (1,216 bytes total) so an attacker would have to break both classical elliptic curves and lattice cryptography to recover the session secret.

Why does post-quantum TLS sometimes fail behind corporate firewalls or DPI boxes?

A classical X25519 ClientHello is typically 300 to 500 bytes and fits in one TCP packet. Adding X25519MLKEM768 expands ClientHello to 1,300–1,500+ bytes, crossing the typical ~1,400-byte MTU into two TCP segments. Legacy middleboxes, DPI appliances, and old load balancers that assume a single-packet ClientHello or reject unknown group codepoints can drop the handshake or return ERR_SSL_PROTOCOL_ERROR.

How do I enable and test ML-KEM on Nginx?

Nginx must be compiled against OpenSSL 3.5 or newer (check with nginx -V and openssl list -kem-algorithms). In your server block, restrict ssl_protocols to TLSv1.3 and set ssl_ecdh_curve X25519MLKEM768:X25519; to prefer hybrid ML-KEM with a classical fallback. Verify live with openssl s_client -groups "X25519MLKEM768" -tls1_3 -connect your-domain.com:443.

Should you turn post-quantum encryption on or off in browsers and VPNs?

Leave it on. Hybrid schemes such as X25519MLKEM768 combine classical X25519 with ML-KEM-768, so security never drops below classical TLS 1.3 even if a flaw is later found in ML-KEM. The only reason to temporarily toggle it off in a client is troubleshooting a broken legacy corporate proxy or DPI firewall that drops multi-packet ClientHello handshakes.

Why do only around 28.7% of origin servers support post-quantum TLS?

Most production Linux distributions (such as Ubuntu 22.04/24.04 LTS and Debian 12) ship OpenSSL 3.0.x in their default repositories, whereas native ML-KEM support arrived in OpenSSL 3.5. Until OS base images, reverse proxies, and managed load balancers link against OpenSSL 3.5+, BoringSSL, or AWS s2n-tls with ML-KEM enabled, origin servers fall back to classical X25519.

From the community

Discussion on Mastodon & Bluesky

Replies to this article from the open web, pulled in live. No ads, no tracking scripts.

Loading replies …
Reply on MastodonReply on Bluesky

Reply there — it shows up here automatically.

ENDE