CYART // SCHEMA · TLS-HANDSHAKE6 NODES · 7 LINKS12SIGNED BYENCRYPTED3ACTOR · ClientACTOR01ClientCONTROL · ClientHello — versions, ciphers, key shareCONTROL02ClientHelloversions, ciphers, key shareCONTROL · ServerHello — cert, key share, FinishedCONTROL03ServerHellocert, key share, FinishedSERVICE · Server — private key never leavesSERVICE04Serverprivate key never leavesDATA · CA chain — root in trust storeDATA05CA chainroot in trust storeSTREAM · App data — AEAD, forward secrecySTREAM06App dataAEAD, forward secrecy

Post-quantum migration

Harvest-now-decrypt-later explained, ML-KEM (FIPS 203) and ML-DSA (FIPS 204) in practical terms, hybrid X25519MLKEM768 in TLS 1.3, the byte and latency costs, what to migrate first and the published timelines.

FREELesson·12 min read·Advanced → Staff
post-quantum cryptographyML-KEMX25519MLKEM768harvest now decrypt laterML-DSAFIPS 203

01The threat: harvest now, decrypt later

✓What you will learn
  • Explain harvest-now-decrypt-later and use Mosca's inequality to decide urgency
  • Say which algorithms a quantum computer breaks and which it only dents
  • Describe ML-KEM and ML-DSA and their sizes compared with classical algorithms
  • Explain hybrid key exchange in TLS 1.3 and the X25519MLKEM768 group
  • Prioritise a migration using inventory, data lifetime and published deadlines

A cryptographically relevant quantum computer (CRQC) running Shor's algorithm would solve the integer factoring and discrete logarithm problems efficiently. That breaks RSA, finite-field Diffie-Hellman, ECDH (including X25519), ECDSA and EdDSA. Nobody has one today. The threat that matters now is harvest now, decrypt later (HNDL): an adversary records encrypted traffic today and decrypts it when a CRQC exists. Anything whose key exchange used only classical algorithms is exposed retroactively.

Symmetric crypto is only dented. Grover's algorithm gives a quadratic speed-up on brute force, which in theory halves the effective key length, and in practice is far worse than that for the attacker because the search does not parallelise well. AES-256 and SHA-256 are considered safe; AES-128 is still widely judged acceptable but AES-256 is the conservative choice for long-lived data.

Mosca's inequality turns this into a decision: let x be how long the data must stay secret, y how long your migration will take, and z how long until a CRQC exists. If x + y > z, you are already late. Medical records (x = decades) plus a five-year migration (y = 5) beat almost any estimate of z, which is why key exchange for long-lived data comes first.

PrimitiveQuantum impactAction
RSA, DH, ECDH, X25519Broken by ShorReplace key exchange with hybrid ML-KEM now
ECDSA, Ed25519, RSA signaturesBroken by ShorPlan ML-DSA or SLH-DSA, long-lived roots first
AES-128Grover, theoretical halvingPrefer AES-256 for long-lived data
AES-256, ChaCha20Comfortable marginNo change
SHA-256, SHA-3, HMACComfortable marginNo change

02ML-KEM, ML-DSA and their costs

NIST published the first three post-quantum standards in August 2024. FIPS 203, ML-KEM (module-lattice key encapsulation, from CRYSTALS-Kyber) replaces key exchange. FIPS 204, ML-DSA (from CRYSTALS-Dilithium) is the general-purpose signature. FIPS 205, SLH-DSA (from SPHINCS+) is a hash-based signature with very conservative security assumptions and large signatures. A KEM differs from Diffie-Hellman: one side publishes an encapsulation key, the other encapsulates a fresh random shared secret to it and sends the ciphertext, and the first side decapsulates.

AlgorithmRolePublic key (bytes)Ciphertext or signature (bytes)
X25519Key exchange3232 (peer share)
ML-KEM-768KEM (NIST level 3)1,1841,088
X25519MLKEM768Hybrid TLS group1,216 client share1,120 server share
Ed25519Signature3264
ECDSA P-256Signature64 (raw point)64 raw, about 72 DER
RSA-2048Signature256 (modulus)256
ML-DSA-44Signature (level 2)1,3122,420
ML-DSA-65Signature (level 3)1,9523,309
SLH-DSA-SHA2-128sSignature (level 1)327,856

