Skip to content
CryptographyInternals

11 / 11 · Modern cryptography

Post-quantum cryptography

Lattice problems that stay hard even for a quantum computer, now standardized as ML-KEM.

Standards
FIPS 203, 204, 205 (2024)
Hard problem
Lattices, Learning With Errors
Deployed in
Hybrid TLS key exchange

A large quantum computer running Shor's algorithm would break RSA, Diffie-Hellman and elliptic-curve cryptography, which protect almost every key exchange and signature today. None exists yet, but encrypted traffic recorded now could be decrypted once one does.

Post-quantum cryptography replaces them with math problems that no known quantum algorithm solves efficiently. The leading family is built on lattices: grids of points in hundreds of dimensions, where finding the point closest to a target, or solving equations blurred by small errors, is believed to be hard.

Threat
RSA-2048today112
X25519today128
AES-128today128
AES-256today256
bits of security ·today
How it works

Shor: factoring and discrete log in polynomial time

Grover: search in √N steps, so n bits → n/2

2128 → 264 · 2256 → 2128

01 / 15 · Post-quantum

What a quantum computer breaks

Security is counted in bits: n bits means an attacker needs about 2ⁿ tries. Shor’s algorithm, on a large quantum computer, solves the math behind RSA, Diffie-Hellman and elliptic curves outright. Grover only speeds up brute force, halving the bits: AES-256 keeps 128.

Symmetric ciphers survive with longer keys; today’s public-key exchange does not, and needs replacing.

The basics: Powers of two →

How it works

  1. 1Key generation: pick a random matrix A, a secret vector s and a small error vector e. The public key is (A, b = A·s + e); without s, the noise hides it.
  2. 2Encryption: combine rows of the public key with fresh small random values, and add the message scaled up to about q/2 per bit.
  3. 3Decryption: subtract the part that depends on s. What is left is the message plus a small accumulated error, which rounding removes.
  4. 4ML-KEM wraps this in a key encapsulation mechanism: the sender encrypts a random 32-byte secret, both sides derive the shared key from it, and a re-encryption check turns tampered ciphertexts into a useless random key.

Why it holds

No quantum shortcut known
Shor's algorithm exploits the hidden periodic structure of factoring and discrete logarithms. Lattice problems have no such structure, and no known quantum algorithm solves them much faster than classical ones.
Worst-case foundations
In 2005, Oded Regev showed that solving random LWE instances is at least as hard as solving certain lattice problems in their worst case, for quantum algorithms. That is unusually strong evidence for a cryptographic assumption.
Defense in depth
Hybrid TLS keeps X25519 alongside ML-KEM, so the connection stays safe unless both break. For signatures, SLH-DSA relies only on hash functions, a hedge in case lattices ever fall.

What can go wrong

Bigger keys and messages
An ML-KEM-768 public key is 1,184 bytes and its ciphertext 1,088 bytes, against 32 bytes each for X25519. Signatures grow even more: 3,309 bytes for ML-DSA-65, against 64 for Ed25519.
Young and implementation-sensitive
Post-quantum schemes have far less history than RSA. SIKE, another candidate, was broken in 2022 with an ordinary computer, and some Kyber implementations leaked keys through timing (KyberSlash). Hybrids hedge against such surprises.