SECURITY ENGINEERING · PART 4 · CRYPTOGRAPHY IN PRACTICE · ADVANCED · 57 OF 229

Post-Quantum Cryptography: ML-KEM and Migration

A large quantum computer would break RSA, Diffie-Hellman and elliptic curves, but not AES or SHA-256. This episode explains what is at risk and why, "harvest now, decrypt later", the NIST standards ML-KEM, ML-DSA and SLH-DSA with their real key sizes, hybrid key exchange already used in browsers and SSH, the final NIST 2030 and 2035 deadlines, and a practical migration plan built on a cryptography inventory.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 9
  9. 10
  10. 11
  11. 12
  12. 13
  13. 14
  14. 15
  15. 16
  16. 17
  17. 18
  18. 19
  19. 20
  20. 21
  21. 22
  22. 23
  23. 24
  24. 25
  25. 26
  26. 27
  27. 28
  28. 29
  29. 30
  30. 31
  31. 32
  32. 33
  33. 34
  34. 35
  35. 36
  36. 37
  37. 38
  38. 39
  39. 40
  40. 41
  41. 42
  42. 43
  43. 44
  44. 45
  45. 46
  46. 47
  47. 48
  48. 49
  49. 50
  50. 51
  51. 52
  52. 53
  53. 54
  54. 55
  55. 56
  56. 57
  57. 58
  58. 59
  59. 60
  60. 61
  61. 62
  62. 63
  63. 64
  64. 106
  65. 107
  66. 108
  67. 109
  68. 110
  69. 111
  70. 112
  71. 113
  72. 114
  73. 115
  74. 116
  75. 117
  76. 118
  77. 119
  78. 120
  79. 121
  80. 122
  81. 123
  82. 124
  83. 125
  84. 126
  85. 127
  86. 128
  87. 129
  88. 130
  89. 131
  90. 132
  91. 133
  92. 134
  93. 135
  94. 136
  95. 137
  96. 138
  97. 139
  98. 140
  99. 141
  100. 142
  101. 143
  102. 144
1 / 13

Press play to hear the narration, or step through at your own pace.

Key takeaways

  • Asymmetric breaks, symmetric holds
  • harvest now, decrypt later
  • ML-KEM and ML-DSA
  • hybrid first
  • start with an inventory

Notes

What breaks

Two quantum algorithms matter. Shor's algorithm solves the mathematical problems behind RSA, Diffie-Hellman and elliptic curves efficiently. On a large enough quantum computer it would break all of them, including the modern curves. Grover's algorithm speeds up brute-force search, but only by a square root, so AES with a two hundred and fifty six bit key still has ample strength, and SHA two fifty six is fine. The conclusion: replace asymmetric cryptography, keep symmetric.

Two quantum algorithms
  • Shor: solves factoring and discrete logarithms fast breaks RSA, Diffie-Hellman, ECDSA, X25519, Ed25519
  • Grover: speeds up brute force, but only by a square root AES-256 keeps ~128-bit strength; SHA-256 is fine
  • so: replace asymmetric, keep symmetric

How close is it

How close is it? Honestly: nobody knows. Breaking a two thousand and forty eight bit RSA key needs a large, error-corrected quantum computer, and today's machines are far too small and too noisy. Estimates range from the twenty thirties to much later. What is known is that replacing cryptography across an organisation takes ten years or more; the move away from SHA one took longer. So the planning begins before the threat is certain.

An honest status
  • breaking RSA-2048 needs a large, error-corrected quantum computer
  • today's machines are far too small and too noisy
  • estimates of "when" range from the 2030s to much later; nobody knows
  • migrations take 10+ years
  • so the planning starts now

Harvest now, decrypt

Here is why it matters today. An attacker can record encrypted traffic now and store it. Years later, with a quantum computer, they break the recorded key exchange and read everything. This is called harvest now, decrypt later. It matters for any data that must stay secret for ten years or more: health records, government and legal material, long-lived secrets. And it tells you the priority: fix key exchange first, because that traffic is being recorded already.

