The one-sentence version
With Shor's algorithm, a quantum computer can factor large integers and solve discrete logarithms in polynomial time, so RSA and elliptic curves (ECC) would be broken completely; for AES and hashes, Grover's algorithm can only "halve" the security, which longer keys can absorb. Post-quantum cryptography switches to mathematical problems quantum computers aren't good at either, and the mainstay is lattices: hiding the secret behind the tiny noise in . In the language of abstract algebra, Kyber (ML-KEM) computes in the quotient ring , and its fast multiplication (the NTT) is a ring isomorphism given by the Chinese Remainder Theorem.
This article has three layers:
- The intuition: what quantum computers actually threaten, why we must switch now, and the intuition behind lattice cryptography
- Real-world use: NIST standards, real deployments in browsers, Signal, iMessage and SSH, migration timelines, blockchains
- The mathematics: lattices and SVP/CVP, LWE, Ring/Module-LWE, the full Kyber flow, NTT and CRT, hash-based signatures and worked examples
Layer 1: The Intuition
1.1 What today's cryptography rests on
Nearly every case of "strangers establishing a secure connection" relies on public-key cryptography:
| Use | Common algorithms | The underlying hard problem |
|---|---|---|
| Key exchange (HTTPS handshake) | RSA, ECDH (X25519) | Integer factorization, the elliptic curve discrete logarithm |
| Digital signatures (certificates, software updates, Bitcoin transactions) | RSA, ECDSA, Ed25519 | Same as above |
| Encrypting large amounts of data | AES | No neat mathematical structure, only brute-force search |
| Digests, commitments | SHA-256, SHA-3 | Same as above |
The security of public-key algorithms rests on one sentence: "This math problem would take a classical computer until the end of the universe." For example, factoring a 2048-bit number back into and with the best known classical algorithm (the number field sieve) takes roughly
which is completely infeasible for RSA-2048.
1.2 Shor's algorithm: RSA and ECC would be broken completely
In 1994, Peter Shor proved: a quantum computer can factor integers and solve discrete logarithms in polynomial time.
The intuition goes like this. Factoring reduces to finding the period of a function: take any and see how often
repeats. Let the period be , so . If is even, then
so is very likely a proper factor of .
A classical computer can only find the period by trying values one by one; a quantum computer can put all in "superposition" and apply a quantum Fourier transform, and the period emerges like fringes from a diffraction grating. The elliptic curve discrete logarithm is also a "hidden period" problem, falls the same way, and needs even fewer qubits than RSA.
This isn't "slower", it's "zero"
Shor's algorithm doesn't shorten cracking time from years to years; it drops from exponential to polynomial time. Lengthening an RSA key from 2048 to 4096 bits barely helps, and it can only be replaced entirely. Resource estimates keep falling: Craig Gidney's 2025 estimate is that RSA-2048 could be factored with fewer than a million noisy physical qubits in about a week. Today's largest quantum computers are still far from this, but ten years ago this number was "on the order of a billion".
1.3 Grover's algorithm: AES is only weakened
Symmetric ciphers (AES) and hashes (SHA-256) have no algebraic structure for Shor to exploit, leaving a quantum computer with "unstructured search". Grover's algorithm reduces the time to find an answer among candidates from to about :
So under quantum attack AES-128 "nominally" has only 64 bits of security left. But this is only a quadratic speedup:
- Doubling the key cancels it: AES-256 still has strength of about under quantum attack.
- Grover must run serially, and is hard to parallelize across thousands of machines the way classical brute force is, so in practice even AES-128 isn't in so much danger.
| Algorithm | Classical security | Quantum attack | Security under quantum attack | Response |
|---|---|---|---|---|
| RSA-2048 | About | Shor | Breakable in polynomial time | Switch to post-quantum algorithms |
| ECC P-256 / X25519 | About | Shor | Breakable in polynomial time | Switch to post-quantum algorithms |
| AES-128 | Grover | About (in theory) | Switch to AES-256 | |
| AES-256 | Grover | About | No change needed | |
| SHA-256 (preimage resistance) | Grover | About | No change needed |
The conclusion: what really must be replaced is public-key cryptography, namely key exchange and digital signatures.
1.4 "Harvest now, decrypt later": why we must switch now
Quantum computers haven't been built yet, so why the rush to switch in 2024? Because one attack is already happening today:
Harvest Now, Decrypt Later
Attackers are recording and storing encrypted network traffic right now. They can't decrypt it today, but once quantum computers exist in a decade or two, they can use Shor's algorithm to break that era's key exchanges and read everything.
A classic inequality (Mosca's inequality) measures the danger. Let
- : how many years your data must stay secret,
- : how many years migrating the whole system to post-quantum algorithms takes,
- : how many years until quantum computers can break RSA.
If
then you are already late. Medical records, state secrets and genomic data easily have of several decades, and large institutions often need of ten years, so even of 15 years isn't safe.
Note that the two uses differ in urgency:
- Encryption / key exchange: threatened by "harvest now, decrypt later" and the most urgent, so it is what the big companies switched first.
- Signatures: a signature only has to be secure at the moment of verification. Signatures made before quantum computers appear were trustworthy when verified, so these can switch a little later. It is a different story if, as with Bitcoin, public keys stay exposed on-chain for a long time (see 2.5).
1.5 The intuition of lattice cryptography: finding the nearest point in a high-dimensional grid
Post-quantum cryptography has several schools (lattices, hashes, codes, multivariate, isogenies), and lattice cryptography is by far the mainstay.
A lattice is a neatly arranged array of points in space. In the plane, take two vectors . All their integer combinations
form a lattice, which looks like a sheet of slanted graph paper.
A lattice can be generated by many different "bases":
- Good basis: two short, nearly perpendicular vectors, giving a neat grid.
- Bad basis: two long, nearly parallel vectors, generating the same lattice but looking like a mess.
The closest vector problem (CVP): given any point in space, find the lattice point nearest to it.
- With a good basis: round the point's coordinates to the nearest integer combination, and you are basically right.
- With a bad basis: rounding lands you far away.
In two dimensions you can do it by eye, but raise the dimension to 500 or 1000, and no one knows how to do it efficiently. The best known algorithms (classical or quantum) all need exponential time.
The basic recipe of lattice cryptography
- Private key = a good basis (or a "small" secret); public key = a bad basis (or data mixed with noise).
- Encryption: pick a lattice point (encoding the message) and add a little noise, moving it slightly off the lattice point.
- Decryption: the private-key holder can find the nearest lattice point and remove the noise; anyone else faces high-dimensional CVP.
Why can't quantum computers help? Shor's algorithm relies on algebraic structure like a "hidden period", and lattice problems have no period to exploit directly. People have looked for quantum lattice algorithms for decades, and the best give only constant-factor improvements. This is also why NIST chose lattices as the mainstay.
Layer 2: Real-World Use
2.1 The results of NIST standardization
The US National Institute of Standards and Technology (NIST) began publicly soliciting post-quantum algorithms in 2016, received 82 proposals, and after more than three rounds of public analysis published the first three official standards on August 13, 2024:
| Standard | Name | Original proposal | Use | Mathematical basis |
|---|---|---|---|---|
| FIPS 203 | ML-KEM | CRYSTALS-Kyber | Key encapsulation (replacing ECDH / RSA encryption) | Module-LWE (lattices) |
| FIPS 204 | ML-DSA | CRYSTALS-Dilithium | Digital signatures (the general first choice) | Module-LWE / Module-SIS (lattices) |
| FIPS 205 | SLH-DSA | SPHINCS+ | Digital signatures (a conservative backup) | Depends only on hash functions |
| FIPS 206 (draft) | FN-DSA | Falcon | Digital signatures (shorter) | NTRU lattices |
| FIPS 207 (planned) | HQC-KEM | HQC | Key encapsulation (a backup) | Error-correcting codes |
Where each algorithm fits:
- ML-KEM: general key exchange. Nearly all deployments use it, most often with the ML-KEM-768 parameters.
- ML-DSA: general signatures, fast and simple to implement.
- SLH-DSA: secure as long as hash functions aren't broken, with the fewest assumptions and the most conservative stance. The cost is very large signatures and slow signing. It suits uses like root certificates and firmware signing, "signed rarely and kept a long time".
- FN-DSA (Falcon): signatures and public keys are much smaller than ML-DSA's, but signing requires discrete Gaussian sampling over floating-point numbers, which is hard to make constant-time and side-channel-resistant, so its standard has lagged. It was still a draft as of October 2026.
- HQC: chosen by NIST in March 2025 as a backup to ML-KEM. It is based on error-correcting codes rather than lattices, so if lattices ever fall, a mathematically completely different scheme is available. The standard is planned to be finalized in 2027.
Size comparison (in bytes):
| Scheme | Public key | Ciphertext / signature | Comparison |
|---|---|---|---|
| X25519 | 32 | 32 | Classical ECDH |
| ML-KEM-768 | 1184 | 1088 | About 35 times bigger, but computes even faster than X25519 |
| Ed25519 | 32 | 64 | Classical signature |
| ML-DSA-65 | 1952 | 3309 | Signature about 50 times bigger |
| FN-DSA-512 | 897 | About 666 | Much smaller than ML-DSA |
| SLH-DSA-128s | 32 | 7856 | Tiny public key, very large signature |
Why "KEM" rather than "encryption"?
A KEM (Key Encapsulation Mechanism) doesn't encrypt arbitrary messages. It does one thing: both parties securely obtain the same random 32-byte shared key, then use a symmetric algorithm like AES to encrypt the actual data. This is exactly what an HTTPS handshake needs.
2.2 Why "hybrid"
Nearly all real deployments don't simply replace X25519 with ML-KEM, but use both together:
An attacker must break both at once to get :
- If quantum computers arrive and X25519 falls, ML-KEM still holds.
- If ML-KEM turns out to have a mathematical or implementation flaw, X25519 at least guarantees things are no worse than today.
This caution has been earned: in 2022, the NIST round-4 candidate SIKE (isogeny cryptography) was broken by an ordinary laptop within an hour, and the signature candidate Rainbow (multivariate) was also broken that year. New mathematical problems need time to prove themselves.
2.3 Real deployments
Browsers and TLS (HTTPS)
- Chrome: Chrome 124 in April 2024 enabled X25519+Kyber768 hybrid key exchange by default on desktop; Chrome 131 in November 2024 switched to the standardized X25519MLKEM768. Firefox and Edge followed, and Apple added hybrid ML-KEM to TLS in its 2025 system updates.
- Cloudflare: has supported post-quantum handshakes on the server side since 2022. By the end of October 2025, more than half of human traffic on Cloudflare used post-quantum key exchange; according to reports from April 2026, the share had passed 65%. Cloudflare's goal is to make authentication (signatures) fully post-quantum by 2029 as well.
Signal
- PQXDH (September 2023): adds Kyber-1024 to the initial X3DH handshake, protecting session setup.
- SPQR / the triple ratchet (released October 2, 2025): Signal's original Double Ratchet keeps updating keys as a chat goes on. SPQR (Sparse Post-Quantum Ratchet) adds another ratchet based on ML-KEM-768, and the keys from both feed into a KDF. Post-quantum protection thus covers the whole conversation, not just the start.
- A related detail: ML-KEM data runs over a thousand bytes, so Signal splits it into chunks protected by erasure coding, and it can recover even if some messages are lost, on the same principle as Reed–Solomon codes.
Apple iMessage PQ3 (February 2024, iOS 17.4)
- The initial handshake mixes Kyber-1024 and ECC, and afterwards it periodically rekeys with Kyber-768. Even if a key leaks at some moment, later messages automatically recover their security. Apple calls this "Level 3" security.
OpenSSH
- OpenSSH 9.0 (April 2022) already used
sntrup761x25519-sha512(NTRU Prime + X25519 hybrid) by default. - OpenSSH 10.0 (April 2025) changed the default key exchange to
mlkem768x25519-sha256. Version 10.1 also warns when a connection doesn't use post-quantum key exchange. - But host keys and user keys (Ed25519, RSA) are still classical signatures, because a post-quantum signature standard for SSH is still under discussion at the IETF. This again shows: switch key exchange first, signatures later.
2.4 Migration timelines
| Body | Key milestones |
|---|---|
| NIST IR 8547 (November 2024 draft) | RSA / ECC at 112-bit security: deprecated after 2030, disallowed after 2035 |
| US NSA CNSA 2.0 | National security systems: software signing, network equipment and so on prefer or use only post-quantum algorithms between 2025 and 2030, with full completion targeted around 2033–2035 |
| EU coordinated roadmap (2025) | Begin migrating by the end of 2026, complete critical infrastructure by 2030, and the rest as far as possible by 2035 |
| UK NCSC | Finish discovery by 2028, priority migration by 2031, everything by 2035 |
In short, 2035 is the nearly universal deadline for "retiring RSA/ECC".
"Crypto agility"
The biggest lesson of this migration: many systems hard-coded RSA in code, hardware and protocol formats, and changing an algorithm takes years. New systems should be designed so algorithms are replaceable.
2.5 The threat to blockchains
Blockchains are especially sensitive to quantum attacks, because signatures are ownership, and historical data is public forever.
Bitcoin
- It uses ECDSA / Schnorr signatures on secp256k1, and Shor's algorithm can compute the private key directly from the public key.
- An address is usually a hash of the public key, and hashes face only Grover, so addresses that "have only received and never spent" are relatively safe.
- The danger is in coins whose public keys are already exposed:
- Early P2PK outputs wrote the public key directly on-chain, including about a million coins believed to belong to Satoshi Nakamoto;
- Reused addresses (once spent from, the public key is public);
- Taproot (P2TR) outputs contain the public key directly.
- Even with an unexposed address, the public key is public during the few minutes between a transaction's broadcast and its confirmation, and a fast enough quantum computer could compute the private key first and issue a conflicting transaction.
- The community is discussing post-quantum address proposals such as BIP-360, but also faces a social problem: what about old coins that never migrate? Freeze them, or let "quantum miners" take them?
Ethereum
- Externally owned accounts (EOAs) are also based on secp256k1, and after one transaction the public key can be recovered from the signature.
- Account abstraction lets wallets switch to any signature algorithm, one of the main paths for Ethereum's post-quantum migration.
- At the zero-knowledge proof layer: pairing-based SNARKs (Groth16, KZG commitments) rely on the elliptic curve discrete logarithm and would be broken by Shor, while hash-based STARKs (with the FRI and Reed–Solomon codes inside them) are post-quantum secure.
Proof of work itself (SHA-256 mining) faces only Grover's quadratic speedup, and the clock speed of quantum computers is far below ASIC miners, so it isn't a problem in the short term.
Layer 3: The Mathematics
3.1 Lattices, SVP and CVP
Definition (lattice)
Let be linearly independent. The lattice they generate is where is called a basis of the lattice.
In algebraic language, a lattice is a discrete additive subgroup of rank in , isomorphic to as a -module.
The same lattice has many bases: and generate the same lattice if and only if there is (an integer matrix with determinant ) with . So doesn't depend on the choice of basis; it is the lattice's "fundamental region volume".
Two core hard problems:
- The shortest vector problem (SVP): find the shortest nonzero vector in the lattice, whose length is written
- The closest vector problem (CVP): given a target point , find minimizing .
Known results:
- The LLL algorithm (1982) finds a vector of length at most in polynomial time. The approximation factor is exponential, which is useless for cryptography.
- The BKZ algorithm can trade off the approximation factor against running time, but a polynomial approximation factor still takes time.
- Exact SVP is NP-hard under randomized reductions. No quantum algorithm currently approximates SVP to a polynomial factor in polynomial time.
What cryptography actually relies on is the hardness of SVP with polynomial approximation factors (GapSVP, SIVP).
3.2 LWE: learning with errors
Building cryptosystems directly from lattice bases (GGH, early NTRU variants) is rather inconvenient. In 2005 Oded Regev proposed an "algebraized" version: Learning With Errors (LWE).
Definition (LWE)
Take an integer and a modulus . Randomly choose a secret vector . Give samples where is uniformly random and each component of is very small (say from or a narrow discrete Gaussian).
- Search-LWE: given , find .
- Decision-LWE: distinguish from , where is uniformly random.
Why is the key? Without , is a system of linear equations, solved for in a few steps by Gaussian elimination over (a field when is prime). With a little noise added:
- Gaussian elimination amplifies the errors: each row operation multiplies them by coefficients and piles them up, quickly drowning the signal.
- From the lattice viewpoint, plus forms a lattice, and is a point very close to some lattice point. Solving LWE is solving CVP on this lattice.
Regev's theorem (2005, briefly)
If an efficient algorithm solves LWE (with suitable parameters), then a quantum algorithm approximately solves GapSVP and SIVP on -dimensional lattices in the worst case.
This "worst-case to average-case" reduction is very strong: breaking a randomly generated LWE instance means being able to solve hard problems on all lattices. RSA has no such guarantee.
From LWE to public-key encryption (Regev's scheme, encrypting one bit):
- Private key: .
- Public key: .
- Encrypt a bit : randomly choose and compute The ciphertext is .
- Decrypt: compute Because is small, output if is close to , and if close to .
- Correctness condition: .
3.3 A worked example: toy LWE encrypting one bit
Parameters
Take , and , so .
- Private key:
- Random matrix and errors:
Step 1: generate the public key. First compute :
Then add the errors:
Publish and keep secret.
What if there were no errors?
The public key would be . An attacker takes the first two equations The second gives , and substituting into the first gives , that is , which simplifies to , so and . The secret is exposed at once. With errors, the four equations are mutually "inconsistent", and elimination results are polluted by noise. At you can still enumerate all possibilities, but real is in the hundreds, and the enumeration is on the order of .
Step 2: encrypt the bit . Randomly choose , which adds samples 1, 3 and 4:
The ciphertext is .
Step 3: decrypt. With the private key, compute
The decision rule: in , the values close to are , and those close to are . is only from , so it decrypts to ✓.
Checking the theory: , and indeed
For comparison: encrypt . With the same , is unchanged and , so , close to , which decrypts to ✓.
Why is it always correct? The absolute values of the components of sum to , so for any we have , and decryption never fails. (Verified with Python by enumerating all values of and both bits.)
The scale of real parameters
In this example , and an attacker can break it by brute force. ML-KEM-768 is equivalent to , ; brute force would take operations, and the best lattice algorithm (BKZ) still takes about .
3.4 Ring-LWE and Module-LWE
Plain LWE has a big problem: the public key is too large. The matrix has elements, hundreds of thousands of numbers at , for a public key of hundreds of KB.
The idea of Ring-LWE: give structure, replacing the whole matrix with one polynomial.
Take the quotient ring
whose elements are polynomials of degree with coefficients in , simplified after multiplication with . In the language of abstract algebra, is the quotient of by the ideal :
In , "multiplying by " is a -linear map, corresponding to an matrix:
This is called a negacyclic matrix: each column is the previous one "rotated down by one", with the element wrapping to the top changing sign, because . The whole matrix is determined by numbers, so storage drops from to .
Ring-LWE
Given uniformly random and with small coefficients, distinguish from .
Why ? Take . Then
is the -th cyclotomic polynomial (its complex roots are exactly all the primitive -th roots of unity ). There are several reasons to choose it:
- It is irreducible over (for , apply Eisenstein's criterion to with ). So is the ring of integers of the cyclotomic field . Lyubashevsky, Peikert and Regev (2010) used exactly this algebraic number theory structure to reduce the hardness of Ring-LWE to worst-case hard problems on ideal lattices.
- Irreducibility matters. A counterexample: with , there is a ring homomorphism Substituting into both sides of gives . This is a small problem with just 1 unknown, and is fairly small, leaking enough information to mount an attack.
- Reduction is cheap: with , modular reduction just flips the sign of high-degree terms and adds them back to low-degree ones. Coefficients also don't swell during reduction (the "expansion factor" is small), keeping errors small.
- It suits the NTT: when (or ), factors over , and multiplication can be accelerated with the NTT (see 3.6).
Module-LWE: between the two. Ring-LWE's structure is too "full", and Module-LWE steps back a little, using a matrix of ring elements
This is LWE on the -module , hence the name. The benefits:
- The ring is fixed at , so changing only adjusts the security level, with the same NTT code throughout.
- Compared with Ring-LWE it has less algebraic structure, so in theory it is less exposed to structure-targeting attacks.
| Parameter set | Equivalent LWE dimension | NIST security level | |
|---|---|---|---|
| ML-KEM-512 | 2 | 512 | 1 (about AES-128) |
| ML-KEM-768 | 3 | 768 | 3 (about AES-192) |
| ML-KEM-1024 | 4 | 1024 | 5 (about AES-256) |
All three use and .
3.5 The flow of Kyber (ML-KEM)
Notation: and . The coefficients of "small" polynomials are sampled from a centered binomial distribution , with values in ; ML-KEM-768 has .
Key generation
- Take a random seed and expand it with SHAKE128 into the matrix (so the public key stores only the 32-byte , not the whole matrix).
- Sample small .
- Compute .
- The public key is and the private key is .
Encryption (the message is 256 bits, viewed as a polynomial with coefficients)
- Sample small and small .
- Compute
- Compress the coefficients of (keeping only the high bits), and output the ciphertext .
Decryption
Round each coefficient: close to gives , close to gives , recovering .
The derivation uses only and the commutativity of :
This has exactly the same structure as the toy example in 3.3, with "integers" replaced by "polynomials in ", encrypting 256 bits at once instead of 1.
From "encryption" to "KEM": the Fujisaki–Okamoto transform
The scheme above only resists passive attacks (IND-CPA). ML-KEM wraps it in an FO transform: the randomness for encryption is generated deterministically from a hash of and the public key; after recovering , the decrypting party re-encrypts and checks that it gets the same ciphertext, outputting a pseudorandom key if not ("implicit rejection"). This resists chosen-ciphertext attacks (IND-CCA2).
3.6 NTT: accelerating multiplication with the Chinese Remainder Theorem
The main computation in Kyber is polynomial multiplication in . Direct multiplication needs coefficient multiplications, and the NTT (number theoretic transform) reduces this to the order of . The NTT is the FFT over a finite field, and the mathematics behind it is the Chinese Remainder Theorem from abstract algebra.
The Chinese Remainder Theorem (polynomial ring version)
Let be a field and , with the pairwise coprime. Then there is a ring isomorphism Coprimality guarantees the ideals are pairwise coprime (), which is exactly the CRT's condition.
The key point: multiplication on the right side of the isomorphism is componentwise. So to compute , you can:
- Map to the right side (forward NTT);
- Multiply componentwise (cheap);
- Map back to the left side (inverse NTT).
Steps 1 and 3 can recursively split in half like the FFT, using , in levels in all.
First, a small example: .
Because , (a cyclic group of order ) contains primitive 8th roots of unity, so factors completely over . Its four roots are (for example ). So
and the isomorphism is evaluation, .
Take and . Computing directly (with , ):
Verifying by evaluation:
| Point | ||||
|---|---|---|---|---|
A perfect match. Note in passing that : isn't the zero polynomial yet vanishes on one component, so is a zero divisor in this ring. This shows isn't an integral domain, which is the same fact as " is reducible over ".
Back to Kyber: and .
- is a cyclic group of order containing primitive th roots of unity, and Kyber takes (you can verify that has order exactly and ).
- But , so there is no primitive 512th root of unity, and can't factor completely into linear factors, only into 128 quadratic ones:
where reverses the 7-bit binary representation of (just for the order of the FFT recursion). These 128 values are exactly all the roots of . By the CRT:
Going further: is irreducible over . If , then would have order , and no such element exists. So each factor is a field , and
In the NTT domain, multiplying two polynomials becomes 128 "linear polynomial multiplications modulo ":
The engineering elegance
- Kyber specifies that is sampled directly in the NTT domain, and the public key is also stored in NTT form, saving many forward and inverse transforms.
- ML-DSA uses , which satisfies , so factors completely into 256 linear factors, and the NTT splits all the way down.
- This also explains why ML-KEM is even faster than X25519: the NTT and integer arithmetic with a small modulus are very efficient on CPUs.
3.7 The signature idea of ML-DSA (briefly)
ML-DSA (Dilithium) uses "Fiat–Shamir with aborts":
- Commit: randomly choose a small and compute the high bits of .
- Challenge: , a sparse polynomial with only a few coefficients of .
- Respond: .
- Abort check: if the coefficients of are too large (which might leak information about ), discard and retry. By rejection sampling, the distribution of is independent of the private key.
The verifier checks that the high bits of equal , and that is small enough. Security rests on Module-LWE and Module-SIS (finding a short vector with ).
3.8 Hash-based signatures: from Lamport to SPHINCS+
The security of hash-based signatures depends only on the one-wayness and collision resistance of a hash function, with no algebraic structure at all. It is the most conservative approach.
Lamport one-time signatures (1979): let output 256 bits.
- Private key: random strings , for .
- Public key: their hashes .
- Sign a message : let , and for each bit reveal .
- Verify: check for all .
Forging a signature requires a hash preimage of some . But each key can be used only once: signing two messages exposes parts of both sides of the private key, and an attacker can assemble a new signature.
The line of improvements:
-
Winternitz (WOTS): handles bits at a time, using a hash chain to represent to , greatly shortening signatures.
-
Merkle trees: take one-time public keys as leaves and build a hash tree, whose root is the overall public key. A signature = a one-time signature + the authentication path from leaf to root ( hash values). The drawback is that the signer must remember which leaves were used (it is stateful); XMSS and LMS (NIST SP 800-208) are of this kind. If the state ever goes wrong (say a virtual machine snapshot is rolled back), a leaf may be reused, leaking the private key.
-
SPHINCS+ (SLH-DSA):
- Uses a hypertree (stacked layers of Merkle trees) to provide a vast number of leaves, such as or more;
- Uses a hash of the message to pick a leaf pseudorandomly, with so many leaves that collisions are nearly impossible;
- Uses FORS (a few-time signature) rather than a one-time signature at the leaves, so even an occasional collision on one leaf is still safe.
So no state needs tracking. The cost is signatures from 7.8 KB to about 50 KB, and signing much slower than ML-DSA.
Summary
| Layer | Key points |
|---|---|
| Intuition | Shor takes RSA/ECC to zero, while Grover only halves AES; "harvest now, decrypt later" makes migration urgent; lattice cryptography = finding the nearest point in high-dimensional space |
| Real-world use | FIPS 203/204/205 in 2024; Chrome, Cloudflare, Signal, iMessage and OpenSSH already use hybrid ML-KEM by default; 2035 is the retirement line for RSA/ECC |
| Mathematics | LWE: , where the noise defeats linear algebra; compresses public keys; the NTT is the CRT isomorphism |
The connection to abstract algebra
- Quotient rings:
- Irreducible polynomials: is irreducible over and reducible over ; the latter is exactly why the NTT works
- Ring homomorphisms: the evaluation map explains why can't be used
- The Chinese Remainder Theorem: the entire mathematical content of the NTT
- Zero divisors: isn't an integral domain, as in the example with
- Finite fields: each CRT component