Post‑Quantum
Cryptography,
Explained.
There's a new hot topic on X this week. Its name is Post-Quantum Cryptography, and it has caused MAJOR panic.
On Nov 30, Anthropic published a quantum attack on the math behind the new encryption standards. Two days later, eight of the biggest tech companies told everyone to migrate ASAP. Half my feed says everything is broken. The other half says nothing happened. Neither is true.
I've worked on post-quantum cryptography for about 10 years, my PhD included. So here's the whole story from zero: what encryption is, why quantum computers break it, what replaces it, and what this week's news really means. Simple first, with the deeper math one click away.
The internet runs on math puzzles
RSA and elliptic curves keep your data safe because some math problems are too hard for normal computers.
Quantum computers solve those puzzles
A big enough quantum computer running Shor's algorithm would break RSA and elliptic curves completely.
We already have replacements
Since 2024 there are US standards (ML-KEM, ML-DSA, SLH-DSA) built on math that quantum computers can't shortcut, as far as we know.
Migrate now, and make it swappable
New research keeps finding cracks faster, now with AI helping. Don't panic, but don't wait, and design so you can switch algorithms quickly.
Locks, keys &
one-way math
Before we talk about quantum anything, here's what cryptography does for you every few seconds without you noticing.
Every time you open a banking app, send a WhatsApp message or see the little padlock in your browser, cryptography is doing three jobs at once:
Keep it secret
Only the right person can read the message. Everyone else sees gibberish.
Prove who sent it
You know the update really came from Apple and not from someone pretending to be Apple.
Detect tampering
If one comma changes on the way, you'll know. Nobody can quietly edit the message.
Two kinds of locks
There are two big families of encryption. The difference between them is the whole reason quantum computers matter, so it's worth getting this one right.
Symmetric encryption (like AES) is a lockbox where the same key locks and unlocks. It's fast and very strong. But it has an annoying problem: you and the other person need the same key before you start. How do you send someone a key over the internet without anyone copying it?
Asymmetric encryption, also called public-key cryptography (RSA, elliptic curves), solves that. Everyone gets a pair: a public key you can hand out to the whole world, and a private key you never share.
Think of a mailbox with a slot. Anyone walking by can drop a letter in (that's the public key). Only the owner has the key to open the box and read the letters (that's the private key).
In practice the internet uses both. Public-key crypto is slow, so we only use it at the start of a connection to agree on a fresh symmetric key. Then the fast symmetric lock (AES) takes over for the actual data. Keep this in mind, because quantum computers attack the first step, not the second.
Why can't someone just work out the private key?
The public and private keys are mathematically linked. So why can't an attacker look at the public key and calculate the private one? Because the link goes through a one-way problem: easy to compute in one direction, absurdly hard to reverse.
RSA's one-way problem is multiplication. Multiplying two prime numbers is instant. Taking the result and finding the two primes again (factoring) is brutally hard once the numbers get big.
Go deeper What about hashes and AES? Are they in trouble too? +
Mostly no, and this is good news. Hash functions (like SHA-256) and symmetric ciphers (like AES) don't rely on a neat mathematical structure that a quantum computer can exploit. The best known quantum attack on them is Grover's algorithm, which gives a "square-root" speed-up for brute-force search.
In practice that roughly halves the effective security level: AES-128 behaves more like ~64-bit security against an idealized quantum attacker, and AES-256 like ~128-bit. That's why the usual advice is simply use AES-256 and SHA-256 or bigger. And Grover is very hard to run in parallel, so even that halving is pessimistic.
The real damage is to public-key crypto: RSA, Diffie-Hellman and elliptic curves (ECDH, ECDSA, Ed25519). Those don't get weakened. They get broken.
Why a quantum
computer changes it
Quantum computers aren't just faster computers. They're good at a very specific kind of problem, and unluckily for us, RSA and elliptic curves are exactly that kind.
First, a myth
"A quantum computer tries every possible answer at the same time." Not really. If it did, it would break everything, including AES. It doesn't.
A qubit can be in a blend (a "superposition") of 0 and 1. With many qubits you get a huge blend of possibilities. The catch: when you look at the result, you only get one random answer out. The art of quantum algorithms is to make the wrong answers cancel each other out and the right ones reinforce, like waves in water, before you look.
That trick only works for problems with a hidden pattern or rhythm. Most problems don't have one. Factoring does.
Imagine a song where a drum beat repeats every N seconds, buried under a lot of noise. Listening second by second, it takes forever to find N. But a tuning device that resonates only with repeating patterns would pick up the beat almost immediately.
Shor's algorithm (1994) is that tuning device. It turns "factor this number" into "find the repeating beat in this sequence," and quantum interference finds the beat fast. Once you have the beat, the factors follow with ordinary math.
The same trick breaks the elliptic-curve problem too. So one algorithm takes out RSA, Diffie-Hellman, ECDH, ECDSA and EdDSA, which covers basically all the public-key crypto on today's internet.
| What it is | Used for | Quantum attack | Status |
|---|---|---|---|
| RSA | Key exchange, signatures, certificates | Shor | Broken |
| Elliptic curves (ECDH, ECDSA, Ed25519) | Key exchange, signatures, crypto wallets | Shor | Broken |
| Diffie-Hellman (classic) | Key exchange | Shor | Broken |
| AES-128 | Encrypting data | Grover | Weakened |
| AES-256, SHA-256/384 | Encrypting data, hashing | Grover | Fine |
| ML-KEM, ML-DSA, SLH-DSA | The new standards | None practical known | Built for this |
"But nobody has that quantum computer yet"
True. Breaking RSA-2048 needs a large, error-corrected quantum computer (people call it a CRQC, a cryptographically relevant quantum computer). Nobody has one today, and nobody knows exactly when one will exist. The day it does is nicknamed Q-Day.
So why the rush? Because of an attack that's already happening:
There's a neat way to reason about this, from the researcher Michele Mosca. Ask yourself three questions:
- x: how many years does my data need to stay secret?
- y: how many years will it take me to migrate to quantum-safe crypto?
- z: how many years until a quantum computer can break today's crypto?
If x + y > z, you already have a problem. Play with it:
Go deeper How big would the quantum computer need to be? +
Today's quantum chips have hundreds to a few thousand physical qubits, and they're noisy. Running Shor on RSA-2048 needs logical qubits, meaning error-corrected qubits that each take many physical ones to build. The estimates keep moving down as researchers find better circuits and error-correction tricks. A few years ago people talked about tens of millions of physical qubits. Newer estimates are far smaller.
That trend is the point. The finish line keeps getting closer from both sides: the hardware gets better and the algorithms get cheaper. That's why standards bodies set hard deadlines instead of waiting for a demo.
Meet the new
locks
Post-quantum cryptography (PQC) is regular software running on regular computers. It just uses math problems that quantum computers don't seem to have a shortcut for.
Post-quantum cryptography ≠ quantum cryptography. PQC doesn't need any quantum hardware. It's new math running on your phone and your servers. "Quantum cryptography" (like QKD) is a different thing that uses physics and special equipment.
In 2016 NIST (the US standards agency) opened a public competition. Cryptographers from around the world submitted 69 complete candidates, then spent years attacking each other's designs. Several fell along the way, some of them dramatically. The survivors became standards in August 2024:
Replaces: RSA / ECDH key exchange. It's how two computers agree on a secret key. This is the one that protects you against harvest-now-decrypt-later.
- Math
- Module lattices
- Speed
- Very fast
- Size
- ~1 KB keys
Replaces: RSA / ECDSA signatures. The general-purpose choice for proving who you are: certificates, software updates, logins.
- Math
- Module lattices
- Speed
- Fast
- Size
- ~2–3 KB sigs
The backup plan. Built only from hash functions, the most trusted building block we have. Bigger and slower, but its security doesn't depend on lattices at all.
- Math
- Hash functions
- Speed
- Slow to sign
- Size
- ~8–50 KB sigs
Two more are on the way: FN-DSA (formerly Falcon), a compact lattice signature, and HQC, a key exchange picked in 2025 as a backup to ML-KEM because it's built on different math (error-correcting codes). That "different math" part will matter a lot in section 05.
What on earth is a lattice?
Two of the three standards rely on lattices, so let's build some intuition.
A lattice is just a grid of points that repeats forever, like the dots on this page's background. You can describe the whole grid with two arrows (in 2D): every point is "some number of arrow A plus some number of arrow B." Those arrows are called a basis.
The key fact: the same grid can be described by nice arrows or by terrible arrows.
Directions in Manhattan: "walk 3 blocks east, 2 blocks north." Easy. Now someone gives you directions using two streets that run almost parallel: "go 4,017 steps along Diagonal Ave, then −3,998 along Slanted St." You'll end up in the right place in theory, but if you start from a random spot and ask "which intersection is closest to me?", those directions are close to useless.
In 2 dimensions you could still eyeball it. In 500+ dimensions nobody, classical or quantum, knows how to do it efficiently.
Learning With Errors, the engine inside ML-KEM
The specific lattice puzzle used by ML-KEM and ML-DSA is called Learning With Errors (LWE). It sounds fancy, but it's high-school algebra with one twist: every equation has a little bit of noise added.
Without noise it's a school exercise. With a tiny ±1 of noise, every method that "solves" the equations gives an answer the other equations reject. Scale that up to hundreds of unknowns, with all numbers wrapping around a modulus (like a clock), and you get a problem that has resisted attacks for about 20 years.
Go deeper "Module" lattices and why structure is a trade-off +
Plain LWE needs big keys, because you have to publish a huge random matrix. To shrink them, ML-KEM and ML-DSA use Module-LWE: the matrix is built from polynomials with a lot of internal symmetry, so a small seed describes the whole thing. That's why ML-KEM keys are ~1 KB instead of tens of KB.
The cost: structure is something an attacker can try to use. For years the community has watched to see whether the extra algebraic structure of "structured lattices" would give attackers a foothold that plain lattices don't. Until now, nothing practical has come of it. Keep this paragraph in mind for section 05.
Unstructured alternatives exist. FrodoKEM uses plain LWE, and Classic McEliece uses codes. Both are more conservative and much bulkier. Some European agencies (for example Germany's BSI) already recommend them for high-assurance uses.
The trade-off you'll actually notice: size
The new algorithms are fast, often faster than RSA. Where they hurt is size. Keys and signatures are much bigger, which matters for TLS handshakes, certificates, IoT devices and anything that sends lots of small messages.
Fifty years
in one scroll
The short version of the thread that started this site, plus the steps in between.
RSA is invented
Rivest, Shamir and Adleman publish the first practical public-key system. Its security rests on factoring being hard.
Elliptic-curve cryptography
Koblitz and Miller independently propose it: same security as RSA with far smaller keys. Together, RSA and ECC end up protecting most of the internet.
Shor's algorithm
Peter Shor shows a quantum computer could factor and compute discrete logs efficiently, which breaks RSA and elliptic curves. No machine exists to run it, so the world mostly shrugs.
Learning With Errors
Oded Regev introduces LWE, the problem behind most of today's lattice cryptography.
NIST opens the competition
A public, multi-year process to pick quantum-safe algorithms. 69 complete submissions in round one.
Winners announced, and a big upset
Kyber, Dilithium, Falcon and SPHINCS+ are selected. The same year, SIKE, a finalist candidate, is broken in about an hour on a laptop. A great reminder of why we test publicly and keep backups.
ML-KEM, ML-DSA and SLH-DSA become US standards
FIPS 203, 204 and 205 are published. Browsers and big platforms already start shipping hybrid post-quantum key exchange.
HQC picked as the backup KEM
A code-based key exchange is selected so we don't have all our eggs in the lattice basket.
NIST sets the end date for RSA & ECC
RSA and elliptic curves are deprecated after 2030 and disallowed after 2035.
Anthropic finds a quantum attack on structured lattices
It targets the math behind ML-KEM and ML-DSA. It's "galactic," so not a practical threat, but it lowers long-term confidence in structured lattices. Explained below ↓
Eight big tech companies: migrate ASAP
Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI and Oracle publish a joint statement backing the US government's guidance to move to NIST's post-quantum algorithms as soon as possible.
A "galactic" attack,
decoded
The headline sounds scary. Here's what it means, and what it doesn't.
A real crack in the theory
A new quantum algorithm attacking the structured lattice problems underneath ML-KEM and ML-DSA. It shows the structure we relied on to make keys small isn't as innocent as we hoped.
Not a practical break
Nobody can use it to read your traffic, today or with any machine we can foresee. ML-KEM in your browser didn't stop working. It's still far, far better than RSA against a quantum attacker.
What does "galactic" mean?
Computer scientists call an algorithm galactic when it's faster than everything else on paper, but only for inputs so enormous it would never be worth running on anything that fits on Earth (or in our galaxy). It wins the race in theory and never shows up to the real one.
Someone proves a new route from Madrid to Paris is shorter, but it only beats the highway if you're driving a truck a million kilometres long. Interesting, real, worth publishing. Not something that gets anyone to Paris faster.
So why did eight companies tell everyone to hurry up?
Because in cryptography there's an old rule: attacks only get better, never worse. Today's galactic algorithm is tomorrow's starting point. Someone will try to shave it down, and they now have a direction to push in.
And there's a new factor. This one didn't come from a decade of slow academic grinding. It came out of an AI lab. If AI is speeding up how fast we find weaknesses in math we've studied for years, then "when does the quantum machine arrive?" isn't the only clock any more. The other clock is how fast we discover problems we never saw.
This doesn't mean "stop using ML-KEM." Moving off RSA and ECC is still urgent, and ML-KEM is still the right default. It means start now, use hybrids, and make sure you can swap algorithms fast if the picture changes again.
Go deeper Why does this push towards hybrids and diversity? +
Today's best practice is hybrid key exchange: combine a classical algorithm (X25519) with a post-quantum one (ML-KEM). An attacker has to break both. If a lattice attack ever got practical, you'd still have X25519 against classical attackers. If a quantum computer shows up, you still have ML-KEM.
The second lesson is diversity of math. ML-KEM, ML-DSA and FN-DSA all use structured lattices. SLH-DSA (hash-based) and HQC (code-based) don't. News like this makes the case for having non-lattice options ready, especially for long-lived signatures like firmware and root certificates.
X25519MLKEM768) is already on by default in major browsers and CDNs, so a big chunk of web traffic is post-quantum today.What about
Bitcoin?
The question I get the most. Short version: facts, the fixes on the table, and the trade-offs.
This section explains the cryptography. It is not advice to buy, sell or hold anything, and it makes no prediction about prices.
The facts
- Bitcoin signs transactions with elliptic curves (ECDSA and, since Taproot, Schnorr, both on secp256k1). Shor's algorithm breaks both. A big enough quantum computer could work out a private key from its public key and spend those coins.
- Mining and addresses use SHA-256 and RIPEMD-160 hashes. Grover only gives a square-root speedup against those, so mining isn't the real worry. Signatures are.
- The danger depends on whether your public key is already visible on-chain. Some coins show it; many only show a hash of it until they're spent.
- A 2026 Glassnode analysis puts about 30% of all bitcoin (~6 million BTC) in outputs whose public key is already exposed. About 1.7 million BTC of that sits in early pay-to-public-key outputs, many from 2009–2010 that have never moved. Most of the rest is exposed through address reuse.
- Ethereum and most other chains use elliptic-curve signatures too, so the same problem applies. Every Ethereum account that has ever sent a transaction has revealed its public key.
The fixes on the table
- Hide the public key first. BIP-360 (Pay-to-Merkle-Root, P2MR) is a Taproot-like output type with the key-path spend removed, so the public key isn't exposed on-chain at rest. It was added to the BIP repository as a draft and is not active on the network. On its own it does not add post-quantum signatures.
- Then add post-quantum signatures. That needs a separate soft fork. Candidates include hash-based schemes like SLH-DSA and lattice schemes like ML-DSA and FN-DSA.
- Broad agreement to turn it on. Bitcoin changes need wide agreement from developers, miners, exchanges and node operators. Past upgrades like SegWit and Taproot took years.
- Everyone moves their own coins. Nobody can migrate your coins for you. Each holder has to send them to a new quantum-safe address.
- What to do with coins that never move. Some proposals would phase out old signatures after a deadline, which freezes coins that weren't migrated. Others say that breaks Bitcoin's core promise. This is the hardest debate.
- Coins are protected before any quantum computer exists.
- Time to test the new code calmly, not in a panic.
- Shrinks the pool of exposed coins an attacker could target.
- Avoids a sudden loss of trust if a breakthrough is announced.
- Signatures get roughly 10× to 120× bigger: 666 bytes (FN-DSA) to 7,856 bytes (SLH-DSA), versus 64 bytes for a Schnorr signature today. Fewer transactions fit in a block, so fees tend to rise.
- Needs a soft fork and broad consensus, which is slow and political.
- Lost or forgotten keys can never migrate, so the "freeze or not" fight can't be avoided.
- The new algorithms have far less real-world history, and this week's news is a reminder that lattices are still being studied.
Nobody can steal bitcoin with a quantum computer today. But the fix takes years of agreement plus every holder moving their own coins, so the work has to start long before Q-Day. This week's news made more people notice that.
A migration plan
that's actually doable
For engineering leads, security teams and founders. You don't need a quantum physicist. You need an inventory and a plan.
Make a crypto inventory
Find every place you use public-key crypto: TLS, VPNs, SSH, code signing, JWTs, databases, HSMs, vendors, IoT. Many teams call the result a CBOM (cryptographic bill of materials). You can't migrate what you can't see.
Rank by shelf life
Use Mosca's x + y > z. Data that must stay secret for 10+ years (health, finance, government, IP) and long-lived keys and roots of trust go first.
Turn on hybrid key exchange now
This is the cheapest, biggest win against harvest-now-decrypt-later. Modern TLS libraries, browsers, CDNs and OpenSSH already support ML-KEM hybrids. Often it's an upgrade plus a config flag.
Plan signatures carefully
Signatures are harder: bigger certificates, hardware constraints, long-lived roots. Start testing ML-DSA. Consider SLH-DSA for firmware and roots where you want maximum conservatism.
Build for agility
Put crypto behind one interface. Never hard-code algorithm names, key sizes or buffer lengths. Make sure you can rotate keys and algorithms without shipping new hardware.
Ask your vendors
"What's your PQC roadmap? Do you support hybrid ML-KEM? When will you support ML-DSA? Can we switch algorithms without a hardware refresh?" Get dates in writing.
Test the boring stuff
Bigger keys break things in silly ways: packet sizes, middleboxes, fixed-size database columns, embedded memory limits. Test early, in staging, with real traffic.
Don't roll your own implementation. Don't wait for "the final final standard." Don't drop classical crypto entirely yet (use hybrids). And don't believe vendors selling "quantum-proof" magic without naming which NIST algorithm they use.
Every acronym,
in one line
- Symmetric encryption
- One shared key locks and unlocks. Fast. Example: AES. Mostly fine against quantum (use 256-bit keys).
- Public-key (asymmetric) crypto
- A public key anyone can use plus a private key only you hold. Used to agree on keys and sign things. This is what quantum breaks.
- RSA
- 1977 public-key system based on how hard it is to factor big numbers. Broken by Shor's algorithm.
- ECC (elliptic-curve crypto)
- Smaller, faster public-key crypto (ECDH, ECDSA, Ed25519, X25519). Also broken by Shor.
- Hash function
- Turns any data into a short fingerprint. You can't reverse it or find two inputs with the same fingerprint. Example: SHA-256.
- Digital signature
- Math proof that a message came from the holder of a private key and wasn't changed.
- KEM (key encapsulation mechanism)
- A way for two parties to end up with the same secret key over a public channel. ML-KEM is one.
- Qubit
- The quantum version of a bit. It can be in a superposition of 0 and 1, and qubits can be entangled.
- Shor's algorithm
- 1994 quantum algorithm that factors numbers and solves discrete logs efficiently. Ends RSA and ECC.
- Grover's algorithm
- Quantum speed-up for brute-force search. Roughly halves the security bits of symmetric keys and hashes.
- CRQC
- Cryptographically relevant quantum computer: one big and reliable enough to break RSA-2048 or ECC in practice.
- Q-Day
- The day a CRQC exists. Nobody knows when.
- Harvest now, decrypt later
- Recording encrypted data today to decrypt it once a quantum computer exists.
- PQC (post-quantum cryptography)
- Classical algorithms designed to resist quantum attacks. Runs on normal hardware.
- QKD (quantum key distribution)
- Uses physics and special hardware to share keys. A different thing from PQC.
- Lattice
- A repeating grid of points in many dimensions. Finding short vectors or close points in it is believed hard, even for quantum computers.
- LWE (Learning With Errors)
- Solve linear equations where each one has small random noise. The core problem behind ML-KEM and ML-DSA.
- Structured / module lattices
- Lattices with extra algebraic symmetry, used to make keys small. This week's attack targets this structure.
- ML-KEM (FIPS 203)
- The standard post-quantum key exchange. Formerly Kyber.
- ML-DSA (FIPS 204)
- The standard general-purpose post-quantum signature. Formerly Dilithium.
- SLH-DSA (FIPS 205)
- Hash-based post-quantum signature. Very conservative, larger signatures. Formerly SPHINCS+.
- FN-DSA
- Compact lattice signature, formerly Falcon. Being standardized as FIPS 206.
- HQC
- Code-based KEM chosen in 2025 as a non-lattice backup to ML-KEM.
- Hybrid
- Running a classical and a post-quantum algorithm together so an attacker must break both. Example: X25519MLKEM768.
- Crypto-agility
- Designing systems so algorithms can be swapped quickly without rewrites or new hardware.
- Galactic algorithm
- Faster in theory, but only on inputs so huge it's never practical to run.
- FIPS
- US federal standards published by NIST. Where the official PQC algorithms live.
- CBOM
- Cryptographic bill of materials: an inventory of where and how your systems use crypto.
- Mosca's inequality
- If (data shelf life + migration time) > time to Q-Day, you're already exposed.
Go further
Hand-picked, from "first time hearing about this" to "I want to read the spec."
NIST Post-Quantum Cryptography project
The official home of the competition, the standards and the timeline.
CISA: Post-Quantum Cryptography Initiative
US government guidance for organizations planning their migration.
Cloudflare blog: post-quantum
Very readable posts on how PQC is being deployed across the real internet.
FIPS 203 · ML-KEM
The key-encapsulation standard.
FIPS 204 · ML-DSA
The lattice-based signature standard.
FIPS 205 · SLH-DSA
The hash-based signature standard.
NIST IR 8547 · Transition to PQC
Where the 2030 / 2035 deprecation timeline for RSA and ECC comes from.
Shor (1994): the original paper
Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer.
Regev: The Learning With Errors problem
A survey by the person who introduced LWE. The best next step after section 03.
Mosca: Cybersecurity in an era with quantum computers
Where the x + y > z way of thinking comes from.
Serious Cryptography, 2nd ed.
Jean-Philippe Aumasson's practical intro to modern crypto, with a post-quantum chapter.
Cryptography I (Dan Boneh, Stanford)
The classic free course on how cryptography works, from the ground up.
Open Quantum Safe (liboqs)
Open-source library and integrations for prototyping PQC in OpenSSL and more.
CRYSTALS (Kyber & Dilithium)
The team page behind ML-KEM and ML-DSA, with papers and reference code.
SPHINCS+
The project page behind SLH-DSA.