I plugged ML-KEM's real numbers into Anthropic's lattice theorems
Is ML-KEM secure after Anthropic's lattice papers? Yes. The quantum attack's Lean theorems need q above 33,792 or n of 2^29. ML-KEM uses 3329 and 256.
By Meet ModiThe Lean theorem in Anthropic's new lattice repository that covers schemes shaped like ML-KEM starts at a ring degree of 536,870,912. ML-KEM's ring degree is 256. That gap, a factor of about two million, is most of what you need to know about the scariest-sounding cryptography news of the year.
So, is ML-KEM secure? Yes, as far as anyone can say on December 1, 2026. Anthropic published a quantum algorithm that attacks the math under ML-KEM and ML-DSA faster as the parameters grow, but the papers, the Cryptography Incident Review Group and Cloudflare all say it is not practical at the sizes the standards use. I took the formal statements, put ML-KEM's actual numbers into them, and also checked what using the bigger ML-KEM-1024 costs in practice.
What Anthropic published about lattice cryptography
There is no launch post. The release is a folder in anthropics/formal-math, merged on November 30 at 14:47 Pacific. Its README is short and unusually blunt: "The results were discovered by an internal research Claude model. The formalization was written by AI models." And: "Research artifact. Not maintained and not accepting contributions."
The four papers are 283, 114, 95 and 49 pages. The first one, "Galactic quasi-polynomial quantum algorithms for integral and module lattices", is the one everyone is talking about. The other three are reductions between lattice problems, plus a public-key encryption scheme built on one of them. The Lean side states 132 main theorems and 190 intermediate ones, proves them from Mathlib and three standard axioms, and checks the result with two independent kernels.
- Aug 13, 2024NIST publishes FIPS 203, ML-KEM: ring degree n = 256, modulus q = 3329, rank 2, 3 or 4.
- Jul 28, 2026Anthropic's Frontier Red Team publishes a classical key recovery attack on HAWK, a signature candidate, cutting the HAWK-256 cost estimate from about 2^64 to about 2^38.
- Nov 16, 2026Anthropic shares the lattice results with several members of the Cryptography Incident Review Group (CIRG).
- Nov 30, 2026The papers and the Lean project go public in anthropics/formal-math. CIRG publishes its initial assessment the same day.
- Dec 1, 2026Cloudflare publishes "Post-quantum cryptography is still safe".
Does Anthropic's quantum attack break ML-KEM
No. The CIRG statement puts the running time at n^(poly(k) log n) for module lattices of rank k over power-of-two cyclotomic rings of degree n. For a fixed rank that is n^O(log n): slower than polynomial, much faster than exponential. As n grows, that beats every known attack. At the sizes actually deployed, it loses badly. CIRG's footnote says that even 2^1000 quantum operations "would be far below its cost for the smallest parameter sets (ML-KEM-512 and ML-DSA-44)".
The reason is in where ML-KEM gets its security. All three parameter sets use the same ring degree, n = 256. ML-KEM-512, 768 and 1024 differ in rank: 2, 3 and 4 copies of that ring. The new algorithm's advantage shows up as n grows, and its cost grows fast with rank. CIRG says the same in its own words: the speedup applies as n grows, while ML-KEM and ML-DSA "reach higher security levels by increasing the number of components (the rank k) while keeping n=256 fixed."
Cloudflare's post adds the hardware side: a straightforward implementation needs "at least billions of logical quantum bits", against machines today with "of the order of thousands of qubits". For ML-DSA they put the cost at 2^x for x above a thousand, where the target is 2^128. Their conclusion: "quantum computers are far more likely to break elliptic curves and RSA before lattices."
What did not happen matters as much. CIRG reports that Anthropic found no improvement in classical attacks on mainstream lattice schemes, structured or not, and no quantum improvement on unstructured lattices. Paper 1 says of itself that it gives "no sub-exponential bound for LWE and SIS" without the module structure. If you were asking whether lattice-based cryptography is quantum resistant, the honest answer got slightly more complicated for the structured kind and slightly better for the unstructured kind.
I tried ML-KEM's parameters against the Lean theorems
The nice thing about a formal release is that the claims are written down exactly. PaperDefs/P01/Cases.lean has short versions of the main results. Two of them matter here. ModuleLWETheorem says one quantum program recovers the secret for square Module-LWE, for every rank, for powers of two n "large enough", for moduli q from 11 · rank · noise² · n up to 2^n. MLKEMLike.KeyRecoveryInFamiliesTheorem says one program recovers keys for the ML-KEM parameter sets carried to bigger rings, for n ≥ 2^29 and primes q from 13n to 2^n.
ML-KEM's numbers are in FIPS 203 and in the same Lean file: n = 256, q = 3329, and secret and error coefficients bounded by η1, which is 3 for ML-KEM-512 and 2 for the other two. So I wrote fifteen lines of Python to plug them in:
$ python3 bounds.py
q = 3329 = 13*256+1 ? True
ModuleLWETheorem needs 11*rank*noise^2*n <= q <= 2^n
ML-KEM-512: rank=2 noise=3 lower bound=50688 q=3329 inside? False lower bound / q = 15.2x
ML-KEM-768: rank=3 noise=2 lower bound=33792 q=3329 inside? False lower bound / q = 10.2x
ML-KEM-1024: rank=4 noise=2 lower bound=45056 q=3329 inside? False lower bound / q = 13.5x
ModuleLWETheorem time bound 2^(c*rank^8*log2(n)^2), log2(256)=8
ML-KEM-512: 2^(16384*c)
ML-KEM-768: 2^(419904*c)
ML-KEM-1024: 2^(4194304*c)
MLKEMLike.KeyRecoveryInFamiliesTheorem: n >= 2^29, time 2^(c*log2(n)^2)
smallest n covered = 536,870,912, ratio to 256 = 2,097,152x, time at that n = 2^(841*c)
primes q in [13n, 2^n] at n=2^29 start at 13*2^29 = 6,979,321,856Three things come out of that. First, ML-KEM's modulus is outside the square Module-LWE theorem for all three parameter sets, by a factor of 10 to 15. Second, even ignoring that, the theorem's own time bound at n = 256 is 2 to the power of tens of thousands to millions, times an unnamed constant c. It only promises anything for n "large enough" anyway. Third, the ML-KEM-shaped key recovery theorem starts at n = 2^29, two million times ML-KEM's ring.
Be fair about that last one. Anthropic's list of departures says the 2^29 thresholds are ones "that the paper leaves unnamed". The formalization picked a point where the proof goes through. It is not a proof that the attack fails below it. The paper itself gives a more direct number: for ML-KEM-512, some of the lattices the algorithm has to sample from have rank above n^(52·5²), which is 2^10400. A number with 3,131 digits, as the dimension of one intermediate lattice. The target security for ML-KEM-512 is about 2^128 operations.
What I did not do: build the Lean project. The README asks for 12 cores, 12 GB of memory, 21 GB of disk and a little over an hour, plus up to 60 more minutes per comparator run. The machine I ran this on had 2 cores. So I am trusting that the statements I read are the ones that were proved, which is exactly the trust the README tells you to place.
ML-KEM-768 vs ML-KEM-1024: what the bigger one costs
CIRG's practical advice is to "choose the highest security level each application can support". For ML-KEM that means ML-KEM-1024 instead of 768. Since the attack's cost grows with rank, more rank is the right direction. Here is the bill, from OpenSSL 3.5.5:
$ openssl genpkey -algorithm ML-KEM-1024 -out k.key
$ openssl pkey -in k.key -pubout -outform DER -out k.pub.der
$ openssl pkeyutl -encap -inkey k.pub.der -keyform DER -pubin -out k.ct -secret k.ss
$ openssl pkeyutl -decap -inkey k.key -in k.ct -secret k.ss2
ML-KEM-768 pubkey-DER=1206 ciphertext=1088 secret=32 match=yes
ML-KEM-1024 pubkey-DER=1590 ciphertext=1568 secret=32 match=yes
$ openssl speed -seconds 2 -kem-algorithms ML-KEM-768 ML-KEM-1024 X25519
keygen encaps decaps keygens/s encaps/s decaps/s
X25519 0.000043s 0.000085s 0.000040s 23521.6 11743.7 25062.0
ML-KEM-768 0.000050s 0.000035s 0.000052s 20129.0 28558.3 19378.0
ML-KEM-1024 0.000074s 0.000046s 0.000069s 13453.3 21534.0 14532.0The DER wrapper adds 22 bytes, so the raw public keys are 1,184 and 1,568 bytes. Going to 1024 costs 384 more bytes of public key, 480 more of ciphertext, and a third to a half more time per operation, all still in tens of microseconds on one core of an AMD EPYC 7763. In a TLS handshake against a local server, the bytes add up like this:
$ echo | openssl s_client -connect 127.0.0.1:8443 -groups $GROUP -tls1_3
X25519 read 756 bytes and written 306 bytes
X25519MLKEM768 read 1857 bytes and written 1482 bytes
SecP384r1MLKEM1024 read 2402 bytes and written 1931 bytesAround 450 extra bytes from the client compared with the 768 hybrid. On your own services, where you control both ends, that is cheap.
Can you use ML-KEM-1024 in TLS today
On the public web, mostly not. OpenSSL 3.5 knows SecP384r1MLKEM1024 as a TLS group (X448MLKEM1024 exists as a KEM but openssl refuses it as a TLS group). I offered each site only that group, then only X25519MLKEM768, the same way as in my post-quantum TLS check:
$ echo | openssl s_client -connect cloudflare.com:443 -servername cloudflare.com \
-groups SecP384r1MLKEM1024 -tls1_3 2>&1 | grep -E "alert|Negotiated"
...:ssl/tls alert handshake failure:../ssl/record/rec_layer_s3.c:918:SSL alert number 40
Negotiated TLS1.3 group: <NULL>
# same test, December 1, 2026
cloudflare.com X25519MLKEM768 ok SecP384r1MLKEM1024 alert 40
www.google.com X25519MLKEM768 ok SecP384r1MLKEM1024 alert 40
www.anthropic.com X25519MLKEM768 ok SecP384r1MLKEM1024 alert 40
www.modimeet.com X25519MLKEM768 ok SecP384r1MLKEM1024 alert 40
github.com X25519MLKEM768 alert 40 SecP384r1MLKEM1024 alert 40Every edge I tried that does post-quantum TLS does it with ML-KEM-768 and refuses the 1024 hybrid. This site included. So for anything behind a CDN, the highest level your application can support is set by the CDN, and today it is 768. Behind it, between your own services, you can pin the bigger one. Node 22 does it with the ecdhCurve option:
import tls from "node:tls";
const s = tls.connect({
host: "127.0.0.1", port: 8444, rejectUnauthorized: false,
ecdhCurve: "SecP384r1MLKEM1024", minVersion: "TLSv1.3",
}, () => console.log("connected", s.getProtocol(), s.getEphemeralKeyInfo()));
// node 22.23.5, openssl 3.5.9
// SecP384r1MLKEM1024 -> connected TLSv1.3 {}
// X25519 -> ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILUREIt connects, and then getEphemeralKeyInfo() returns an empty object, the same Node 22 blind spot as in that earlier post. The proof that the pin works is the second line: the server only allowed the two hybrids, and a client offering plain X25519 was refused.
What to do about it
- Keep migrating. CIRG's reasoning is simple: the attack "falls far short of compromising the current NIST standards", and staying on RSA or elliptic curves means relying on things a much smaller quantum computer could break.
- Keep the hybrid. X25519MLKEM768 stays secure as long as either half holds. CIRG explicitly encourages hybrids of schemes with different mathematical foundations.
- Know where your group list lives: ssl_ecdh_curve in nginx, ecdhCurve in Node, the -groups setting in whatever wraps OpenSSL. Crypto agility is mostly knowing which config line to change and having tested changing it once.
- Use ML-KEM-1024 where you own both ends and a few hundred bytes do not matter: service-to-service TLS, long-lived encrypted files, anything that has to stay secret for decades.
- Do not move ML-DSA or ML-KEM out of a roadmap because of a headline. Nobody serious is recommending that.
The catch: nobody has checked 541 pages in two weeks
Everything reassuring above comes with a date on it. CIRG writes: "It is reasonable to expect that the attack will be improved in the near future. A key question is whether such improvements will actually reduce the cost of breaking the NIST standards." The algorithm is new, it came out of a model, and the people best placed to tighten it have had it for two weeks at most.
- The Lean proofs check that the statements follow from the definitions. They do not check that the statements say what the papers say. The README puts that on the reader, and adds that "AI readers have compared them with the text."
- The lattices project is not submitted to the Palomar registry, and CI runs it only by hand. That is a choice about cost, not a red flag, but it means fewer outside builds so far.
- ML-DSA is less covered. Paper 1 notes that "the Module-SIS parameters of ML-DSA are not treated" in its parameter-family section, and ML-DSA relies on Module-SIS as well as Module-LWE.
- Structured lattices just lost some of their asymptotic margin. That is why CIRG wants NIST to standardise more schemes on different math. It does not change anything you deploy this week.
- I could not build the formalization or verify the math myself. My part was arithmetic on published statements and TLS tests from one machine on one morning.
Is ML-KEM secure?
Yes, ML-KEM is still considered secure as of December 2026. Anthropic's quantum algorithm attacks the Module-LWE problem under it, but CIRG says the attack needs vastly more computation than the best earlier attacks at ML-KEM's sizes, and Cloudflare estimates billions of logical qubits. ML-KEM keeps its ring degree fixed at 256, while the speedup only appears as that degree grows.
Did Anthropic break post-quantum cryptography?
No. Anthropic published a theoretical quantum algorithm that is asymptotically faster against structured lattice problems, the kind ML-KEM and ML-DSA use. Its own paper says the algorithms are not practical for ML-KEM and ML-DSA parameter sets. It found no classical speedup and no quantum speedup against unstructured lattices, and nothing about RSA or elliptic curves changed.
What is the Anthropic lattice cryptography result?
It is a set of four papers, 541 pages, released on November 30, 2026 with a Lean 4 formalization. The main result is a quasi-polynomial-time quantum algorithm for some Module-LWE and Ring-LWE problems over power-of-two cyclotomic rings. Anthropic says an internal research Claude model found the results and AI models wrote the formalization.
Should I use ML-KEM-768 or ML-KEM-1024?
Use ML-KEM-1024 where you control both ends, because CIRG recommends the highest security level an application can support and the new attack gets costlier with rank. It adds 384 bytes to the public key and 480 to the ciphertext, and was a third to a half slower in my OpenSSL run. On the public web, X25519MLKEM768 is what major edges accept today.
Is lattice-based cryptography quantum resistant?
Yes, as far as is known. No quantum algorithm breaks deployed lattice schemes at their real parameters. Anthropic's result weakens structured lattices asymptotically, as ring degree grows, and CIRG called its other findings evidence for the post-quantum security of unstructured lattice systems. Hybrids with classical key exchange add a second layer.
What is Module-LWE?
Module-LWE is the learning with errors problem over a module, a small grid of polynomial ring elements. Given a random matrix A and A times a secret plus small noise, find the secret. ML-KEM's security rests on it, using rings of degree 256 and rank 2, 3 or 4. Anthropic's algorithm targets this problem when the ring degree is very large.
- formal-math: lattices (papers, README and Lean project), Anthropic
- Galactic quasi-polynomial quantum algorithms for integral and module lattices, Anthropic
- PaperDefs/P01/Cases.lean, Anthropic
- Departures of the Lean statements from the papers, Anthropic
- Initial Assessment of Anthropic's Findings on Lattice Cryptography, Cryptography Incident Review Group
- Post-quantum cryptography is still safe, Cloudflare
- FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard, NIST
- Discovering cryptographic weaknesses with Claude, Anthropic
More Posts
Next.js 16.5 compiles 4.2x faster. This blog got 1.35x
Next.js 16.5 on a 92-page static site with 2 cores: cold Turbopack compile went from 7.0 s to 5.2 s with 21% less memory. Not 4x. Warm builds didn't move.
I made a post-quantum SSH key. GitHub never answered it
A post-quantum SSH key is one ssh-keygen command in OpenSSH 10.6. GitHub, GitLab, Bitbucket, Codeberg and sourcehut can't use it, and GitHub just hangs.
I painted over a 4-digit code and read it back from the pixels outside the box
Can you unredact an image? From lossy WebP, yes: I got a hidden 4-digit code back from pixels 96 px outside the box. JPEG with a 16 px margin leaked nothing.