Path: blob/main/frontier/08-lattices-post-quantum/connect/nist-pqc-standards.ipynb
483 views
Connect: NIST Post-Quantum Cryptography Standards
Module 08 | Real-World Connections
The lattice problems you studied in this module are now the foundation of national cryptographic standards.
Introduction
In August 2024, NIST published three post-quantum cryptography standards:
FIPS 203 (ML-KEM): Module-Lattice-Based Key Encapsulation Mechanism, based on the Kyber submission. This is the primary standard for post-quantum key exchange.
FIPS 204 (ML-DSA): Module-Lattice-Based Digital Signature Algorithm, based on the Dilithium submission. This is the primary standard for post-quantum digital signatures.
FIPS 205 (SLH-DSA): Stateless Hash-Based Digital Signature Algorithm, based on SPHINCS+. This is a hash-based backup that does not rely on lattice problems.
Both ML-KEM and ML-DSA are built on the Module-LWE problem over the polynomial ring --- exactly the structures you explored in notebooks 08d and 08e.
This notebook traces how the abstract lattice concepts from Module 08 become the concrete algorithms standardized for worldwide use.
ML-KEM (Kyber): Ring-LWE for Key Encapsulation
ML-KEM uses Module-LWE over . The module rank determines the security level:
| Parameter Set | Module Rank | Effective Dimension | Security Level |
|---|---|---|---|
| ML-KEM-512 | 2 | 512 | AES-128 |
| ML-KEM-768 | 3 | 768 | AES-192 |
| ML-KEM-1024 | 4 | 1024 | AES-256 |
The core operations are:
Key generation: Sample small polynomials . The public key is where is a matrix of random polynomials in .
Encapsulation: To send a shared secret, sample fresh small polynomials , compute the ciphertext as a new Ring-LWE sample that encodes a random message.
Decapsulation: Use the secret key to strip away the Ring-LWE structure and recover the encoded message.
Let us implement a simplified version with tiny parameters to see the mechanics.
Why Does Decapsulation Work?
Let us trace the algebra. Write . Then:
The terms cancel perfectly. What remains is the message plus a small noise term. Since all of have small coefficients, their products remain small enough that rounding recovers the correct message bits.
ML-DSA (Dilithium): Lattice Signatures
ML-DSA uses a similar lattice structure but for digital signatures rather than key exchange. The core idea is the Fiat-Shamir-with-aborts paradigm:
Key generation: Same Module-LWE structure. Public key is where are short secret vectors.
Signing: To sign a message :
Sample a random masking vector with bounded coefficients
Compute and derive a challenge from
Compute
If has any coefficients too large, abort and retry (this prevents leaking )
Verification: Check that has the right structure. This works because:
The key difference from Kyber: signatures must be short vectors that satisfy a lattice relation, while key exchange encodes messages as noisy lattice points.
Security Levels and Parameter Sizes
Here are the real-world parameters from the NIST standards:
ML-KEM (FIPS 203)
| Parameter | ML-KEM-512 | ML-KEM-768 | ML-KEM-1024 |
|---|---|---|---|
| (ring degree) | 256 | 256 | 256 |
| (module rank) | 2 | 3 | 4 |
| (modulus) | 3329 | 3329 | 3329 |
| (secret noise) | 3 | 2 | 2 |
| (cipher noise) | 2 | 2 | 2 |
| Public key size | 800 bytes | 1184 bytes | 1568 bytes |
| Ciphertext size | 768 bytes | 1088 bytes | 1568 bytes |
| Shared secret | 32 bytes | 32 bytes | 32 bytes |
ML-DSA (FIPS 204)
| Parameter | ML-DSA-44 | ML-DSA-65 | ML-DSA-87 |
|---|---|---|---|
| (4, 4) | (6, 5) | (8, 7) | |
| 8380417 | 8380417 | 8380417 | |
| Public key | 1312 bytes | 1952 bytes | 2592 bytes |
| Signature | 2420 bytes | 3309 bytes | 4627 bytes |
Key sizes are larger than RSA or ECC, but still practical for most applications. The real cost is in bandwidth, not computation.
Concept Map: Module 08 to NIST Standards
| Module 08 Concept | NIST Standard Application |
|---|---|
| Lattices and bases (08a) | The algebraic structure underlying all ML-KEM/ML-DSA computations |
| SVP/CVP hardness (08b) | Security assumption: no efficient algorithm finds short vectors in the lattice dimension used |
| LLL algorithm (08c) | Motivates choosing parameters large enough that LLL (and BKZ) cannot break the scheme |
| LWE problem (08d) | The core hardness assumption: is indistinguishable from random |
| Ring-LWE (08e) | Efficient key sizes via polynomial rings; the ring |
| Module-LWE (08e) | Kyber uses a matrix of ring elements --- the middle ground between LWE and Ring-LWE |
| NTT (08e) | Fast polynomial multiplication that makes Kyber competitive with classical schemes in speed |
Summary
| Concept | Key idea |
|---|---|
| ML-KEM (Kyber) | Key encapsulation using Module-LWE over . The noise from LWE is what makes key exchange secure, and the ring structure is what makes it efficient. |
| ML-DSA (Dilithium) | Digital signatures using the same lattice structure with a Fiat-Shamir-with-aborts paradigm. Signing produces a short vector satisfying a lattice relation. |
| Security levels | 128, 192, and 256 bit security map to module ranks , giving effective lattice dimensions of 512, 768, and 1024 |
| Practical key sizes | Larger than classical crypto but still under 2 KB for public keys and under 5 KB for signatures |
| SLH-DSA (SPHINCS+) | A hash-based backup signature scheme that does not rely on lattice problems, providing algorithmic diversity |