Lattice cryptography explained: how ML-KEM and ML-DSA work and why they hold up
What learning with errors is, how it became the NIST post-quantum standards ML-KEM and ML-DSA, and what Anthropic's new lattice papers change for engineers.
· 7 min read
Written by AI from the sources linked below. How we use AI
On this page
In short
Lattice-based cryptography builds encryption and signatures on a problem that looks like easy algebra but turns hard once you add a little random noise: recover a secret from linear equations that are slightly wrong. It matters because the first post-quantum standards NIST published in August 2024, ML-KEM (FIPS 203) for key exchange and ML-DSA (FIPS 204) for signatures, are both built on it. In late November 2026 Anthropic published a quantum algorithm against related problems; independent reviewers say it is far too costly to threaten those standards, but it is a reminder of why this field keeps a close eye on its assumptions.
Why we need new cryptography at all
Most of today's secure connections start with a key exchange or a signature built on the difficulty of factoring large numbers or of discrete logarithms on elliptic curves. A large enough quantum computer running Shor's algorithm would solve both problems efficiently, which is why cryptographers have spent years looking for replacements whose hardness does not depend on those problems. Cloudflare says it began its own post-quantum migration in 2019, turned on post-quantum encryption for all websites and APIs in 2022, and reports that 73% of human traffic to its network is now post-quantum encrypted.
NIST ran an open, multi-year competition to pick replacements. On 13 August 2024 it released the first three finalised standards: FIPS 203 (based on CRYSTALS-Kyber, renamed ML-KEM), FIPS 204 (based on CRYSTALS-Dilithium, renamed ML-DSA) and FIPS 205 (based on SPHINCS+, renamed SLH-DSA). The first two are lattice-based. The third uses a different mathematical approach, hash functions, and NIST described it as a backup to ML-DSA. NIST's Dustin Moody said at the time: "Go ahead and start using these three."
The idea: a puzzle with noise
Start with a system of linear equations. Given enough equations, anyone can solve for the unknowns with the methods taught in school. Now change the setup in two ways. Do all the arithmetic modulo a number q, so values wrap around like a clock. And add a small random error to every equation. The problem, learning with errors (LWE), is to recover the secret from the noisy equations. Scientific American dates the introduction of LWE to 2005.
Here is a toy example. We made up these numbers for illustration and they are far too small to be secure. Work modulo 17 with a secret of two numbers, s = (3, 5). The public equations are:
- 2·s1 + 7·s2 ≈ 8
- 4·s1 + 1·s2 ≈ 16
- 6·s1 + 3·s2 ≈ 0
With the secret plugged in, the true values are 41 mod 17 = 7, 17 mod 17 = 0 and 33 mod 17 = 16, and the published right-hand sides are each off by one (+1, -1, +1). If the errors were absent, you could solve the system directly. With them, you have to guess which small errors were added, and in a real system, with hundreds of unknowns and thousands of equations, the number of possibilities explodes.
Why "lattice"? The set of all integer combinations of some basis vectors forms a regular grid of points in many dimensions. Recovering the secret from noisy equations is equivalent to finding a grid point that is unusually close to a given target point. In two or three dimensions this is easy to see by eye. In hundreds of dimensions, no efficient method is known, and that gap is what the security rests on.
From LWE to ML-KEM and ML-DSA
Plain LWE works, but its public keys are big, because you need a whole matrix of numbers. The fix is structure. Instead of individual numbers, schemes use polynomials over a ring, which pack many numbers into one object and let a whole block be multiplied quickly. That variant is Ring-LWE. The version used in the NIST standards is the module variant, Module-LWE, which Scientific American dates to 2012: it uses small vectors of ring elements, with the number of elements called the rank k. According to the Cryptography Incident Review Group (CIRG), ML-KEM and ML-DSA both fix the ring degree at n = 256 and reach higher security levels by raising the rank k.
NIST's pages tell us what each standard does:
- ML-KEM is a key-encapsulation mechanism: it lets two parties agree on a shared secret key over a public channel, which is then used with fast symmetric encryption. Its security relies on the computational difficulty of the Module-LWE problem, according to NIST. It has three parameter sets, ML-KEM-512, ML-KEM-768 and ML-KEM-1024, in increasing security strength and decreasing performance.
- ML-DSA is a digital signature scheme. Signatures detect unauthorised changes to data, authenticate the signer and can serve as evidence to a third party that the named signatory created the data. NIST says it is believed secure even against adversaries with a large-scale quantum computer. Cloudflare notes that ML-DSA depends on two lattice problems, Module-LWE and Module-SIS, while ML-KEM depends only on Module-LWE.
The trade-off is size. Lattice schemes have much bigger keys and signatures than elliptic-curve ones, which is the main engineering cost of the move. NIST says the key exchange in FIPS 203 has comparatively small keys that are easy to exchange and runs quickly.
Where the risk lives: structure
The more algebraic structure a scheme uses, the smaller and faster it gets, and the more an attacker may be able to exploit. Researchers therefore distinguish unstructured lattices (plain LWE) from structured ones (Ring-LWE and Module-LWE). Anthropic's recent papers touch exactly this line. The main result is a quantum algorithm for certain structured module-lattice problems with quasi-polynomial running time, which Anthropic and the papers call "galactic": faster in theory at huge sizes, not practical at the sizes the standards use. Anthropic's repository README says the algorithms are "not practical for the parameter sets of ML-KEM and ML-DSA".
CIRG, an independent group that received the results on 16 November, says the attack "falls far short of compromising the current NIST standards". Anthropic reports no improvement in classical attacks on mainstream lattice systems and none in quantum attacks on unstructured lattices. Our news report on the papers has the numbers.
The history is a useful sanity check. Scientific American reports that in July a preview of Anthropic's Claude Mythos model helped researchers find an attack on HAWK, a lattice-based signature scheme NIST had considered promising, which its developers then withdrew. Cryptanalysis does find weak designs; that is how standardisation filters candidates. What matters is whether a result touches the standardised parameter sets.
What this means for engineers
- Keep migrating. CIRG's first recommendation is to continue the transition to post-quantum cryptography, since delay prolongs reliance on systems breakable with fewer quantum resources. Classical RSA and elliptic-curve schemes are the ones a large quantum computer breaks outright.
- Pick the top security level you can afford. CIRG advises choosing the highest security level each application supports. For ML-KEM that means preferring ML-KEM-1024 over ML-KEM-512 where size and speed permit.
- Use hybrids. Combine a lattice scheme with one built on different mathematics, so that breaking one does not break the connection. Anthropic gives the same advice.
- Build for replacement ("crypto agility"). Make sure the algorithm is a configuration choice, not a constant baked into a protocol, so it can be swapped in a short time. CIRG lists this too.
- Watch for more standards. CIRG asks NIST to standardise more post-quantum systems with diverse designs, accepting some efficiency cost. NIST itself said in 2024 that it was evaluating additional algorithms based on a different type of math problem as backups.
Common questions
Does the news mean post-quantum encryption is broken? No. The reviewers and Cloudflare, which wrote that post-quantum cryptography "is still safe", agree the results are theoretical. Cloudflare estimates the cost against ML-DSA at about 2^x with x above 1,000, against a target of 2^128 for the smallest parameter set.
What does "galactic" mean? An algorithm that wins in the mathematical limit but would be impractically slow at any size anyone uses. Scientific American says that at real cryptographic sizes the new algorithm is slower than brute-force guessing.
Could it be improved? CIRG expects the attack to be improved in the near future and says the key open question is whether improvements would reduce the cost of attacking the NIST standards. That is why the advice is to diversify rather than to relax.
Is there anything to patch today? No. No product update is tied to this research.
Further reading
- NIST: FIPS 203, Module-Lattice-Based Key-Encapsulation Mechanism Standard (ML-KEM)
- NIST: FIPS 204, Module-Lattice-Based Digital Signature Standard (ML-DSA)
- NIST: first three finalised post-quantum encryption standards (13 August 2024)
- CIRG: Initial Assessment of Anthropic's Findings on Lattice Cryptography
- Cloudflare: Post-quantum cryptography is still safe
- Scientific American: Anthropic AI challenges the math behind quantum-safe encryption
- Anthropic's lattice papers and Lean formalisation (GitHub)
Sources
All sources are linked above under Further reading; the toy LWE example is our own illustration with made-up numbers.
Written by
The official account of the people who run audiotale.net: announcements, conversation starters and the newsroom's drafts. Posts written with AI say so. Every other account here is a real person.
Read next

Anthropic's lattice papers: quantum attack on ML-KEM math is galactic, not practical
Anthropic published four lattice-cryptography papers on 30 November; independent cryptographers and Cloudflare say no ML-KEM or ML-DSA deployment is at risk.
audiotale.net team8 min read
CIRG: 21 cryptographers launch review group as AI encryption rumours spread
The Cryptography Incident Review Group went public as rumours of an AI cryptography breakthrough circulated; the only documented result so far is a July attack on HAWK.
audiotale.net team7 min read
AlphaProof Code: DeepMind's Lean proofs of Signal's PQXDH and Triple Ratchet code
DeepMind says AI agents wrote about 6.5 million lines of Lean to verify Signal's handshake and ratchet in compiled code, with clear limits on what is covered.
audiotale.net team6 min read