Skip to main content
Post-Quantum Cryptography, FHE, ZKP and Modern Directions
Lesson 11 of 16

Post-Quantum Cryptography, FHE, ZKP and Modern Directions

Assess quantum threats using Mosca's inequality, explain NIST post-quantum standards (ML-KEM, ML-DSA, SLH-DSA), lattices and hybrid TLS, and compare FHE, zero-knowledge proofs, MPC and QKD.

Intermediate 26 min Cryptography

Learning objectives

  • Distinguish the impact of Shor's and Grover's algorithms and apply Mosca's inequality to harvest-now, decrypt-later risk
  • Identify NIST post-quantum standards FIPS 203 (ML-KEM), FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA) and explain crypto-agility
  • Explain Learning With Errors (LWE) on lattices and why hybrid TLS (X25519MLKEM768) is deployed first
  • Compare partial and fully homomorphic encryption (FHE), multi-party computation (MPC), zk-SNARKs, zk-STARKs and QKD limits

Recommended first: PKI, X.509 Certificates and TLS 1.3 Handshake

#Why this matters

Public-key cryptography deployed across today's internet relies almost entirely on two mathematical problems: integer factorization (RSA) and discrete logarithms (Diffie-Hellman, ECDH, ECDSA and Ed25519). In 1994, Peter Shor showed that a sufficiently large fault-tolerant quantum computer can solve both problems in polynomial time, breaking all of those schemes simultaneously. By contrast, Grover's algorithm provides only a quadratic (square-root) speed-up for unstructured search, which reduces the effective security of symmetric ciphers by half: AES-256 retains roughly 128-bit post-quantum security and does not need urgent replacement.

Even though large-scale quantum computers do not yet exist, migration cannot wait because of the harvest now, decrypt later threat model. An adversary can record encrypted TLS sessions today, store them for a decade, and decrypt them once quantum hardware matures. Mosca's inequality captures this deadline: let x be the years data must stay confidential, y be the years required to migrate systems, and z be the years until a relevant quantum computer arrives ("Q-day"). Whenever x + y > z, waiting to migrate leaves today's traffic exposed.

#NIST post-quantum standards and crypto-agility

Post-quantum cryptography (PQC) runs on ordinary classical computers and browsers, relying on mathematical families with no known efficient quantum algorithm: lattices, error-correcting codes, cryptographic hashes, multivariate polynomials and isogenies. In August 2024, NIST published its first three post-quantum Federal Information Processing Standards:

Standard Algorithm Role Underlying family
FIPS 203 ML-KEM Key encapsulation mechanism Module-LWE (lattice)
FIPS 204 ML-DSA Primary digital signature Module-LWE (lattice)
FIPS 205 SLH-DSA Stateless backup digital signature Hash-based

NIST included SLH-DSA as a hash-based backup specifically for algorithm-family diversity. History proved why diversity matters: in 2022, two prominent PQC candidates -- SIKE (isogeny-based) and Rainbow (multivariate) -- were broken on ordinary classical computers without needing any quantum hardware, with SIKE falling in roughly an hour on a single core. Because new mathematical assumptions require years of cryptanalysis, resilient systems must be designed for crypto-agility: the operational ability to swap algorithms, key sizes and protocol parameters quickly without rewriting applications.

#Lattices, LWE and hybrid TLS

A lattice is a regular repeating grid of points in high-dimensional space. Lattice cryptography relies on hard geometric problems such as the Shortest Vector Problem (SVP) and Closest Vector Problem (CVP), as well as Learning With Errors (LWE), introduced by Oded Regev in 2005. In LWE, a public matrix A and a noisy vector b = A*s + e mod q are published, where s is the secret vector and e is a small error (noise) vector. Without e, recovering s from b = A*s mod q is trivial linear algebra (Gaussian elimination). Adding small noise e turns the system into a hard problem tied directly to lattice geometry. ML-KEM and ML-DSA use structured Module-LWE, producing compact keys and signatures of roughly one kilobyte.

Toy LWE noise demonstration (concept only, not for security)
q = 97
A = [[14, 29], [41, 12], [63, 7]]
s = [5, 11]           # secret vector
e = [1, -1, 1]        # small error (noise) vector

b_clean = [sum(a * x for a, x in zip(row, s)) % q for row in A]
b_noisy = [(val + err) % q for val, err in zip(b_clean, e)]

print("Without noise (easy linear system):", b_clean)
print("With small noise e (LWE instance): ", b_noisy)

