- Cryptography
- Also: CRYSTALS-Kyber
- Also: ML-KEM
- Also: FIPS 203
Kyber (ML-KEM)
A lattice-based key encapsulation mechanism standardized as FIPS 203, serving as the primary post-quantum replacement for RSA and Diffie-Hellman key exchange.
Kyber, now officially named ML-KEM (Module Learning With Errors Key Encapsulation Mechanism), is the post-quantum key encapsulation mechanism (KEM) selected by NIST as the primary standard for replacing classical key exchange protocols like RSA-KEM and Diffie-Hellman. Published as FIPS 203 in August 2024, it is already being deployed in web browsers, TLS 1.3 implementations, and messaging protocols including Signal. Its selection was based on a strong security foundation, fast performance, and relatively compact key sizes compared to other post-quantum candidates.
The Module Learning With Errors problem
Kyber’s security rests on the hardness of the Module Learning With Errors (MLWE) problem. Given a matrix over a polynomial ring , a secret vector , and a small error vector , the problem asks an adversary to distinguish the pair from a uniformly random pair. The “module” structure (working over polynomial rings rather than plain integers) enables smaller keys and faster computation while maintaining a security reduction to worst-case lattice problems.
No known quantum algorithm solves MLWE significantly faster than the best classical algorithms. Shor’s algorithm provides no advantage here because lattice problems lack the algebraic periodicity that Shor’s algorithm exploits.
How Kyber works
Kyber follows an IND-CCA2 secure KEM construction built from an IND-CPA public-key encryption scheme via the Fujisaki-Okamoto transform:
-
Key generation: Alice generates a random matrix and secret vector with small coefficients, then computes the public key . The public key is and the secret key is .
-
Encapsulation: Bob samples a random message , derives randomness from it, encrypts under Alice’s public key by computing and . The shared secret is derived by hashing together with a hash of the ciphertext.
-
Decapsulation: Alice uses her secret key to decrypt , re-encrypts to verify the ciphertext matches, and derives the same shared secret. The re-encryption check is critical for CCA2 security.
Parameter sets and key sizes
Kyber is defined at three security levels:
| Parameter set | Security level | Public key | Ciphertext | Shared secret |
|---|---|---|---|---|
| ML-KEM-512 | NIST Level 1 (~AES-128) | 800 bytes | 768 bytes | 32 bytes |
| ML-KEM-768 | NIST Level 3 (~AES-192) | 1,184 bytes | 1,088 bytes | 32 bytes |
| ML-KEM-1024 | NIST Level 5 (~AES-256) | 1,568 bytes | 1,568 bytes | 32 bytes |
For comparison, RSA-2048 public keys are 256 bytes but RSA-4096 keys (needed for comparable long-term security) are 512 bytes. Kyber keys are larger, but the difference is modest enough for most applications. The performance comparison favors Kyber: key generation, encapsulation, and decapsulation are all faster than RSA operations at equivalent security levels.
Deployment status
Kyber is among the most rapidly adopted post-quantum algorithms:
- TLS 1.3: Chrome and Firefox ship hybrid key exchange using X25519 combined with ML-KEM-768 (the “X25519Kyber768” or “X25519MLKEM768” key agreement)
- Signal Protocol: Adopted a hybrid scheme combining X25519 with Kyber for forward-secure key exchange
- Cloudflare and AWS: Both support post-quantum TLS using Kyber on their edge networks
The “hybrid” approach combines a classical key exchange with Kyber so that security is maintained even if one scheme is broken. This is the recommended deployment strategy during the transition period.
Why it matters for learners
Kyber is the most concrete example of how quantum computing motivates real-world changes to infrastructure. Understanding Kyber connects the theoretical threat of Shor’s algorithm to the practical response: billions of TLS connections are already being protected against future quantum attacks. For quantum computing students, Kyber also illustrates which mathematical problems quantum computers can and cannot solve efficiently. The lattice problems underlying Kyber appear to be in a complexity class that quantum computers cannot crack, unlike the factoring and discrete logarithm problems that Shor’s algorithm targets.