Hybrid schemes
Two keys, one secret
Traffic encrypted today can be recorded and stored until a quantum computer exists that breaks ECDH with Shor’s algorithm — “harvest now, decrypt later”. That is why post-quantum key exchange is being deployed now. But ML-KEM has been a standard only since August 2024, while X25519 has two decades of analysis behind it. A hybrid scheme does not make you choose: both exchanges run at once and the key is derived from both secrets. NIST puts it this way in SP 800-227 (September 2025): a well-designed scheme built from several algorithms is secure if at least one of them is.
In TLS 1.3 such a hybrid is simply one more group in the key_share extension. According to
RFC 10024 (August 2026), a client offering X25519MLKEM768 sends its
ML-KEM-768 encapsulation key and its X25519 key — 1216 B. The server encapsulates a secret to that key and
returns the ML-KEM ciphertext and its own X25519 key — 1120 B. Both sides concatenate the ML-KEM secret and
the X25519 secret (64 B) and feed the result into the key schedule in place of the ECDHE secret. ML-KEM comes
first even though the group’s name says the opposite: the RFC explains this with FIPS certification
requirements. Plain concatenation is enough because the TLS key schedule mixes a hash of the whole handshake,
both key_share values included, into the secret anyway —
RFC 10024 §6 builds its security analysis on that.
The toy computes this with real X25519 and ML-KEM-768 from your browser’s WebCrypto and derives the session
key in a simplified way: HKDF over the secret and a hash of both shares (HKDF is covered by the
HKDF — key derivation station), then encrypts a message with AES-GCM.
X25519MLKEM768 live
Key agreement as in TLS 1.3 (group X25519MLKEM768, codepoint 0x11EC) on real primitives from your browser’s WebCrypto: X25519 and ML-KEM-768. Every step also runs with X25519 alone, for comparison.
The server will encrypt this message under the session key: “Meeting on Friday at 6 pm, room 2.”
Checking whether this browser has X25519 and ML-KEM in WebCrypto…
The trade-off is simple: ML-KEM’s computations take fractions of a millisecond, so the time barely changes, but the ClientHello grows by 1184 B and the server’s answer by 1088 B. Those bytes can trip up buggy TLS servers that do not handle large records correctly and stall the handshake — Go enables X25519MLKEM768 by default since version 1.24 but keeps a switch for that case (release notes).
Break one half
The attacker has recorded three sessions: a hybrid one, one with X25519 alone and one with ML-KEM-768 alone.
They hold both key_share values, the nonce and the ciphertext — everything that crossed the wire. Now picture
two possible breakthroughs. The first is a quantum computer: Shor’s algorithm finds the period of a function
and solves the discrete logarithm on an elliptic curve too, so it recovers the X25519 private key from the
public one (the classical side of that computation is shown by the stations
RSA on small numbers and Elliptic curves over a small field; the algorithm
itself is covered by the Shor’s algorithm station). The second is a weakness in
the new algorithm — and that is not theory. SIKE, an isogeny-based KEM, advanced to the fourth round of the
NIST process in July 2022, and a few weeks later Wouter Castryck and Thomas Decru presented a
classical attack that recovers a SIKEp434 key in about ten minutes on a
single processor core.
The switches below are a simulation: the page does not break X25519 or ML-KEM, it hands the attacker the client’s private key, which it generated itself. The attacker computes the rest for real — the part’s secret from the recorded server share, then the session key and the decryption of the real ciphertext. When one part is missing, all that is left is guessing 32 bytes; the toy times the guesses on your device and scales the rate to 2²⁵⁶ candidates — an extrapolation, not a measurement.
Harvest now, decrypt later
The switches do not really break anything: the page hands you the client’s private key for that part, which it generated itself — as if Shor’s algorithm had computed the X25519 scalar from the public key, or a weakness in ML-KEM had given away the decapsulation key. You compute the rest from the recording yourself.
Checking whether this browser has X25519 and ML-KEM in WebCrypto…
When you are missing bytes of the secret, I will time guessing on your device and work out how long the search would take.
The X25519-only session falls to Shor, the ML-KEM-only session to a weakness in ML-KEM, and the hybrid only when both parts fall. That is why both attacks have the status “resistant” in the graph. The precedent is real: in 2019 Google and Cloudflare tested the hybrid CECPQ2b — SIKE with X25519 between Chrome (Canary and Dev) and Cloudflare’s servers, with X25519 there precisely as the classical safeguard in case the experimental algorithm failed. Traffic recorded back then is, after SIKE was broken, still protected by X25519 — as long as there is no quantum computer.
Where hybrids run
- TLS 1.3 — RFC 10024Since August 2026 an IETF standard defines three hybrids for TLS 1.3: X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024. Only X25519MLKEM768 (codepoint 0x11EC) is marked as recommended in the IANA registry.Source (TLS 1.3 — RFC 10024)
- ChromeChrome 131 (November 2024) replaced the X25519 + Kyber hybrid (0x6399) with X25519 + the final ML-KEM (0x11EC) — the earlier Kyber was incompatible with ML-KEM, so the group codepoint had to change.Source (Chrome)
- CloudflareIn September 2026 about 70% of browser traffic to Cloudflare’s network was protected by a hybrid with ML-KEM, but only about 15% of the origin servers Cloudflare connects to used it.Source (Cloudflare)
- Signal — SPQRIn October 2025 Signal started mixing a new ratchet built on ML-KEM 768 with its existing elliptic-curve Double Ratchet (the “Triple Ratchet”): to tell the key from random, an attacker has to break both the curve and ML-KEM.Source (Signal — SPQR)
- Apple iMessage PQ3Since iOS 17.4 (2024) iMessage sets up a conversation with a Kyber-1024 key and a P-256 key, and rekeys with Kyber-768. Apple states plainly that both the classical elliptic-curve cryptography and the new algorithms have to be defeated.Source (Apple iMessage PQ3)
- OpenSSHA hybrid has been the default since version 9.0 (April 2022, sntrup761x25519-sha512), mlkem768x25519-sha256 since 10.0 (April 2025), and 10.1 warns when a connection agrees on a key without a post-quantum algorithm.Source (OpenSSH)
A hybrid from the platform, not home-made glue
Take the hybrid from the platform: a current TLS library negotiates X25519MLKEM768 on its own — OpenSSL since 3.5 (default key shares X25519MLKEM768 and X25519), Go since 1.24, the browsers. Just check that nothing in your configuration narrows the group list to curves only. When you encrypt to a public key yourself, outside TLS, use a ready-made hybrid KEM from a library: X-Wing (ML-KEM-768 + X25519, draft) or HPKE with a hybrid KEM (draft-ietf-hpke-pq). Both are still drafts, not standards; X-Wing computes the shared secret as a hash of both secrets, the ciphertext and the X25519 public key.
// Go 1.24+: X25519MLKEM768 is the default when CurvePreferences == nil
cfg := &tls.Config{MinVersion: tls.VersionTLS13}
// ✕ cfg.CurvePreferences = []tls.CurveID{tls.X25519} — turns the hybrid off# X-Wing (draft-connolly-cfrg-xwing-kem, §5.3): the hash also binds ct_X and pk_X
def Combiner(ss_M, ss_X, ct_X, pk_X):
return SHA3_256(concat(ss_M, ss_X, ct_X, pk_X, XWingLabel)) # 5c2e2f2f5e5cDo not combine the secrets yourself, for example with XOR. In TLS and in X-Wing the key also depends on what crossed the wire: TLS mixes the transcript with both shares into the secret (RFC 10024 §6), X-Wing the ciphertext and the X25519 public key. X-Wing leaves out the ML-KEM ciphertext only thanks to how ML-KEM is built, and its authors warn that with another KEM this combiner cannot be assumed secure (§6). An XOR of the secrets binds nothing. And do not switch to ML-KEM alone without a concrete requirement — you lose the safeguard against a weakness like SIKE’s.
// ✕ home-made combiner: nothing binds the key to the ciphertexts or the transcript
const key = xor(kMlKem, kX25519);
// ✕ ML-KEM alone "because quantum": one weakness exposes all recorded traffic
const key2 = kMlKem;