The mechanism
A quantum computer threatens key exchange and signatures differently. Key exchange is exposed to recording, the attack NIST calls harvest now, decrypt later (HNDL): someone who stores your handshakes and ciphertext can decrypt them once a large enough quantum computer exists. Signatures are not: "session authentication cannot be retroactively broken" (RFC 9954). NIST IR 8547 (final, October 2026) still calls the signature migration "urgent due to the longer duration and greater complexity of the transition process". So key exchange comes first; then find everything else with an algorithm fixed into it.
What a hybrid group puts on the wire
ML-KEM, standardised by NIST as FIPS 203 in August 2024, is a key-encapsulation mechanism (KEM): instead of both sides contributing a share, as in Diffie-Hellman, the client sends a public encapsulation key and the server encrypts a fresh secret to it. For X25519MLKEM768 (IANA value 4588, 0x11EC), RFC 10024 defines the client's share as "the concatenation of the client's ML-KEM-768 encapsulation key and the client's X25519 ephemeral share": 1,216 bytes, of which 1,184 are ML-KEM and 32 are X25519. The server replies with 1,120 bytes: a 1,088-byte ML-KEM ciphertext plus its own 32-byte X25519 share.
Each side ends up with two 32-byte secrets, concatenated, ML-KEM first, into a 64-byte value that replaces the ECDHE secret in the TLS 1.3 key schedule. RFC 9954 states the goal: a shared secret "that remains secure as long as one of the component key exchange mechanisms remains unbroken." The ML-KEM-first order is deliberate. Under SP 800-56Cr2, the first secret must come from an approved, certified scheme, so in X25519MLKEM768 "the ML-KEM implementation must be certified" (RFC 10024); IR 8547 says NIST will update SP 800-56C to allow either order.
Steps as text
- ClientHello: ML-KEM-768 key + X25519 share: 1,216 bytes
- Server encapsulates: ML-KEM ciphertext + X25519 share: 1,120 bytes
- Two secrets: 32 bytes from ML-KEM, 32 bytes from X25519
- Concatenate: ML-KEM secret first, 64 bytes
- HKDF-Extract: Replaces the ECDHE secret in the key schedule
- Session keys: Hold while either half is unbroken
Certificates do not change: our openssl s_client handshake with cloudflare.com on 2 December 2026 negotiated X25519MLKEM768 with an ecdsa_secp256r1_sha256 signature. You can deploy hybrid key exchange without touching your PKI.
Hybrid, pure, or the two other hybrids
RFC 10024 (Standards Track, August 2026) defines three groups; only X25519MLKEM768 is Recommended: Y in the IANA registry. SecP256r1MLKEM768 and SecP384r1MLKEM1024, marked N, serve "use cases that require both shared secrets to be generated by FIPS-approved mechanisms" and "high-security environments".
Pure ML-KEM is draft-ietf-tls-mlkem-11, codepoints 0x0200 to 0x0202. It is Informational and marks MLKEM512, MLKEM768 and MLKEM1024 Recommended: N, which RFC 9847, as the draft quotes it, defines as "the IETF has made no statement about the suitability of the associated mechanism"; RFC 9847 adds that N "does not necessarily mean that the mechanism is flawed, only that no consensus exists." The IESG approved the draft on 3 September 2026. On 24 November, D. J. Bernstein complained to the IETF's Security Area Directors (ADs), who oversee the TLS working group, that "82 people spoke up on the TLS WG mailing list stating unambiguous, non-withdrawn opposition". On 1 December, the Security AD for TLS, Deb Cooley, denied the complaint ("In the IETF we don't count heads") and asked the RFC Editor to release the stream hold on the document. The draft itself defers to that registry column as "the IETF's current guidance".
Anthropic's lattice research gave a concrete reason to keep the classical half. On 30 November, Anthropic published four papers that include, in the summary by the Cryptography Incident Review Group (CIRG), a quantum algorithm "for attacking certain module-lattice problems, including some versions of Ring- and Module-LWE", the problem family ML-KEM rests on. CIRG called the attack's scale "galactic" and recommended "continuing the transition", adding: "We also encourage hybrids that combine schemes based on different mathematical foundations, and we recommend designing agile systems so that individual schemes can be replaced quickly if the need arises." CIRG also recommends "that those adopting the current NIST standards choose the highest security level each application can support." NIST IR 8547 still names ML-KEM-768 "the default parameter set, as it provides a large security margin at a reasonable performance cost", so the 768 default stands for general traffic. Where you control both ends and can afford 449 more bytes from the client and 545 from the server, SecP384r1MLKEM1024 is the higher level. Cloudflare said on 1 December that the research "does not impact the security of deployed cryptosystems."
NIST takes the longer view: IR 8547 says hybrids "are typically expected to be temporary measures that lead to a second transition to cryptographic tools that use only PQC algorithms." For now the registry and CIRG point to hybrid; clean up pinned lists so that the later switch is a config change too.
Be precise about what each half buys. ML-KEM protects recorded traffic against a future quantum computer. X25519 keeps the connection no weaker than it is now if a classical flaw turns up in ML-KEM or in an implementation of it. Against a quantum attacker, X25519 adds nothing; Cloudflare's post says quantum computers are "far more likely to break elliptic curves and RSA before lattices."
Where it is already the default
- OpenSSL 3.5.0 (8 April 2025) changed "the default TLS keyshares" to offer X25519MLKEM768 and X25519.
- Go 1.24: X25519MLKEM768 "is enabled by default when Config.CurvePreferences is nil." Go 1.26 adds SecP256r1MLKEM768 and SecP384r1MLKEM1024 to the default.
- JDK 27 (JEP 527, delivered): the default list starts with X25519MLKEM768, and "TLS 1.3 clients will offer the X25519MLKEM768 and x25519 key shares." JDK 27 is a feature release; check whether your LTS line has it before relying on the default.
- Chrome 131 switched from Kyber to ML-KEM at
0x11EC. - AWS: KMS, ACM and Secrets Manager non-FIPS endpoints accept ML-KEM hybrids (April 2025). AWS's Go, Rust and Node.js SDKs prefer hybrid by default at stated versions; boto3 "requires running on a system with OpenSSL 3.5 or later installed", and the Java SDK v2 needs
postQuantumTlsEnabled(true)on the CRT HTTP client.
All of these share one condition. The default applies only where your code or config hasn't named its own list. Go: "To disable it, set CurvePreferences explicitly". The JDK gets hybrid "as long as that code does not already select specific key exchange schemes". In nginx, ssl_ecdh_curve prime256v1:secp384r1 replaces OpenSSL's built-in list; the default auto uses it. A curve list pinned years ago to pass an audit is exactly the baked-in algorithm this guide is about.
Crypto agility: four ways an algorithm gets fixed
- Config. A curve list in nginx's
ssl_ecdh_curve, Node'secdhCurve,jdk.tls.namedGroupsor anopenssl.cnfGroupsline. You can change it in a deploy. - Library or runtime version. The base image's OpenSSL, the Go toolchain, the JDK. These change on a rebuild and restart, the same path the trust-store guide traces for CA roots.
- Stored artifacts. Release and firmware signatures, data encrypted to an RSA or ECDH public key, KMS keys with an RSA or ECC
KeySpec. These change only by re-signing, re-encrypting or rotating keys. - Hardware. IR 8547 says HSMs and TPMs "must be upgraded or redesigned to support PQC algorithms", and for code signing, "In some cases, it is not feasible to update the code that performs the signature verification after the devices have been manufactured."
Symmetric encryption is not on the list: IR 8547 says approved symmetric primitives with "at least 128 bits of classical security are believed to meet the requirements of at least Category 1 security". HNDL threatens the TLS connection that carried your AES data keys, not the data at rest. AWS gave a matching reason for starting with KMS, ACM and Secrets Manager: they are "security-critical AWS services with the most urgent need for post-quantum confidentiality."
Worked numbers
What each group costs on the wire, from RFC 10024 and the pure ML-KEM draft:
Data as text
| Client share (bytes) | Server share (bytes) | |
|---|---|---|
| X25519 | 32 | 32 |
| X25519MLKEM768 | 1,216 | 1,120 |
| MLKEM768, pure | 1,184 | 1,088 |
| SecP256r1MLKEM768 | 1,249 | 1,153 |
| SecP384r1MLKEM1024 | 1,665 | 1,665 |
| MLKEM1024, pure | 1,568 | 1,568 |
- Hybrid over classical: with both shares offered, as the OpenSSL, Go, JDK and Chrome defaults do, the client adds the whole 1,216-byte hybrid share and the server's reply grows by 1,120 − 32 = 1,088 bytes: 2,304 extra bytes per full handshake (2,272 if the hybrid replaces the X25519 share instead of joining it). Our measurement below adds 18 bytes more, for the key-share entry header and the longer supported-groups list.
- Pure over hybrid: pure ML-KEM-768 saves 32 bytes each way, 64 in total, plus one X25519 operation. That is the whole size argument for pure.
Sending key shares for two hybrids at once roughly doubles the cost: RFC 9954 notes that a client offering SecP256r1MLKEM768 and X25519MLKEM768 this way "would end up sending two ML-KEM-768 public keys", 1,216 + 1,249 = 2,465 bytes. Listing a second hybrid without a key share costs 2 bytes; a server that wants it asks with a HelloRetryRequest, at the cost of a round trip.
What the ClientHello becomes (measured). On 2 December 2026 we ran OpenSSL 3.5.9's s_client -msg against a local s_server with a 16-character server name (browsers' hellos differ):
| Client offers | ClientHello (incl. 4-byte header) | ServerHello (incl. 4-byte header) |
|---|---|---|
| X25519 only | 310 bytes | 122 bytes |
| X25519MLKEM768 only | 1,486 bytes | 1,210 bytes |
| OpenSSL 3.5 default (both shares) | 1,544 bytes | 1,210 bytes |
OpenSSL's printed lengths include the 4-byte handshake header, so with the 5-byte record header the default ClientHello is 1,549 bytes on the wire. Illustrative: on a 1,500-byte Ethernet MTU, IPv4 and TCP headers without options leave a 1,460-byte segment, so the hello arrives in two segments: 1,460 bytes, then 89. The classical hello (315 bytes on the wire) fitted in one with more than 1,100 bytes to spare.
CPU and throughput. AWS puts the extra compute at "approximately 80–150 microseconds" per handshake "to perform ML-KEM cryptographic operations." In its KMS benchmark (AWS SDK for Java v2, classical P-256 against X25519MLKEM768), a full handshake on every request cut throughput "about 2.3 percent on average, from 108.7 TPS to 106.2 TPS"; with the SDK's default connection reuse, 0.05 percent, from 216.1 to 216.0. Illustrative: a fleet taking 5,000 new full handshakes a second at the top of that range spends 5,000 × 150 µs = 0.75 CPU-seconds a second, under one core. At 10 million full handshakes a day, the extra 2,304 bytes come to about 23 GB a day. Connection reuse shrinks both; session resumption with psk_dhe_ke, the usual mode, still pays them. Put in your own handshake rate.
How long recorded traffic must stay secret. IR 8547's version of Mosca's rule: with X years of required secrecy and Y years of migration, start "before X + Y exceeds the expected time Z for a cryptanalytically relevant quantum computer to be built." Nobody knows Z, and this guide doesn't guess it. You can know how long each kind of recorded traffic must stay secret. Illustrative: suppose your last classical-only link switches to hybrid at the end of 2027.
| Data crossing the link | Must stay secret for | Recorded traffic must hold until |
|---|---|---|
| Session cookies, one-time codes | Hours | 2027 |
| Application logs | 1 year | 2028 |
| Customer records under a 7-year retention rule | 7 years | 2034 |
| Health, legal or identity records | 25 years | 2052 |
NIST "will deprecate quantum-vulnerable public-key cryptography after 2030 and disallow its use under NIST standards and guidelines after 2035" (IR 8547), and for US federal high-value assets IR 8547 reports earlier OMB M-26-15 deadlines: key establishment "by December 31, 2030, and for digital signatures by December 31, 2031". Any row ending after 2035 depends on classical cryptography outlasting NIST's own support for it.
How it fails
Large ClientHellos meet buggy servers and middleboxes (2023 to 2025)
Announcing X25519Kyber768 support for Chrome 116 in August 2023, Google warned that "in certain limited cases, TLS middleboxes failed due to improperly hardcoded restrictions on message size," and offered the PostQuantumKeyAgreementEnabled enterprise policy "only ... as a temporary measure".
tldr.fail, a reference page on the bug, explains the cause: the larger hello "exceed[s] the threshold for transmission in a single packet," so "a single call to TCP read() might not return the entire ClientHello packet," and "Most buggy servers are not prepared to have to call read() more than once". Its table of known incompatibilities runs from Vercel (found 15 August 2023, patched 23 August) to Cisco and Envoy (April 2024, via Chrome 124) and Palo Alto (found 25 October 2024 via Go 1.23, patched 27 March 2025). Ingress-nginx is marked not fixed, but "Only affects TLS passthrough."
Go 1.24 offers GODEBUG=tlsmlkem=0 for "buggy TLS servers that do not handle large records correctly", and OpenSSL's documentation warns that "firewall software may erroneously disrupt the TLS handshake."
Steps as text
- Client → Buggy server: segment 1: 1,460 of 1,549 bytes
- Buggy server → Client: one read(), parse fails, reset (the harmful step)
- After a pause: Client → Buggy server: segment 2: last 89 bytes, too late
The lesson for a platform team: the bug can sit in whatever reads the hello before your server does, such as a passthrough load balancer, an egress proxy or a firewall. A test against the origin alone won't find it.
The Kyber codepoint goes away (2024 to 2026)
When Kyber became ML-KEM, "The changes to the final version of ML-KEM make it incompatible with the previously deployed version of Kyber," so the codepoint moved from 0x6399 to 0x11EC, and Chrome 131 dropped the old one. Go 1.24 removed X25519Kyber768Draft00, and IANA lists both Kyber entries as OBSOLETE, with "D" in the Recommended column. AWS kept Kyber through 2025 and said clients that never upgrade "will see their clients gracefully fall back to a classical key agreement once CRYSTALS-Kyber is removed from AWS service HTTPS endpoints." Nothing errors; a post-quantum client silently becomes a classical one, and only a log of the negotiated group shows it.
SHA-1: deprecated in 2011, still a default
Git's own breaking-changes document says SHA-1 "has been deprecated by NIST in 2011." On 23 February 2017, Google and CWI Amsterdam announced SHAttered, the first practical collision. In December 2022, NIST set 31 December 2030 as the date to stop using SHA-1 in its last remaining protocols, and said "Modules that still use SHA-1 after 2030 will not be permitted for purchase by the federal government."
In a data format the algorithm is hardest to move: Git's object names are SHA-1 hashes, and "SHA-256 repositories cannot be read by older versions of Git." Changing the default for new repositories to SHA-256 is listed for Git 3.0, for which "There is no planned release date". NIST's planned end of SHA-1 comes nineteen years after its deprecation. If an algorithm is in your file formats, identifiers or signed artifacts, its migration runs on that clock, not on your release schedule.
Traps without a postmortem
- An old `go` line turns hybrid off. Go amends its defaults "to match the Go version listed in go.mod". On 2 December 2026 we built a program with Go 1.27.4 from a module whose
go.modsaysgo 1.23:go version -mshowedDefaultGODEBUG=...tlsmlkem=0,tlssecpmlkem=0.... A new toolchain, a classical-only client. - An explicit list freezes the old default. Go's
CurvePreferences, the JDK'ssetNamedGroups, nginx'sssl_ecdh_curveand Node'secdhCurveall replace the library's list instead of adding to it. - Offering only the hybrid breaks old servers. A client restricted to X25519MLKEM768 fails with
handshake failure ... SSL alert number 40against a server that lacks it. (reproduced on 2 December 2026 against an X25519-onlys_server). Offer it first and keep X25519, as the defaults do.
Decision table
| Option | What it costs | Choose it when |
|---|---|---|
| Hybrid X25519MLKEM768, alongside X25519 | 2,304 extra bytes per full handshake; 80–150 µs CPU; a ClientHello that no longer fits one segment | The default for every TLS 1.3 endpoint you run, internal and external. Get it by upgrading (OpenSSL 3.5, Go 1.24 with a matching go line, JDK 27) and deleting pinned lists |
| SecP256r1MLKEM768 or SecP384r1MLKEM1024 | Larger shares (1,249 and 1,665 bytes client-side); IANA Recommended: N | A FIPS boundary where the ECDHE part must come from a certified module, a rule requiring P-384 strength, or traffic you control at both ends where you follow CIRG's advice to use the highest level you can support |
| Pure ML-KEM (MLKEM768, MLKEM1024) | Saves 64 bytes against the hybrid; drops the classical half that CIRG encourages keeping; Informational draft, Recommended: N; NIST expects to end up here after a later second transition | Only when a contract or national rule requires it, and then for that traffic only |
| Wait | Nothing now; every session recorded until you switch can be decrypted if a cryptanalytically relevant quantum computer is ever built | Only for traffic that is worthless once it expires. CIRG: delaying "would prolong reliance on existing systems that can be broken with far fewer quantum resources" |
| Post-quantum signatures and certificates now | Signature schemes that tldr.fail says "still have performance issues" in X.509 | Not for HNDL, since signatures can't be broken retroactively. Start now for firmware and code-signing roots in devices you can't update, as IR 8547 advises |
| Re-encrypt long-lived data held under RSA or ECDH keys | Batch re-encryption and key rotation | Data that must stay secret past about 2035, or whose ciphertext others could copy |
A check you can run this week
You need OpenSSL 3.5 or later for the first two commands.
1. Can each endpoint negotiate the hybrid? Try it alone, then X25519 alone:
for target in api.example.com:443 internal-lb.example.net:8443; do
echo "== $target"
for g in X25519MLKEM768 X25519; do
printf '%s: ' "$g"
echo | openssl s_client -connect "$target" -groups "$g" -brief 2>&1 \
| grep -m1 -E 'Negotiated TLS1.3 group|Peer Temp Key|alert|errno|unexpected eof' \
|| echo "no result: connection reset, dropped or timed out"
done
doneNegotiated TLS1.3 group: X25519MLKEM768 means yes; ssl/tls alert handshake failure ... SSL alert number 40 means the server can't. An errno= or unexpected eof line, or no result, means the connection was cut mid-handshake: the large-ClientHello bug above, in the server or in something in front of it. A target that hangs is the same bug; wrap the command in timeout 15 where you have it. If X25519 negotiates but the hybrid fails that way, something on the path is dropping the larger hello, so run this through the same load balancer and proxy a real client uses.
2. What does your default client pick? Without -groups, OpenSSL offers both shares; Peer Temp Key: X25519, 253 bits means the server stayed classical:
echo | openssl s_client -connect api.example.com:443 -brief 2>&1 \
| grep -E 'Negotiated TLS1.3 group|Peer Temp Key'3. Which Go binaries were built classical-only, and where is a list pinned?
go version -m ./bin/* | grep -E ': go1\.|tlsmlkem'
git grep -n -E 'CurvePreferences|tlsmlkem|jdk\.tls\.namedGroups|setNamedGroups|ssl_ecdh_curve|ecdhCurve|^ *(Groups|Curves) *=|ssl_conf_command +(Groups|Curves)|ecdh_curves|set_ecdh_curve|ssl-default-bind-curves'
git grep -n -E '^go 1\.(1[0-9]|2[0-3])([.]|$)' -- '*go.mod'A binary showing tlsmlkem=0, or a go.mod line matched by the last command, offers no hybrid by default. Only the main module's go.mod sets a binary's defaults, so matches in library modules are false positives, and a runtime GODEBUG=tlsmlkem=0 environment variable overrides the build. Inside each image, openssl version, python3 -c "import ssl; print(ssl.OPENSSL_VERSION)" and java -version show the runtime.
4. Which KMS keys are classical asymmetric keys? Run this for each Region you use (add --region):
aws kms list-keys --query 'Keys[].KeyId' --output text | tr '\t' '\n' | while read -r k; do
aws kms describe-key --key-id "$k" --query 'KeyMetadata.[KeyId,KeySpec,KeyUsage]' --output text
done | grep -E 'RSA_|ECC_|SM2'Rows with ENCRYPT_DECRYPT or KEY_AGREEMENT protect data a recording could later expose; SIGN_VERIFY rows belong to the signature migration. AWS documents a tlsDetails.keyExchange field in CloudTrail for Secrets Manager calls that reads X25519MLKEM768 when hybrid is active.
Then make one sheet: for each surface (TLS terminators, service clients, KMS and HSM keys, release and firmware signing, long-lived encrypted data), which of the four ways its algorithm is fixed, who owns the change, and how many years its data must stay secret. Any row that needs new hardware, or must stay secret past 2035, goes on the roadmap now. Our episode on Anthropic's lattice papers covers why ML-KEM still stands and why the CIRG statement asks for agile systems.
Sources
The primary sources this guide was checked against.
- NIST IR 8547: Transition to Post-Quantum Cryptography Standards (final, October 2026)
- NIST IR 8547 final, full text (PDF)
- NIST: FIPS 203, Module-Lattice-Based Key-Encapsulation Mechanism Standard (13 August 2024)
- NIST CSRC: Announcing approval of FIPS 203, 204 and 205 for post-quantum cryptography (13 August 2024)
- RFC 10024: Post-Quantum Traditional (PQ/T) Hybrid Key Agreement Mechanisms for TLS 1.3 (August 2026)
- RFC 9954: Hybrid Key Exchange in TLS 1.3 (July 2026)
- IETF: draft-ietf-tls-mlkem-11, ML-KEM Post-Quantum Key Agreement for TLS 1.3 (Informational)
- IETF datatracker: draft-ietf-tls-mlkem history (stream hold 30 November, released 1 December 2026)
- TLS WG list: D. J. Bernstein, Complaint to ADs regarding false claim of WG consensus (24 November 2026)
- TLS WG list: Deb Cooley, AD response to the complaint (1 December 2026)
- IANA: TLS Supported Groups registry (CSV)
- CIRG: Initial Assessment of Anthropic's Findings on Lattice Cryptography (30 November 2026)
- Cloudflare blog: Post-quantum cryptography is still safe (1 December 2026)
- Google Online Security Blog: A new path for Kyber on the web (13 September 2024)
- Chromium Blog: Protecting Chrome Traffic with Hybrid Kyber KEM (10 August 2023)
- tldr.fail: post-quantum ClientHello incompatibilities and known affected products
- Go 1.24 release notes (crypto/tls, X25519MLKEM768 default)
- Go documentation: crypto/tls (Config.CurvePreferences, CurveID)
- Go documentation: Go, Backwards Compatibility, and GODEBUG
- OpenSSL 3.5 NEWS: major changes in OpenSSL 3.5.0 (8 April 2025)
- OpenSSL 3.5 documentation: SSL_CTX_set1_groups_list and the DEFAULT keyshares
- OpenSSL 3.5 documentation: openssl-s_client
- OpenSSL 3.5 documentation: SSL_CONF_cmd (-groups and Groups)
- OpenJDK: JEP 527, Post-Quantum Hybrid Key Exchange for TLS 1.3 (JDK 27)
- AWS Security Blog: ML-KEM post-quantum TLS now supported in AWS KMS, ACM, and Secrets Manager (7 April 2025)
- AWS Security Blog: Protecting your secrets from tomorrow's quantum risks (24 April 2026)
- AWS KMS API Reference: KeyMetadata (KeySpec, KeyUsage)
- nginx documentation: ngx_http_ssl_module, ssl_ecdh_curve
- Node.js documentation: TLS (ecdhCurve)
- Google Online Security Blog: Announcing the first SHA1 collision (23 February 2017)
- NIST: NIST Retires SHA-1 Cryptographic Algorithm (15 December 2022)
- Git documentation: BreakingChanges (Git 3.0, SHA-256 default)
- Git documentation: hash function transition
Hear it discussed
Episodes of the show that work through this decision.