The real risk today
  • an attacker records encrypted traffic now and stores it
  • when a quantum computer exists, the key exchange is broken and the data read
  • matters for data that must stay secret 10+ years: health, state, legal, long-lived credentials
  • so fix key exchange first

The new standards

The replacements are standardised. In August twenty twenty four, NIST published three. ML-KEM, formerly called Kyber, is a key encapsulation mechanism: it replaces Diffie-Hellman and RSA for establishing shared keys. ML-DSA, formerly Dilithium, is for digital signatures. SLH-DSA, formerly SPHINCS plus, is a signature scheme built only on hash functions, as a conservative alternative. More are on the way. These run on ordinary computers; no quantum hardware is involved.

NIST post-quantum standards
  • FIPS 203: ML-KEM (Kyber) key establishment; replaces Diffie-Hellman and RSA key exchange
  • FIPS 204: ML-DSA (Dilithium) signatures
  • FIPS 205: SLH-DSA (SPHINCS+) hash-based signatures
  • more are on the way: FN-DSA, and HQC as a backup KEM

The cost: size

The new algorithms are fast, often as fast as elliptic curves. The cost is size. An X two five five one nine public value is thirty two bytes; an ML-KEM seven sixty eight public key is one thousand one hundred and eighty four. An E D two five five one nine signature is sixty four bytes; an ML-DSA sixty five signature is three thousand three hundred and nine. That affects handshake sizes, certificates, tokens, and small devices, and it is why signatures are migrating more slowly.

sizes in bytes
key exchange    public   ciphertext
  X25519           32        32
  ML-KEM-768     1184      1088

signatures      public   signature
  Ed25519          32        64
  ML-DSA-65      1952      3309

# speed is similar or better;
# the bytes on the wire are not

Hybrid key exchange

The deployment approach is hybrid. A TLS handshake performs both a classical X two five five one nine exchange and an ML-KEM exchange, and combines the two secrets. An attacker must break both. That protects you if the new mathematics turns out to have a flaw, which has happened to other candidates. This is already on by default in the major browsers and content delivery networks, and recent OpenSSH versions use a hybrid by default too.

Already deployed
  • X25519MLKEM768: one classical and one post-quantum exchange, secrets combined
  • safe if EITHER holds: covers a flaw in the new maths
  • on by default in major browsers and CDNs
  • OpenSSH: mlkem768x25519
  • needs TLS 1.3 and a recent library (OpenSSL 3.5+)

Deadlines

Regulators have set dates. NIST finalised its transition plan in October twenty twenty six: RSA, Diffie-Hellman and elliptic curves are deprecated after twenty thirty and disallowed after twenty thirty five, at every key size. High-value US federal systems must use post-quantum key exchange by the end of twenty thirty. The UK's security centre asks for discovery by twenty twenty eight and completion by twenty thirty five. Expect customers and auditors to ask about your plan.

Timelines to know
  • NIST IR 8547 (final, Oct 2026): RSA, DH and ECC deprecated after 2030, disallowed after 2035, at any key size
  • US federal high-value systems: PQC key exchange by end of 2030, signatures by 2031
  • UK NCSC: discovery by 2028, complete by 2035
  • expect customers to ask

Step 1: inventory

Step one of a migration is an inventory, because you cannot replace what you have not found. Where is public key cryptography used? TLS, SSH, VPNs, code signing, tokens, your internal certificate authority, key services, devices, encrypted backups. Which library and version does each use? Which data must stay secret for a decade? Which vendors do you depend on? The result is sometimes called a cryptographic bill of materials.

Cryptographic inventory
  • where is public key crypto used? TLS, SSH, VPN, code signing, JWTs, PKI, KMS, devices, backups
  • which library and version?
  • which data must stay secret for 10+ years?
  • which vendors and protocols do you depend on?
  • output: a "crypto bill of materials" (CBOM)

Step 2: migrate in order

Then migrate in order of risk. First, TLS 1.3 everywhere, updated libraries, and hybrid key exchange at the edge; for many teams that is a configuration change at the load balancer or CDN. Then SSH and VPNs. Use AES two fifty six for long-lived data. Signatures and certificates come later: plan and test, but follow the standards as they settle. Ask vendors for roadmaps. And design for agility: algorithms set in configuration, not scattered through code.