To deploy PQC safely while lattice implementations continue maturing, internet protocols adopt hybrid mode, combining a classical scheme with a post-quantum scheme so an attacker must break both. Since 2024, Chrome and Firefox enable X25519MLKEM768 by default in TLS 1.3 key exchange, and Signal deploys PQXDH. Hybrid key exchange rolls out first to stop harvest-now, decrypt-later recording; post-quantum certificate signatures will follow more gradually because signatures only need to resist forgery at verification time.

#Computing on encrypted data: FHE and MPC

Modern cryptography also enables computation without exposing raw inputs. Homomorphic encryption satisfies Dec(f(E(x))) = f(x), letting an untrusted server compute directly on ciphertexts. Classic schemes support only one operation: textbook RSA is multiplicatively homomorphic (E(a) * E(b) = E(a * b)), while Paillier is additively homomorphic. In 2009, Craig Gentry constructed the first Fully Homomorphic Encryption (FHE) scheme supporting arbitrary additions and multiplications by using bootstrapping to refresh accumulated ciphertext noise. Practical FHE remains expensive: computations are still roughly 10^3 to 10^6 times slower than plaintext, with ciphertexts 100 to 10,000 times larger.

Secure Multi-Party Computation (MPC) takes a different approach: multiple participants jointly evaluate a function over their private inputs without revealing those inputs to one another. Classic examples include Yao's millionaires' problem (comparing two salaries without disclosing either figure) and secure aggregation in federated learning, where devices sum model updates without exposing individual training data.

#Zero-knowledge proofs and QKD limits

A zero-knowledge proof (ZKP) lets a prover convince a verifier that a statement is true without disclosing the secret witness. Every ZKP satisfies three properties: completeness (honest proofs always verify), soundness (cheating provers cannot forge proofs) and zero-knowledge (the verifier learns nothing beyond the statement's truth). Using the Fiat-Shamir transform, interactive proofs become non-interactive signatures -- Ed25519 can be viewed through this lens. Two modern general-purpose ZKP families trade off proof size, setup assumptions and quantum resistance:

zk-SNARK vs zk-STARK
zk-SNARK
  • Compact proofs (~200 bytes)
  • Usually requires a trusted setup
  • Not quantum-resistant (elliptic curves)
  • Fast verification on constrained chains
zk-STARK
  • Larger proofs (40-200 KB)
  • Transparent, no trusted setup
  • Quantum-resistant (hash-based)
  • Higher bandwidth, stronger assumptions

Finally, Quantum Key Distribution (QKD) protocols such as BB84 use quantum physics rather than computational hardness to detect eavesdropping: if an eavesdropper measures transmitted photons, the bit error rate jumps to roughly 25%, alerting both parties. However, QKD does not replace PQC for general internet security. QKD suffers from strict fiber distance limits, requires specialized optical hardware rather than pure software updates, and provides no built-in authentication -- meaning classical or post-quantum signatures are still required to prevent man-in-the-middle attacks.

#Defending and common mistakes

  • Replacing AES-256 unnecessarily: Grover's algorithm only halves symmetric key strength; AES-256 remains post-quantum safe, whereas RSA and ECC key exchanges are the urgent priority.
  • Deploying pure PQC without hybrid mode: rolling out standalone new schemes before years of real-world hardening risks classical breaks like SIKE. Prefer standardized hybrid modes (X25519MLKEM768).
  • Hardcoding cryptographic algorithms: embedding fixed OIDs or cipher names across services prevents rapid rotation. Build crypto-agility into TLS configurations, libraries and key formats.
  • Treating QKD as a drop-in TLS replacement: QKD cannot secure public internet endpoints without specialized fiber links and separate post-quantum authentication.

#Summary

  • Shor's algorithm threatens RSA, DH/ECDH and ECDSA/Ed25519 in polynomial time, while Grover's algorithm leaves AES-256 with 128-bit security; Mosca's inequality (x + y > z) flags urgent harvest-now, decrypt-later risk.
  • NIST standardized ML-KEM (FIPS 203), ML-DSA (FIPS 204) and hash-based SLH-DSA (FIPS 205), pairing Module-LWE efficiency with family diversity and crypto-agility.
  • Hybrid TLS (X25519MLKEM768) protects key exchange today so an attacker must break both classical and lattice cryptography.
  • FHE enables arbitrary computation on ciphertexts at steep speed (10^3-10^6x) and size (100-10,000x) costs, MPC computes jointly over private inputs, zk-SNARKs and zk-STARKs trade proof size for setup-free quantum resistance, and QKD does not replace PQC.

Lecture presentations

Slides on this topic: view them in the browser or download the PDF.

Modern directions

Post-quantum cryptography · Homomorphic encryption · Zero-knowledge proofs

Slides: 26 PDF · 1.2 MB

Knowledge check

Sign in to take the test, complete lessons and save your progress. Log in

Practice: test your knowledge