RSA and elliptic curves rest on factoring and discrete logarithms, two problems a large quantum computer could solve quickly with Shor's algorithm. NIST's replacements rest on different maths: noisy equations over lattices, hash functions, and error-correcting codes. No known quantum algorithm solves these fast. This page explains the idea behind each one, without assuming a maths degree.
Four post-quantum standards are approved today. Two more are selected but not yet published as drafts (as of December 2026). A KEM agrees a shared secret key; a signature proves who sent something. RSA, elliptic curves and the other classical algorithms are covered below.
| Algorithm | Standard | Job | Hard problem | Status |
|---|---|---|---|---|
| ML-KEM (Kyber) | FIPS 203 | Key exchange (KEM) | Module Learning With Errors (lattice) | Approved 2024 |
| ML-DSA (Dilithium) | FIPS 204 | Signature | Module-LWE and Module-SIS (lattice) | Approved 2024 |
| SLH-DSA (SPHINCS+) | FIPS 205 | Signature | Security of a hash function | Approved 2024 |
| LMS, XMSS | SP 800-208 | Signature (stateful) | Security of a hash function | Approved 2020 |
| FN-DSA (Falcon) | FIPS 206 (planned) | Signature | Short vectors in NTRU lattices | Draft pending |
| HQC | FIPS 207 (expected) | Key exchange (KEM) | Decoding random quasi-cyclic codes | Draft pending |
Security categories: NIST rates parameter sets from 1 to 5 by comparison with attacks on symmetric primitives. Category 1 is as hard as finding an AES-128 key, 3 as AES-192, 5 as AES-256; 2 and 4 match finding SHA-256 and SHA-384 collisions.
These are what nearly all of today's internet runs on, and NIST still approves them. They all rest on two problems, factoring and discrete logarithms, that Shor's algorithm solves on a large quantum computer. NIST plans to deprecate them after 2030 and disallow them after 2035.
| Algorithm | Standard | Job | Hard problem | Against a quantum computer |
|---|---|---|---|---|
| RSA | FIPS 186-5, SP 800-56B | Signature, key transport | Factoring | Broken by Shor |
| ECDSA, EdDSA | FIPS 186-5, SP 800-186 | Signature | Elliptic-curve discrete logarithm | Broken by Shor |
| ECDH | SP 800-56A | Key agreement | Elliptic-curve discrete logarithm | Broken by Shor |
| Diffie–Hellman (finite field) | SP 800-56A | Key agreement | Discrete logarithm modulo a prime | Broken by Shor |
| AES | FIPS 197 | Encryption | Key search | Stays (Grover only) |
| SHA-2, SHA-3, HMAC | FIPS 180-4, 202, 198-1 | Hashing, message authentication | Preimages and collisions | Stays (Grover only) |
DSA, the original Digital Signature Algorithm, is no longer approved for creating signatures since FIPS 186-5 (2023); it remains only for verifying old ones.
Pick two large secret primes p and q and publish their product n = p·q, along with a public exponent e. The private exponent d is chosen so that e·d ≡ 1 modulo (p−1)(q−1), which anyone can compute only if they know p and q.
A worked example with toy numbers: p = 61, q = 53, so n = 3233 and (p−1)(q−1) = 3120. With e = 17, the private key is d = 2753. Encrypting m = 65 gives 6517 mod 3233 = 2790, and 27902753 mod 3233 gives back 65. Real keys use primes over 300 digits long, and the best classical factoring method (the number field sieve) still needs time that grows almost exponentially with the size of n.
Two parties agree a public prime p and base g. Each picks a secret, a and b, and sends ga and gb modulo p. Each then raises what it received to its own secret, and both arrive at gab. An eavesdropper sees ga but would need a itself: the discrete logarithm problem.
An elliptic curve is the set of points satisfying an equation like y2 = x3 + ax + b over a finite field. There is a rule for "adding" two points to get a third, so you can multiply a fixed base point G by a whole number k:
Computing Q from k takes a few hundred point additions (double and add). Going back from Q to k is the elliptic-curve discrete logarithm problem, and no shortcut like the number field sieve is known for it. That is why a 256-bit curve matches a 3,072-bit RSA key, and why elliptic curves took over: ECDH (often X25519) for key agreement, and ECDSA and EdDSA (Ed25519) for signatures.
Factoring and discrete logarithms share a hidden structure: both reduce to finding the period of a repeating function, such as ax mod n. A classical computer has to try values one by one. A quantum computer can evaluate the function on a superposition of all inputs at once and then apply a quantum Fourier transform, which makes the period stand out, like a prism splitting light into a frequency. Peter Shor showed in 1994 that this runs in polynomial time: doubling the key size only multiplies the work by a small factor, instead of making it astronomically harder.
Bigger keys therefore do not help. The open question is only when a large enough, error-corrected machine exists. Craig Gidney's 2025 estimate put RSA-2048 within reach of under a million noisy qubits running for less than a week, about 20 times fewer than his 2019 estimate. Elliptic curves likely fall sooner than RSA of the same classical strength, because their smaller numbers need fewer qubits.
The lattice, hash and code problems in the rest of this page have no such periodic structure that a quantum computer can exploit, as far as anyone knows.
From NIST IR 8547, the transition plan published as a draft in November 2024. Agencies and regulators in many countries have adopted similar or earlier dates; see the roadmaps.
A lattice is a regular grid of points in many dimensions, every whole-number combination of a few starting vectors. In two dimensions it looks like wallpaper. In 500 or more dimensions, two questions become very hard: find the shortest non-zero point (the Shortest Vector Problem), and find the lattice point closest to a given spot (the Closest Vector Problem). The best known algorithms, classical or quantum, take time that grows exponentially with the dimension.
Cryptographers rarely use lattices directly. They use an equivalent puzzle called Learning With Errors (LWE), introduced by Oded Regev in 2005. Take a secret vector s, a public random matrix A, and a vector of small random errors e. Publish:
Without the errors, anyone could recover s from A and b with school algebra (Gaussian elimination). The small noise makes it hopeless: every equation is slightly wrong, and the errors compound when you try to eliminate. Recovering s turns out to be as hard as worst-case lattice problems.
Plain LWE needs a big matrix, so keys would be hundreds of kilobytes. The standards replace single numbers with polynomials of degree below 256, multiplied modulo X256 + 1 and with coefficients modulo a prime q. One polynomial carries 256 numbers, so a small matrix of polynomials (say 3 × 3) stands in for a huge matrix of numbers. This is Module-LWE. Multiplication uses the Number Theoretic Transform, a whole-number cousin of the Fast Fourier Transform, which is a big part of why ML-KEM is faster than elliptic-curve key exchange in most benchmarks.
This is Regev's original scheme with tiny numbers: 4 secret values, 8 noisy equations, modulus 97. It encrypts one bit. Turn up the noise to see when decryption starts to fail. Real schemes use 256-coefficient polynomials and are tuned so failure is practically impossible.
Loading…
The main post-quantum key exchange, derived from CRYSTALS-Kyber. Browsers, CDNs and SSH already use it, usually combined with X25519 as X25519MLKEM768 so the connection stays safe if either half holds.
encode places each bit of m at 0 or about q/2. The shared key is a hash of m and the ciphertext.A Fujisaki–Okamoto transform wraps this basic encryption: the receiver re-encrypts m and checks it gets the same ciphertext. That blocks attacks that feed in tampered ciphertexts and watch what happens, which is the security property known as IND-CCA2.
Reading s from t, or m from the ciphertext, means solving Module-LWE. The parameter sets differ only in the module size k: a 2 × 2, 3 × 3 or 4 × 4 matrix of polynomials.
The main post-quantum signature, derived from CRYSTALS-Dilithium. It uses the same kind of polynomial ring as ML-KEM, with a larger modulus.
The public key is t = A·s1 + s2 with small secrets s1, s2. (Only the high bits of t are published to save space.) To sign a message:
The abort step is the clever part. Without it, the distribution of z would lean towards c·s1, and many signatures would leak the secret. Rejecting the outliers makes z look uniformly random in a box, independent of s1. On average it takes about four attempts.
Verifying: compute A·z − c·t. That equals w − c·s2, which has the same high bits as w, so the verifier can recover w1 (with the hint), re-hash, and check the result equals c.
Recovering the key from t is a Module-LWE problem. Forging a signature without the key means finding a short vector that satisfies the verification equation, which is a Module-SIS (Short Integer Solution) problem.
A hash function such as SHA-256 turns any input into a fixed-size fingerprint, and it is easy to compute but practically impossible to reverse. Quantum computers only speed up attacks on hashes modestly (see AES and SHA), so signatures built only from hashes rest on the most conservative assumption in cryptography.
For each bit of the message hash, generate two random secrets, one for 0 and one for 1. Publish the hashes of all of them as the public key. To sign, reveal the secret that matches each bit. The verifier hashes each revealed value and compares. It is secure, but only once: a second signature reveals more secrets and lets an attacker mix and match.
Instead of one secret per bit, take one secret per group of bits (say 4 bits, a value from 0 to 15) and hash it repeatedly to form a chain. The public key is the end of each chain; the signature is the point partway along that encodes the value. A checksum stops an attacker from moving further along a chain. This is the WOTS+ scheme used inside all the standards below.
Generate many one-time key pairs and hash their public keys together, in pairs, up a binary tree. The root becomes the single public key. A signature contains a one-time signature plus the "authentication path" of sibling hashes that leads from that leaf to the root.
The stateless hash-based signature, derived from SPHINCS+. It is the hedge in case lattice problems turn out to be easier than believed.
A plain Merkle tree forces the signer to remember which one-time keys are used. SLH-DSA avoids this by making the tree astronomically large and choosing a leaf pseudo-randomly from the message, so reuse is vanishingly unlikely. Three layers make that work:
The cost is size and speed: signatures are 8 to 50 KB, and signing is slow. The "s" (small) parameter sets trade signing time for size, and the "f" (fast) sets do the reverse. There are 12 parameter sets in all, using either SHA-2 or SHAKE.
Stateful hash-based signatures: a Merkle tree of Winternitz one-time keys, exactly as in the primer above, optionally stacked into a few levels. NIST approved them in 2020, before the other standards, and CNSA 2.0 requires them early for firmware and software signing.
Each one-time key must be used once only, so the signer has to keep a counter and never roll it back. Restoring a backup, cloning a virtual machine or running two signers from one key can reuse a leaf and let an attacker forge signatures. For that reason SP 800-208 requires keys to be generated and used inside a hardware cryptographic module, and these schemes suit tightly controlled uses such as signing firmware, not general use.
In return they are small and fast compared with SLH-DSA, and their security depends only on the hash function.
Derived from Falcon. NIST selected it in 2022 for its very small signatures. The draft standard was not public as of December 2026; final publication is expected around 2027.
Falcon uses NTRU lattices. The secret key is a pair of small polynomials f, g; the public key is their ratio
which looks random. The small f and g form a "trapdoor": a short, good basis for a lattice whose public description is a long, bad basis.
The close point has to be chosen randomly from a carefully shaped (Gaussian) distribution; a naive choice leaks the secret basis. Falcon does this with "fast Fourier sampling", which uses floating-point arithmetic. Getting that constant-time and identical on every platform is hard, which is a main reason FN-DSA is taking longer to standardise and is the trickiest of these algorithms to implement safely.
Hamming Quasi-Cyclic, selected in March 2025 as a backup to ML-KEM. It uses completely different maths, so a breakthrough against lattices would not affect it. NIST has said it expects a draft first and a final standard in 2027.
Error-correcting codes let a phone or a QR code recover data after some bits are flipped, by adding structured redundancy. Decoding is easy if you know the code's structure, but for a random code, finding which few bits were flipped (the syndrome decoding problem) is believed to be hard for classical and quantum computers alike. Code-based cryptography has been studied since McEliece in 1978.
HQC works with long binary vectors, multiplied as polynomials so that the codes are quasi-cyclic (which keeps keys small). It mirrors the LWE idea, with "sparse" (few ones) in place of "small":
The receiver computes v − u·y. The big terms cancel, leaving encode(m) plus a sparse error. A public, efficiently decodable code (a concatenated Reed–Muller and Reed–Solomon code) then removes the errors to recover m. Like ML-KEM, HQC wraps this in a Fujisaki–Okamoto transform.
Keys and ciphertexts are a few times larger than ML-KEM's, and it is slower, so it is a backup rather than a replacement.
Post-quantum keys and signatures are far bigger than today's. A TLS handshake sends several signatures and public keys, so certificate chains grow from about a kilobyte to tens of kilobytes. That is why the web is moving to Merkle Tree Certificates instead of putting ML-DSA straight into today's certificate chains.
Public key plus ciphertext. Orange bars are post-quantum. HQC and FN-DSA figures are from their submissions.
Symmetric ciphers and hash functions are not broken by Shor's algorithm. The relevant quantum attack is Grover's algorithm, which searches N possibilities in about √N steps. On paper that halves the security level in bits, so AES-128 would offer roughly 64-bit security against a quantum key search.
In practice Grover's steps must run one after another on an error-corrected machine and cannot be split up efficiently, so NIST considers AES-128 adequate and uses it as the benchmark for category 1. Policies that want a margin, such as the NSA's CNSA 2.0, require AES-256 and SHA-384 or SHA-512. Either way, migration work is about public-key cryptography: key exchange, signatures and certificates.