A practical order
  • 1. TLS 1.3 everywhere; update libraries; turn on hybrid key exchange at the edge
  • 2. SSH and VPN: hybrid modes
  • 3. symmetric: AES-256 for long-lived data
  • 4. signatures and PKI: plan, test, follow standards
  • 5. ask vendors for roadmaps
  • crypto agility: algorithms in config, not in code

Common mistakes

Mistakes. Waiting for a quantum computer to appear before starting, when the data is being recorded now. The opposite: panic, and ripping out working cryptography overnight. Buying a product labelled quantum-safe that uses secret or unreviewed algorithms. Confusing post-quantum cryptography, which is software, with quantum key distribution, which needs special hardware and is not what the standards recommend. Skipping the hybrid step. And having no inventory.

Avoid these
  • waiting for the quantum computer before starting
  • or panic: ripping out working crypto overnight
  • buying "quantum-safe" products with secret algorithms
  • confusing PQC with quantum key distribution (QKD)
  • pure PQC with no hybrid
  • no inventory

Say it like this

In the interview: a large quantum computer would break RSA and elliptic curves through Shor's algorithm, while AES two fifty six and SHA two remain safe. The near-term risk is harvest now, decrypt later, so I start with a cryptographic inventory and enable hybrid key exchange with ML-KEM on TLS 1.3 for external traffic. Signatures and PKI follow the NIST timelines toward twenty thirty and twenty thirty five. And I build in agility, so algorithms can be changed by configuration.

In the interview
  • "Shor breaks RSA and ECC;
  • AES-256 and SHA-2 survive.
  • The near risk is harvest now, decrypt later, so I start
  • with an inventory and hybrid
  • ML-KEM key exchange on TLS
  • 1.3, keep AES-256, plan
  • signatures to NIST timelines, and build crypto agility."

Interview questions

Q1What is post-quantum cryptography?

Cryptographic algorithms that run on ordinary computers but are designed to resist attacks by both classical and quantum computers. They replace RSA, Diffie-Hellman and elliptic curve schemes, which a sufficiently large quantum computer could break.

Q2Which algorithms would a quantum computer break?

Shor's algorithm would break schemes based on integer factoring and discrete logarithms: RSA, Diffie-Hellman, DSA, ECDSA, ECDH, X25519 and Ed25519. Symmetric ciphers and hash functions are only weakened by Grover's algorithm, so AES-256 and SHA-256 or larger remain secure.

Q3What is "harvest now, decrypt later"?

An attack in which an adversary records encrypted traffic today and stores it until a quantum computer can break the key exchange that protected it. It makes long-lived confidential data vulnerable now, and is the main reason to adopt post-quantum key exchange early.

Q4What are ML-KEM and ML-DSA?

NIST post-quantum standards published in 2024. ML-KEM (FIPS 203, derived from CRYSTALS-Kyber) is a key encapsulation mechanism for establishing shared keys. ML-DSA (FIPS 204, derived from CRYSTALS-Dilithium) is a digital signature algorithm. Both are based on lattice problems.

Q5What is hybrid key exchange?

Combining a classical key exchange such as X25519 with a post-quantum one such as ML-KEM-768 and deriving the session key from both results. The connection stays secure as long as either algorithm is unbroken, which guards against undiscovered flaws in the newer scheme.

Q6Is AES safe against quantum computers?

Yes, with a large enough key. Grover's algorithm gives at most a square-root speed-up on key search, so AES-256 retains roughly 128-bit security against a quantum attacker. AES-128 is considered weaker in this model, which is why AES-256 is recommended.

Q7What is crypto agility?

The ability to change cryptographic algorithms, key sizes and libraries quickly without redesigning systems, by keeping algorithm choices in configuration, abstracting cryptographic operations and versioning keys and ciphertext formats.

Q8What should an organisation do first to prepare for post-quantum cryptography?

Build a cryptographic inventory of where public key algorithms are used and which data needs long-term confidentiality, then prioritise: enable hybrid post-quantum key exchange on external TLS, upgrade libraries, and plan signature and PKI migration in line with NIST timelines.