Compute is not the problem: ML-KEM operations take tens of microseconds, comparable to or faster than X25519. Bytes are the problem. A hybrid ClientHello grows by about 1.2 KB and usually no longer fits in one packet. That broke some middleboxes and servers that assumed the ClientHello arrives in a single TCP segment, a class of bug catalogued at tldr.fail. Signatures are worse: a chain with ML-DSA-44 leaf and intermediate certificates, a CertificateVerify and two SCTs adds roughly 10 to 15 KB, enough to overflow a typical initial congestion window (10 segments, about 14 KB) and cost an extra round trip. That is why the web moved key exchange first and is still working on signatures.

!New maths, new implementations

Lattice schemes are younger than elliptic curves, and implementations have already had bugs (KyberSlash, a timing leak in some Kyber implementations' division step, in 2024). This is the main argument for hybrid: if either component holds, the session key is safe.

03Hybrid key exchange in TLS 1.3

FigWhere the hybrid share travels
CYART // SCHEMA · TLS-HANDSHAKE6 NODES · 7 LINKS12SIGNED BYENCRYPTED3ACTOR · ClientACTOR01ClientCONTROL · ClientHello — versions, ciphers, key shareCONTROL02ClientHelloversions, ciphers, key shareCONTROL · ServerHello — cert, key share, FinishedCONTROL03ServerHellocert, key share, FinishedSERVICE · Server — private key never leavesSERVICE04Serverprivate key never leavesDATA · CA chain — root in trust storeDATA05CA chainroot in trust storeSTREAM · App data — AEAD, forward secrecySTREAM06App dataAEAD, forward secrecy
  • ACTOR
  • SERVICE
  • DATA
  • STREAM
  • CONTROL
  • Live flow
  • Lookup / async
//In TLS 1.3 the client sends key shares in the ClientHello and the server answers with its own in the ServerHello. A hybrid group simply makes each share a concatenation: an ML-KEM encapsulation key plus an X25519 public key from the client, an ML-KEM ciphertext plus an X25519 public key from the server.

The standardised hybrid group is X25519MLKEM768 (codepoint 0x11EC). The client share is the 1,184-byte ML-KEM-768 encapsulation key followed by its 32-byte X25519 key; the server returns a 1,088-byte ML-KEM ciphertext followed by its X25519 key. Both derive the ML-KEM shared secret and the X25519 shared secret, concatenate them (64 bytes) and feed the result into the normal TLS 1.3 key schedule. An attacker must break both to recover the session keys.

  • Browsers: Chrome made X25519MLKEM768 the default in version 131 (November 2024), replacing the earlier X25519Kyber768Draft00 draft codepoint. Other major browsers have followed.
  • Libraries: OpenSSL 3.5 (April 2025) ships ML-KEM, ML-DSA and SLH-DSA and offers X25519MLKEM768 by default; Go 1.24 enables it by default in crypto/tls; BoringSSL and rustls support it.
  • SSH: OpenSSH 9.0 defaulted to the hybrid sntrup761x25519-sha512, and OpenSSH 10.0 made mlkem768x25519-sha256 the default.
  • CDNs: major CDNs negotiate it at the edge, so browser to edge is often already hybrid. Edge to origin frequently is not.
Check whether an endpoint negotiates hybrid PQbash
# OpenSSL 3.5+: offer ONLY the hybrid group, so success proves the server supports it
openssl s_client -connect api.cyart.io:443 -servername api.cyart.io \
  -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i "negotiated"
# Negotiated TLS1.3 group: X25519MLKEM768

# A failure here ("handshake failure" / no shared group) means classical-only key exchange
Origin server configurationnginx
# nginx linked against OpenSSL 3.5: prefer hybrid, keep classical fallbacks for old clients
ssl_protocols   TLSv1.2 TLSv1.3;
ssl_ecdh_curve  X25519MLKEM768:X25519:prime256v1;
iHybrid only protects TLS 1.3

The PQ groups are TLS 1.3 key shares. Clients stuck on TLS 1.2 fall back to classical ECDHE, so a TLS 1.2 floor that you never raise leaves a permanent HNDL hole.

04What to migrate first, and by when

▭On the whiteboard · Migration order4 points
01
1. key exchange for long-lived secrets
TLS (edge and origin), VPN and IPsec, SSH, service mesh mTLS carrying regulated data
02
2. long-lived trust anchors
firmware and code-signing roots, device identity roots, offline CAs that must be trusted for 10+ years
03
3. short-lived signatures
WebPKI leaf certs, JWTs, session tokens: rotated often, so a later switch is fine
04
4. stored data
check AES-256 at rest; re-wrap any DEKs that were wrapped with RSA

Signatures are less urgent for HNDL because a forged signature needs a CRQC at the time of the attack; recorded signatures cannot be retroactively abused unless they still authorise something. The exception is anything verified far in the future: a firmware root burned into a device that ships for 15 years must be PQ before the device ships.

SourceWhat it says
NIST IR 8547 (draft, 2024)Quantum-vulnerable algorithms at 112-bit security (RSA-2048, P-256) deprecated after 2030; all quantum-vulnerable public-key algorithms disallowed after 2035
NSA CNSA 2.0Software and firmware signing, and web browsers, servers and cloud services, should prefer CNSA 2.0 algorithms from 2025; national security systems complete transition by 2035
UK NCSC (2025)Discovery and planning by 2028, priority migrations by 2031, complete by 2035
  • Start from the CBOM: tag each asset with use (key exchange or signature), data lifetime and owner. Those three fields produce the migration order.
  • Find the hidden RSA: wrapped DEKs, partner SFTP keys, SAML signing certs, HSM-held code-signing keys and hard-coded TLS configs on internal services.
  • Test the network, not just the library: enable hybrid groups behind a flag and watch for handshake failures from middleboxes, old load balancers and proxies that break on large ClientHellos.
  • Ask vendors for dates: your CDN, load balancers, HSMs, VPN concentrators and KMS. Many migrations are blocked on a box you do not control.
◎Interview radar

Interviewers want to hear that you know why key exchange comes first (HNDL) and why signatures lag (size, and no retroactive risk), plus one concrete step such as enabling X25519MLKEM768 at the edge and origin. Quoting FIPS numbers matters less than reasoning with Mosca's inequality and a real inventory.

“How to say it in the room

"The live risk is harvest-now-decrypt-later, so I start with key exchange. Our CDN already negotiates X25519MLKEM768 with browsers, so I'd enable it on origin and the service mesh, behind a flag, watching handshake failures from middleboxes. In parallel the CBOM tells me where RSA and ECDH still live and how long each dataset must stay secret. Signatures come next for long-lived roots like firmware signing; short-lived certs and tokens can wait for the ecosystem. Hybrid throughout, because ML-KEM is new and X25519 is a cheap safety net."

Test yourself

Which asset is the highest post-quantum priority?

Q1Why is ML-KEM a KEM rather than a Diffie-Hellman replacement?+

Lattice schemes do not give a clean non-interactive DH. A KEM fits TLS 1.3 anyway: the client sends an encapsulation key in its share and the server returns a ciphertext in its share, one round trip as before.

Q2Why not wait for pure post-quantum and skip hybrid?+

Hybrid costs 32 extra bytes per side over pure ML-KEM and protects against an undiscovered lattice weakness or an implementation bug. Most agencies accept or recommend hybrid during the transition.

Q3Does a CDN negotiating PQ make you PQ-safe?+

Only for the browser to edge hop. Edge to origin, internal service traffic, VPNs and partner links are separate key exchanges and are often still classical.

Q4Is AES-128 broken by quantum computers?+

Not practically. Grover is a theoretical square-root speed-up that parallelises poorly. AES-256 is the conservative choice for data that must stay secret for decades.

Finished this one?
Tick it and it shows as done on the roadmap and the course.