secrets on the wire

explainer

Post-quantum cryptography explained

What quantum computers break and what they do not: Shor versus Grover, harvest now decrypt later, Mosca's inequality, ML-KEM, hybrid X25519MLKEM768 and ML-DSA.

Post-quantum cryptography is a set of encryption and signature methods designed to stay secure even against a large quantum computer. No such computer exists today, and nobody knows when one will, so the interesting questions are what exactly it would break, what it would leave alone, and why people are already changing browsers. This page answers each in turn and says what is known and what is only believed.

What a quantum computer breaks and what it does not

A quantum computer stores information in qubits, which carry amplitudes, numbers that can be positive or negative and can cancel each other out. A quantum algorithm steers those amplitudes so that wrong answers cancel and the right answer stays, which works only for problems with hidden structure. Two algorithms matter for cryptography.

AlgorithmYearWhat it attacksEffect
Shor1994Factoring and discrete logarithmsBreaks RSA, Diffie-Hellman and elliptic curves
Grover1996Plain brute-force guessingSpeeds the search up by a square root, so a 128-bit key offers roughly 64 bits of protection

Shor's algorithm works because factoring can be turned into finding a repeating pattern, which interference suits well. AES and hash functions do not rest on such a pattern, so they only face Grover. That is why AES-256 stays: against Grover it keeps about 128 bits of protection, and long-lived secrets are moving to 256-bit keys as a precaution.

How big a machine is needed

Today's quantum chips have roughly a hundred to a thousand noisy qubits, far too few to attack RSA-2048, which is therefore not broken. In 2025 Craig Gidney estimated that RSA-2048 would need fewer than a million noisy qubits running for under a week, about twenty times fewer than the roughly twenty million in his 2019 estimate with Martin Ekerå. The estimates keep falling, and that trend is what prompts the migration.

Harvest now, decrypt later

Recording encrypted traffic is cheap and so is storing it, so a patient attacker can record today and decrypt once a capable machine exists. A recording holds the handshake, including both public key shares, and the data encrypted under session keys that neither side ever sent. Those keys were computed from the key exchange, so whoever can undo the key exchange can recompute them.

That makes key exchange the weak link and not AES. Forward secrecy does not help here, because it protects against a stolen server key, and a quantum computer does not need that key when it can solve each recorded exchange directly. Signatures can wait a little: a forged signature only helps an attacker who has the machine at the moment of the attack, so there is no stockpile of old signatures to exploit. The exception is anything signed to be trusted for years, such as firmware.

Mosca's inequality

Whether harvesting hurts you depends on timing, and a simple comparison called Mosca's inequality captures it. Let x be how long the data must stay secret, y how long your migration will take, and z how long until a capable machine exists. If x + y > z, data you send today will still be sensitive when the machine arrives. Health records that must stay secret for 25 years are already 18 years late if migration takes five years and the machine arrives in twelve, since 25 + 5 − 12 = 18.

Lattices and ML-KEM

The replacements need a hard problem with no repeating pattern for Shor to find. The leading candidates come from grids of dots. A lattice is a regular grid of dots, like tilted graph paper with a dot at every crossing. Two arrows, called the basis, build the whole grid: walk some whole number of steps along each and you reach every dot.

Now place a target away from the dots and ask which dot is closest. With short, nearly perpendicular arrows, simple rounding finds the answer at once. With long, skewed arrows describing the same grid, rounding lands far off. In lattice cryptography the tidy basis plays the role of the private key and the skewed one the public key. The version used in practice has hundreds of dimensions, and no known method, ordinary or quantum, finds the closest dot quickly.

ML-KEM is the NIST standard built from this idea (FIPS 203), and it adds a little random noise to the points. The browser makes a fresh key pair and sends the public half, called the encapsulation key. The server uses it to wrap a new random secret and sends back the ciphertext. Because the key pair is new for every connection and deleted afterwards, this keeps forward secrecy.

Hybrid key exchange: X25519MLKEM768

ML-KEM is young, so browsers do not rely on it alone. They run X25519 and ML-KEM-768 side by side and mix both secrets into the session key, in a combination called X25519MLKEM768. A quantum computer breaks X25519 but not ML-KEM, and a flaw found in ML-KEM would leave X25519 standing against today's computers, so an attacker needs something that defeats both.

The price is size. The browser's key share grows from 32 bytes to 1,216, which is 32 for X25519 plus 1,184 for ML-KEM. The server's reply grows to 1,120 bytes, 32 for X25519 plus 1,088 for the ML-KEM ciphertext. Chrome and large content-delivery networks already negotiate this hybrid, as part of the TLS 1.3 handshake.

Post-quantum signatures and Merkle Tree Certificates

The bank's certificate and signature still use RSA or ECDSA, and replacing them is harder. ML-DSA is NIST's standard post-quantum signature scheme (FIPS 204), and its main drawback is size. An ML-DSA-65 signature is 3,309 bytes and its public key 1,952 bytes, against about 64 bytes each for ECDSA on the P-256 curve. A handshake carries three signatures and two public keys, which come to about 1.3 kilobytes with RSA-2048 and about 13.8 kilobytes with ML-DSA-65, roughly ten times more on every connection.

Merkle Tree Certificates avoid most of that cost by making one signature serve many certificates. The certificate authority hashes many certificates, hashes those results in pairs up a tree, and signs only the single hash at the top. Each certificate then travels with the sibling hashes along its path, so the browser can recompute the top hash and compare it with the signed one. A million certificates need a proof of only about twenty hashes, and changing a certificate makes the recomputed hash fail to match. On 3 December 2026 the Chrome Security Team said Chrome will support Merkle Tree Certificates, expected very early in 2027, and intends to stop trusting CA keys that use ECDSA P-256 from 15 March 2027.

What is known and what is only believed

There is no public evidence that RSA, elliptic curves or the new post-quantum schemes are broken today, and none that AI can break them. Every lock in this story rests on a problem people believe is hard, and nobody has proved that any of them is. The cautionary tale is SIKE, a compact post-quantum key exchange that reached the last round of NIST's competition. In July 2022 Wouter Castryck and Thomas Decru published an attack that recovered SIKEp434 keys in about 62 minutes on a single processor core, with no quantum computer involved, and a later version took about ten minutes.

That is why hybrid modes exist, and why systems need crypto agility, which means being able to replace an algorithm without redesigning the system. In practice that means running hybrids, keeping keys and certificates short-lived, and keeping an inventory of where each algorithm is used.

Go deeper

The interactive story walks through the same ideas one slide at a time, with a small figure on most slides. These links open it at the matching slide.

Open the story at the matching slide

Related pages