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

SchemeUsed forHard problemWhere you saw it
Diffie-Hellmankey exchangediscrete log mod ppAssignment 4
RSAencryption, signaturesfactoring N=p⋅qN = p \cdot qAssignment 4
ECDHkey exchangeelliptic-curve discrete logAssignment 5
ECDSA, EdDSAsignatureselliptic-curve discrete logEd25519 example

Recap: Diffie-Hellman with numbers

Public
p=23p = 23, g=5g = 5
Alice
secret a=6\Sec{a = 6}
sends A=56 mod 23=8A = 5^{6} \bmod 23 = \Pub{8}
Bob
secret b=15\Sec{b = 15}
sends B=515 mod 23=19B = 5^{15} \bmod 23 = \Pub{19}
Shared key
Alice: 196 mod 23=219^{6} \bmod 23 = \Out{2}
Bob:     815 mod 23=2\;\;8^{15} \bmod 23 = \Out{2}

The quantum threat

Quantum computers in one slide

Shor and Grover

AlgorithmWhat it doesAffectsFix
Shorfactoring and discrete log, fastRSA, DH, ECDH, ECDSAreplace them
Groversearch 2k2^{k} keys in ≈2k/2\approx 2^{k/2} stepsAES, SHA-2double key or hash size
Grover on AES
AES-128: 2128→2642^{128} \rightarrow 2^{64} steps, too weak.
AES-256: 2256→21282^{256} \rightarrow 2^{128} steps, still safe.
Shor on RSA
Work grows roughly with (key bits)3^3.
RSA-15360 instead of RSA-2048 costs about 7.53≈4207.5^3 \approx 420 times more work, which is still easy for Shor.

Harvest now, decrypt later

The new NIST standards

When to switch: the CNSA 2.0 timeline

Polynomials as data

A polynomial is a list of numbers

Coefficients live mod qq

The ring Rq=Zq[x]/(xn+1)\Rq = \mathbb{Z}_q[x]/(x^n+1)

Two rules
  1. Zq\mathbb{Z}_q: every coefficient is reduced mod qq.
  2. xn+1x^n + 1: we set xn=−1x^n = -1, so a polynomial never has more than nn coefficients.
Toy ring, q=17q = 17, n=4n = 4
x4=−1x^4 = -1
x5=x⋅x4=−xx^5 = x \cdot x^4 = -x
x6=x2⋅x4=−x2x^6 = x^2 \cdot x^4 = -x^2
Real rings
ML-KEM: q=3329q = 3329, n=256n = 256
ML-DSA: q=8380417q = 8380417, n=256n = 256
Both use x256=−1x^{256} = -1.

Addition in Rq\Rq

x0x^0x1x^1x2x^2x3x^3
aa1234
bb5678
a+ba + b681012

Multiplication, step 1: every pair

×\times556x6x7x27x^28x38x^3
11556x6x7x27x^28x38x^3
2x2x10x10x12x212x^214x314x^316x416x^4
3x23x^215x215x^218x318x^321x421x^424x524x^5
4x34x^320x320x^324x424x^428x528x^532x632x^6

Multiplication, step 2: collect by power

x0:  5=5x4:  16+21+24=61x1:  6+10=16x5:  24+28=52x2:  7+12+15=34x6:  32x3:  8+14+18+20=60\begin{aligned} x^0&: \; 5 = 5 & x^4&: \; \Bad{16 + 21 + 24 = 61}\\ x^1&: \; 6 + 10 = 16 & x^5&: \; \Bad{24 + 28 = 52}\\ x^2&: \; 7 + 12 + 15 = 34 & x^6&: \; \Bad{32}\\ x^3&: \; 8 + 14 + 18 + 20 = 60 & & \end{aligned}

Multiplication, step 3: fold back and reduce

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 Rq\Rq (negacyclic)
ck  =  ∑i+j=kaibj  −  ∑i+j=k+naibj(modq)c_k \;=\; \sum_{i + j = k} a_i b_j \;-\; \sum_{i + j = k + n} a_i b_j \pmod q Products that land past xn−1x^{n-1} wrap around to xkx^{k} and change sign.
Check one coefficient
c0=a0b0−(a1b3+a2b2+a3b1)=5−(16+21+24)=−56≡12(mod17)c_0 = a_0 b_0 - (a_1 b_3 + a_2 b_2 + a_3 b_1) = 5 - (16 + 21 + 24) = -56 \equiv 12 \pmod{17}
c3=a0b3+a1b2+a2b1+a3b0=8+14+18+20=60≡9(mod17)c_3 = a_0 b_3 + a_1 b_2 + a_2 b_1 + a_3 b_0 = 8 + 14 + 18 + 20 = 60 \equiv 9 \pmod{17}

