PQC · Lecture 1 · Florida Atlantic University · Fall 2026
Lecture 1: Why PQC, polynomial rings and MLWE
RSA, Diffie-Hellman and elliptic curves all fall to Shor's algorithm. This lecture shows why, then builds the replacement: polynomials mod q with xn = −1, and the MLWE problem behind ML-KEM and ML-DSA. Every step uses one small example (q = 17, n = 4) that you can check by hand.
3problems Shor breaks: factoring, DLP, ECDLP
65,536products in one schoolbook multiplication at n = 256
21783guesses to brute-force an ML-KEM-768 secret
2024FIPS 203 and 204 published
What happens to RSA and elliptic curves when a large quantum computer exists?
The public-key crypto we use today
Public-key schemes you already know
| Scheme | Used for | Hard problem | Where you saw it |
|---|---|---|---|
| Diffie-Hellman | key exchange | discrete log mod | Assignment 4 |
| RSA | encryption, signatures | factoring | Assignment 4 |
| ECDH | key exchange | elliptic-curve discrete log | Assignment 5 |
| ECDSA, EdDSA | signatures | elliptic-curve discrete log | Ed25519 example |
- TLS, SSH, VPNs and software updates all start with one of these.
- AES and SHA-2 do not rely on a number-theory problem. AES gets its security from the key length, SHA-2 from the output length.
Recap: Diffie-Hellman with numbers
Public
,
Alice
secret sends
Bob
secret sends
Shared key
Alice: Bob:
- An attacker sees , , and must find or : the discrete log problem.
- With a 3072-bit , no classical computer can do this. Keep this picture: in Lecture 3, ML-KEM does the same job with polynomials.
The quantum threat
Quantum computers in one slide
- A quantum bit (qubit) can hold a mix of 0 and 1 at the same time. A group of qubits can hold a mix of many values.
- It speeds up only problems with a special structure.
- Factoring and discrete logs have exactly that structure: a hidden period.
- The largest machines today have on the order of a thousand noisy qubits. A 2025 estimate (Gidney) says RSA-2048 falls to fewer than one million noisy qubits in under a week.
- Optional: a good video introduction to quantum computers.
Shor and Grover
| Algorithm | What it does | Affects | Fix |
|---|---|---|---|
| Shor | factoring and discrete log, fast | RSA, DH, ECDH, ECDSA | replace them |
| Grover | search keys in steps | AES, SHA-2 | double key or hash size |
Grover on AES
AES-128: steps, too weak.AES-256: steps, still safe.
Shor on RSA
Work grows roughly with (key bits).RSA-15360 instead of RSA-2048 costs about times more work, which is still easy for Shor.
Harvest now, decrypt later
- The attack starts before the quantum computer exists, so the migration has to start years earlier.
The new NIST standards
- Competition from 2016 to 2022. FIPS 203, 204 and 205 published in August 2024.
- This course covers the two green ones. Both are built on one problem: MLWE.
When to switch: the CNSA 2.0 timeline
- The NSA requires US national security systems to switch. Most deadlines fall between 2025 and 2033.
Polynomials as data
A polynomial is a list of numbers
- In this lecture we never plug a value into . The polynomial is only a container for its coefficients.
- In code, a polynomial is an array:
a[0], a[1], ..., a[n-1].
Coefficients live mod
- Every coefficient is reduced mod , the same modular arithmetic as in the finite-field lectures.
- Our toy modulus for the whole lecture: .
- Secrets and noise in PQC are small: coefficients between and .
- A small is stored as , and as . Think of as "just below zero".
The ring
Two rules
- : every coefficient is reduced mod .
- : we set , so a polynomial never has more than coefficients.
Toy ring, ,
Real rings
ML-KEM: , ML-DSA: ,
Both use .
Addition in
- Our running example in , used again in Lecture 2:
- Add coefficient by coefficient, then reduce mod 17:
| 1 | 2 | 3 | 4 | |
| 5 | 6 | 7 | 8 | |
| 6 | 8 | 10 | 12 |
- Nothing reached 17 here. Subtraction works the same way: .
- Cost: additions, which is cheap.
Multiplication, step 1: every pair
- Multiply every coefficient of by every coefficient of , like long multiplication.
- products. The red ones have a power of that is too high: , , .
Multiplication, step 2: collect by power
- Add the products that share a power of (the diagonals of the table):
- So far: .
- This is ordinary polynomial multiplication. The ring rules come next.
Multiplication, step 3: fold back and reduce
- moves the high part back to the start, with a minus sign.
- Result: in .
Try it
Multiplication in Rq, step by step
Step through the four stages with the running example, or type your own coefficients (four numbers mod 17).
The rule in one line
Multiplication in (negacyclic)
Products that land past wrap around to and change sign.
Check one coefficient
Your turn
- Compute in :
Exercise 1
Answer
Exercise 2
Answer
What multiplication costs
- Step 1 does all the work: one multiplication per pair, so .
- Steps 2 and 3 are only additions and subtractions.
| Ring | Multiplications | |
|---|---|---|
| Our toy | 4 | 16 |
| ML-KEM, ML-DSA | 256 | 65,536 |
- ML-KEM-768 key generation alone needs 9 of these products.
Vectors and matrices of polynomials
Vectors and matrices of polynomials
- Same idea as vectors and matrices of numbers, but every entry is a polynomial in .
- The size (here ) is the security knob: larger , stronger scheme.
- Count the numbers inside:
- Toy (, ): holds 8 numbers, holds 16.
- ML-KEM-768 (, ): holds 768 numbers, holds 2,304.
Matrix times vector
- The usual row-times-column rule:
- Each "" is a full ring multiplication from the last section. Each "" is a coefficient-wise addition.
- Cost: ring multiplications, each costing .
ML-KEM-768
multiplications for one .
One product, worked out
- From the toy example on the next slides: and .
| collect by power | 3 | 10 | 3 | 20 | 14 | ||
| fold () | 3 | ||||||
| mod 17 | 0 | 0 | 0 | 3 |
- So . Three coefficients happened to be multiples of 17.
- In the same way, . Try it at home.
Module Learning With Errors (MLWE)
Warm-up: equations without noise
- Plain numbers mod 17. Secret: , . Public:
- Subtract the first from the second: .
- Multiply by (since ): .
- Then .
Gaussian elimination finds the secret. The same works for with polynomials.
Now add a little noise
- Same secret, but each equation gets a small error: .
- Same steps: , so , and .
- The answer satisfies both equations exactly, yet the secret was .
- Why: elimination multiplied the noise by 13. An error of size 1 became an error of size 8.
With noise, elimination returns garbage. The attacker has to search for the secret instead.
Try it
Noise against elimination
Pick the two errors. With both at 0, elimination finds the secret. Any other choice gives a wrong answer.
The MLWE problem
MLWE
Given and , find .No known algorithm solves this fast, on a classical or a quantum computer.
- looks like random numbers. Without , it would give away.
A toy MLWE instance
- , , . Each box is one polynomial, written as its 4 coefficients.
- Check the first row: .
- An attacker gets only the blue boxes and must recover the lavender ones.
Why not just try every secret?
- Every coefficient of is one of 5 values: .
| Coefficients in | Guesses | ||
|---|---|---|---|
| Toy (, ) | 8 | a laptop: instant | |
| ML-KEM-768 (, ) | 768 | impossible |
- Smarter attacks exist and do much better than guessing.
- Against ML-KEM-768, the best known ones still cost more than breaking AES-192.
Try it
How many secrets are there?
Change the matrix size k, the polynomial length n and the range of the small coefficients.
Real parameters
| Scheme | Matrix | Small range | Security | ||
|---|---|---|---|---|---|
| ML-KEM-512 | 256 | 3329 | 128-bit | ||
| ML-KEM-768 | 256 | 3329 | 192-bit | ||
| ML-KEM-1024 | 256 | 3329 | 256-bit | ||
| ML-DSA-44 | 256 | 8380417 | 128-bit | ||
| ML-DSA-65 | 256 | 8380417 | 192-bit | ||
| ML-DSA-87 | 256 | 8380417 | 256-bit |
- Same everywhere, so the same polynomial code serves all six.
Why polynomials and not plain numbers?
- The same 768 secret numbers with a matrix of plain numbers would need a matrix.
| Matrix | Numbers stored | Size (12 bits each) |
|---|---|---|
| plain numbers, | 589,824 | about 885 KB |
| polynomials, of | 2,304 | about 3.5 KB |
- A polynomial packs 256 numbers that are tied together by the ring rules.
- In Lecture 3 the matrix shrinks again, to a 32-byte seed that both sides expand.
Where we go next
Summary
What we have
- Shor breaks RSA, DH and ECC. Grover only forces AES-256.
- Data lives in polynomials with coefficients mod and the rule .
- MLWE: from and , nobody can recover the small secret .
- ML-KEM and ML-DSA are built on MLWE.
The bottleneck
One polynomial product costs multiplications, and one needs of them.
Can we multiply two polynomials with far fewer than multiplications?