what on earth is post-quantum cryptography?
Why quantum computers threaten today's encryption, what replaces it, and what to do now
easy one way, hard the other.
A prime is a number only 1 and itself divide into: 2, 3, 5, 7, 11, 13 and so on.
Forwards is easy. Multiply two primes: 3 × 11 = 33. One step.
Backwards is hard. Someone gives you 33 and asks which two primes made it. All you can do is guess and check: 33 ÷ 2? No. 33 ÷ 3? Yes, so it's 3 × 11.
3,233 takes 16 guesses (it's 53 × 61). A 617-digit number would take more guesses than any computer could make before the sun burns out.
That gap, one step forwards and endless guessing backwards, is the whole trick.
rsa turns that gap into a lock.
RSA turns factoring into a pair of keys.
The public key is the big number, two secret primes multiplied together. Anyone can have it and use it to encrypt.
The private key is worked out from the two secret primes. Only you have it, and you use it to decrypt.
To get the private key from the public key, an attacker would have to factor the big number. So RSA is only as safe as factoring is hard.
count the steps, keep the remainder.
Everyone agrees on two public numbers: a starting number, and a big number to divide by.
Forwards is easy. You pick a secret number, then multiply the starting number by itself that many times; after each multiplication you keep only the remainder after dividing by the big number. The final remainder is your public key, and computers do this almost instantly, even for huge secrets.
Backwards is hard. An attacker sees your public key and wants your secret: how many times was the starting number multiplied?
With ordinary multiplying the result grows steadily, so you could home in by guessing higher or lower. Keeping only the remainder destroys that; each step lands somewhere unpredictable, so a near-miss tells you nothing and the only way is to try counts one by one.
In real systems the secret is about 77 digits long, so there are more possible secrets than atoms in the universe.
The name: "log" is the maths word for "how many times was it multiplied?", and "discrete" means we're only dealing with whole numbers and remainders.
the same idea, smaller keys.
Elliptic-curve crypto does the same thing with points on a curve instead of plain numbers.
The private key is the secret number of steps. Only you have it.
The public key is where you end up. Anyone can have it.
It's used to agree a shared secret key (key exchange) and to sign things. To get the private key from the public key, an attacker would have to solve the discrete log, so it's only as safe as that is hard.
Why curves? Same strength as RSA with much smaller keys, so it's faster. Nearly every HTTPS connection uses it today (X25519).
a quantum computer finds the back door.
To break RSA you need the two secret primes hidden inside the public number. Nobody knows a direct way to find them, and guessing takes forever.
In 1994, Peter Shor showed there's a back door: answer one particular question about the public number, and a few quick ordinary sums give you the primes.
The question is "if I build this sequence, how long before it starts repeating?" The sequence is built from the public number: multiply, keep the remainder, again and again.
On a normal computer that question is just as hopeless as guessing; the repeat is too far away to ever reach. A quantum computer can answer it quickly, and that's the only new thing it brings. It doesn't guess the primes; it answers the repeat question, and the primes follow.
Elliptic curves have the same back door, so they fall the same way. That's why both are called "quantum-vulnerable", and why the replacement is built on a different kind of maths problem, one the back door doesn't work on.
It hasn't happened yet because it needs a much bigger and more reliable quantum computer than exists today, and nobody knows when one will exist. That day is called "Q-day".
it hasn't happened yet, so why worry now?
Encrypted traffic can be copied today and kept, scrambled, until it can be unlocked. Security agencies (NSA, CISA, the UK's NCSC) tell organisations to assume this collection is already happening: "harvest now, decrypt later".
On Q-day, whoever holds those copies can work out the connection's secret key and read everything in it.
So the risk starts today, not on Q-day. Anything sent today that still matters in 10 or 20 years (think health records, contracts, source code, government data) is already exposed.
switching takes years.
The signatures in a TLS handshake, a software update or an SSH login are checked once, when they arrive; by the time anyone can forge one, that moment has passed, so there's nothing worth harvesting.
So why does this matter? The danger lies in the key that does the signing. If a quantum computer can work out a maker's signing key, an attacker can produce brand-new signatures that look exactly like the maker's. Anything that still trusts that key, like a router, a car, or a browser's list of root certificates, will accept them. And many of those keys can't just be swapped out; a router or a car shipped today will trust its maker's key for the next 15 years.
Switching takes time. The maths underpins almost everything the world depends on: banking, power grids, hospitals, phone networks, the software that runs them, the hardware they run on… you get the point.
To make matters worse, the new keys are much bigger: an X25519 public key is 32 bytes and its ML-KEM replacement is about 1,200, while an ML-DSA signature is around 2,400 bytes against 64 for ECDSA. That's enough to break things built around the old sizes.
In short: say your data has to stay secret for ten years (like health records) and switching over takes five. You needed to start fifteen years before Q-day; if it arrives any sooner, say in year ten, every copy recorded in those last few years can be read while it still matters.
equations with a little noise.
Bigger keys won't save RSA or elliptic curves; Shor's back door works at any size. The replacement needs a problem with no repeat to find at all.
The one NIST (the US standards body) picked is called Learning With Errors: take simultaneous equations, which any computer solves instantly, and add a small random error to every answer. That alone makes them practically unsolvable, because the errors pile up every time you try to combine equations.
A quantum computer doesn't help much either. There's no repeat to find, so Shor's back door doesn't exist here; the best known quantum attacks are only slightly faster than ordinary ones.
As keys, the public key is the equations and their slightly-off answers, which anyone can use to lock something. The private key is the secret numbers the equations were built from (the unknowns). With those you don't need to solve anything, so the errors stay small and the message comes out cleanly; without them, the errors pile up and bury it.
It's a type of "lattice" problem, and ML-KEM (agreeing a key) and ML-DSA (signing) are built on it, both standardised by NIST in 2024.
Plain Learning With Errors needs huge keys, so ML-KEM and ML-DSA use a shortcut that keeps them small (that's what "structured lattices" means). There's still no repeating sequence for Shor's back door, but Anthropic's papers found a different quantum attack that works by using that shortcut.
Cryptographers call it "galactic": it works on paper, but it would need far more computing than could ever exist, more even than the ordinary attacks we already know about. Still, it goes after the shortcut both standards rely on, which is why everyone is paying attention.
why move faster anyway.
Cryptographers judge an attack by how much harder it gets when keys get bigger. For a sound scheme, a slightly bigger key makes the attacker's work explode, so you can always stay ahead by growing the key a little. The claim was that this new attack's work grows more slowly than expected as keys get bigger, so "just make the keys bigger" would buy less safety against it than people assumed.
Attacks only ever get better, and AI is now speeding up the search; the gap between galactic and practical could shrink faster than it used to.
None of this changes the real deadline. The concern is still RSA and elliptic curves, which a future quantum computer is expected to break. Anything sent under them today can be recorded and read on that day, so every year spent waiting is another year of traffic exposed.
To be clear, ML-KEM and ML-DSA are still the right thing to switch to. Cloudflare says the research "does not impact the security of deployed cryptosystems," and the NSA and CISA said it doesn't "present an immediate and widespread threat." Moving faster means moving to them sooner, not away from them.
what to do.
Find out where you use RSA and elliptic curves. Most organisations don't know every place they show up: websites, internal services, certificates, devices, and the software you buy from others. You can't switch what you can't find.
Start with what has to stay secret longest. Health records, financial data, anything with a ten-year shelf life; that's what's being recorded today.
Do key exchange first. That's the part recorded traffic depends on, and it's the easiest part to fix: every major browser already supports ML-KEM. If your traffic already goes through a provider like Cloudflare, it's likely on by default and free; 73% of human traffic to Cloudflare already uses it.
Plan for signatures now, even if they come later. The hard part is keys that can't easily be changed: certificates trusted for decades, and keys built into hardware. Ask your vendors when they'll support ML-DSA, or make it a requirement, as Cloudflare is doing with its own.
Make switching easy. This week showed why. If one algorithm ever weakens, you want to be able to swap it without rebuilding everything.
The deadlines are already set. New US national-security systems must be quantum-safe from January 2027. NIST plans to phase out RSA and elliptic curves by 2030 and ban them by 2035. The UK wants key systems moved by 2031 and everything by 2035.