How Module Lattice Cryptography Works On December 2nd, the White House Office of the National Cyber Director, the NSA and CISA issued a joint statement saying AI companies had disclosed discoveries affecting the security of some cryptography in use today, and the same day Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI and Oracle backed moving to NIST's post-quantum standards and to "accelerate the migration as soon as possible." The NSA also published an advisory listing immediate steps toward post-quantum cryptography, while Cloudflare reported that as of December 1st, 73% of human traffic reaching its network is protected by post-quantum encryption, largely via the hybrid X25519MLKEM768 key exchange built on ML-KEM, standardized in NIST FIPS 203 in August 2024. The article explains how module-lattice key exchange works for engineers who want to understand the acronyms without reading the standard. Photo by Chris Linnett on Unsplash Introduction This week brought some new developments in cryptography. On December 2nd, the White House's Office of the National Cyber Director, the NSA and CISA issued a joint statement https://www.cisa.gov/news-events/news/joint-statement-recent-advances-cryptographic-and-cybersecurity-capabilities saying that AI companies had disclosed discoveries that affect the security of some of the cryptography in use today. The same day, Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI and Oracle published a statement of their own https://openai.com/index/joint-statement-post-quantum-cryptography/ , supporting the government's guidance to move to the algorithms in NIST's post-quantum standards, and to "accelerate the migration as soon as possible". The NSA also published an advisory https://media.defense.gov/2026/Dec/01/2004039413/-1/-1/0/CSA Immediate Actions Push Toward PQC.PDF this week, with a list of immediate steps towards post-quantum cryptography. The part of that move which is furthest along is key exchange, and that's what this post is about. In an earlier post https://phase.dev/blog/chacha-and-aes-simplicity-in-cryptography , we took a close look at AES and ChaCha20, the two ciphers that do most of the heavy lifting when it comes to encrypting data on the internet. Both are symmetric ciphers, which means that both Alice and Bob need to hold the same secret key before they can start. A deep dive into key exchange, or how two computers that have never met agree on that key, was out of scope for that post, but a quick primer is useful here. For the last few decades, key exchange has been handled by a small family of public-key algorithms: RSA, Diffie-Hellman, and the elliptic curve versions of Diffie-Hellman, like X25519. All of them would be broken by a large enough quantum computer. That computer doesn't exist yet, but replacements for these algorithms do. In August 2024, NIST published FIPS 203 https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.pdf , which standardizes the Module-Lattice-Based Key-Encapsulation Mechanism , or ML-KEM, previously known as CRYSTALS-Kyber https://pq-crystals.org/kyber/ . Most major browsers now prefer https://blog.cloudflare.com/post-quantum-visibility/ X25519MLKEM768 , which combines ML-KEM with X25519. Cloudflare reports https://blog.cloudflare.com/pq-is-still-safe/ that, as of December 1st, 73% of the human traffic reaching its network is protected by post-quantum encryption. So what is a "module lattice", why would a quantum computer struggle with one, and how do you build a key exchange out of it? This post is a primer for engineers who want to know what's behind the acronyms without reading through the standard. Let's take a closer look. A Primer on Key Exchange Symmetric ciphers like AES and ChaCha20 are fast, and they have one requirement: both parties must hold the same secret key. Key exchange is the problem of getting that key to both sides over a network that anyone can listen in on. Public-key cryptography solves this with an asymmetry. Each party has a key pair : a public key that can be shared with anyone, and a private key that is kept secret. The two are linked by a mathematical problem that is easy to compute in one direction and practically impossible to reverse. For RSA, multiplying two large prime numbers together is easy, but working out which two primes went into the result is hard. Elliptic curves rely on a similar one-way street called the discrete logarithm https://en.wikipedia.org/wiki/Discrete logarithm problem. The quantum problem In 1994, Peter Shor published an algorithm https://arxiv.org/abs/quant-ph/9508027 that solves both of these problems efficiently on a quantum computer. The speedup is large enough that using bigger keys isn't a practical defence. We'll look at how it works in a moment. No quantum computer today is anywhere near large enough to run Shor's algorithm against real keys, and nobody knows exactly when one will be. But the estimates of what it would take keep coming down https://arxiv.org/abs/2505.15917 , and an attacker doesn't need to have the machine today. They can record encrypted traffic now and decrypt it once a capable machine exists, an approach known as harvest now, decrypt later . This matters for any data that has to stay secret for many years and was protected by a key exchanged using RSA or X25519. Symmetric ciphers are much less affected. The best known quantum attack on them, Grover's algorithm https://en.wikipedia.org/wiki/Grover%27s algorithm , effectively halves the length of the key, so AES-256 and ChaCha20 with their 256-bit keys keep a comfortable margin. The ciphers from the previous post are fine. It's the key exchange that needs replacing. How Shor's algorithm works Quantum computers are often described as trying every possible answer at once. That's only half true. A quantum computer can run a calculation on many inputs at the same time, in what's called a superposition . But when you measure the result, you only get to see one of the answers, picked at random. On its own, that's no better than guessing. What makes quantum computers useful is interference . Before you measure anything, the possible results behave like waves: they can add up, or cancel out. A good quantum algorithm makes the useless results cancel and the useful ones add up, so that a useful one is what you are likely to see. This only works if the problem has some structure that makes the waves line up. A repeating pattern is exactly that kind of structure. Factoring has a repeating pattern hidden inside it. Take the powers of 2, mod 15: they go 1, 2, 4, 8, 1, 2, 4, 8, and so on, repeating every 4 steps. Knowing that length is enough to factor 15. Since 2