Your turn

Exercise 1
(1+x)⋅x3(1 + x) \cdot x^3
Answer
x3+x4=x3−1x^3 + x^4 = x^3 - 1
=16+x3= 16 + x^3
Exercise 2
(2+x2)⋅3x2(2 + x^2) \cdot 3x^2
Answer
6x2+3x4=6x2−36x^2 + 3x^4 = 6x^2 - 3
=14+6x2= 14 + 6x^2

What multiplication costs

RingnnMultiplications
Our toy416
ML-KEM, ML-DSA25665,536

Vectors and matrices of polynomials

Vectors and matrices of polynomials

A=[A00A01A10A11]∈Rq2×2,s=[s0s1]∈Rq2\Pub{\mathbf{A}} = \begin{bmatrix} \Pub{A_{00}} & \Pub{A_{01}} \\ \Pub{A_{10}} & \Pub{A_{11}} \end{bmatrix} \in \Rq^{2 \times 2}, \qquad \Sec{\mathbf{s}} = \begin{bmatrix} \Sec{s_0} \\ \Sec{s_1} \end{bmatrix} \in \Rq^{2}

Matrix times vector

ML-KEM-768
k2⋅n2=9⋅65,536=589,824k^2 \cdot n^2 = 9 \cdot 65{,}536 = 589{,}824 multiplications for one A⋅s\mathbf{A} \cdot \mathbf{s}.

One product, worked out

x0x^0x1x^1x2x^2x3x^3x4x^4x5x^5x6x^6
collect by power310−3-3320−7-714
fold (x4=−1x^4 = -1)3−203 - 2010+710 + 7−3−14-3 - 143
=−17= -17=17= 17=−17= -17=3= 3
mod 170003

Module Learning With Errors (MLWE)

Warm-up: equations without noise

x+5y=1x+5y=14(mod17)\begin{aligned} x + \phantom{5}y &= \Pub{1} \\ x + 5y &= \Pub{14} \end{aligned} \pmod{17}
Gaussian elimination finds the secret. The same works for t=A⋅s\Pub{\mathbf{t}} = \Pub{\mathbf{A}} \cdot \Sec{\mathbf{s}} with polynomials.

Now add a little noise

x+5y=1+1=2x+5y=14−1=13(mod17)\begin{aligned} x + \phantom{5}y &= 1 \Noi{+ 1} = \Pub{2} \\ x + 5y &= 14 \Noi{- 1} = \Pub{13} \end{aligned} \pmod{17}
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 A\Pub{\mathbf{A}} and t=A⋅s+e\Pub{\mathbf{t}} = \Pub{\mathbf{A}} \cdot \Sec{\mathbf{s}} + \Noi{\mathbf{e}}, find s\Sec{\mathbf{s}}.
No known algorithm solves this fast, on a classical or a quantum computer.

A toy MLWE instance

Why not just try every secret?

Coefficients in s\mathbf{s}Guesses
Toy (k=2k = 2, n=4n = 4)858=390,6255^{8} = 390{,}625a laptop: instant
ML-KEM-768 (k=3k = 3, n=256n = 256)7685768≈217835^{768} \approx 2^{1783}impossible
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

SchemennqqMatrixSmall rangeSecurity
ML-KEM-51225633292×22 \times 2±3\pm 3128-bit
ML-KEM-76825633293×33 \times 3±2\pm 2192-bit
ML-KEM-102425633294×44 \times 4±2\pm 2256-bit
ML-DSA-4425683804174×44 \times 4±2\pm 2128-bit
ML-DSA-6525683804176×56 \times 5±4\pm 4192-bit
ML-DSA-8725683804178×78 \times 7±2\pm 2256-bit

Why polynomials and not plain numbers?

MatrixNumbers storedSize (12 bits each)
plain numbers, 768×768768 \times 768589,824about 885 KB
polynomials, 3×33 \times 3 of n=256n = 2562,304about 3.5 KB

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 qq and the rule xn=−1x^n = -1.
  • MLWE: from A\Pub{\mathbf{A}} and t=As+e\Pub{\mathbf{t}} = \Pub{\mathbf{A}}\Sec{\mathbf{s}} + \Noi{\mathbf{e}}, nobody can recover the small secret s\Sec{\mathbf{s}}.
  • ML-KEM and ML-DSA are built on MLWE.
The bottleneck
One polynomial product costs n2=65,536n^2 = 65{,}536 multiplications, and one A⋅s\mathbf{A} \cdot \mathbf{s} needs k2k^2 of them.
Can we multiply two polynomials with far fewer than n2n^2 multiplications?