MIT 6.875 & Berkeley CS276 Foundations of Cryptography Lecture 20
TODAY: Lattice-based Cryptography
Why Lattice-based Crypto? o Exponentially Hard (so far) o Quantum-Resistant (so far) o Worst-case hardness (unique feature of lattice-based crypto) o Simple and Efficient o Enabler of Surprising Capabilities (computing on encrypted data)
Solving Linear Equations 5π‘ ! + 11π‘ " = 2 2π‘ ! + π‘ " = 6 7π‘ ! + π‘ " = 26 where all equations are over β€ , the integers
Solving Linear Equations s and A Given : A GOAL : Find s. More generally, π variables and π β« π equations.
Solving Linear Equations s and A Given : A GOAL : Find s. EASY! For example, by Gaussian Elimination
Solving Linear Equations s and A Given : A GOAL : Find s. Chop the head? How to make it hard : That is, work modulo some π . (1121 πππ 100 = 21) Still EASY! Gaussian Elimination mod π
Solving Linear Equations s and e A Given : A + GOAL : Find s. How to make it hard : Chop the tail? Add a small error to each equation. Still EASY! Linear regression.
Solving Linear Equations s and e A Given : A + GOAL : Find s. How to make it hard : Chop the head and the tail? Add a small error to each equation and work mod π . Turns out to be very HARD!
Learning with Errors (LWE) Solving Noisy Modular Linear Equations s and e A Given : A + GOAL : Find s. Parameters: dimensions π and π , modulus π , error distribution π = uniform in some interval [βπͺ, β¦ , πͺ] . $Γ& , s from β€ # & A is chosen at random from β€ # and e from π $ .
Learning with Errors (LWE) u Decoding Random Linear Codes (over F q with L 1 errors) u Learning Noisy Linear Functions u Worst-case hard Lattice Problems [Regevβ05, Peikertβ09]
Attack 1: Linearization Given π©, π©π + π , find π . Idea (a) Each noisy linear equation is an exact polynomial eqn. π Consider π = π, π + π = β π(π π + π‘ + + π. Imagine for now that the error bound πΆ = 1. So, π β π β1,0,1 . In other words, b β β π(π π + π‘ + β β1,0,1 . So, here is a noiseless polynomial equation on π‘ + : π π π ( b β β π(π π + π‘ + β 1) ( b β β π(π π + π‘ + ) ( b β β π(π π + π‘ + + 1) = 0
Attack 1: Linearization Given π©, π©π + π , find π . BUT: Solving (even degree 2) polynomial equations is NP-hard. π π π ( b β β π(π π + π‘ + β 1) ( b β β π(π π + π‘ + ) ( b β β π(π π + π‘ + + 1) = 0
Attack 1: Linearization π π π ( b β β π(π π + π‘ + β 1) ( b β β π(π π + π‘ + ) ( b β β π(π π + π‘ + + 1) = 0 Idea (b) Easy to solve given sufficiently many equations. (using a technique called βlinearizationβ) * π !"# π‘ ! π‘ " π‘ # + * π !" π‘ ! π‘ " + * π ! π‘ ! + π β 1 π(π + 1) = 0 Treat each βmonomialβ, e.g. s , s - s . as an independent variable, e.g. t ,-. . Now, you have a noiseless linear equation in t ,-. !!!
Attack 1: Linearization * π !"# π’ !"# + * π !" π’ !" + * π ! π’ ! + π β 1 π(π + 1) = 0 Solution space (with some eqns): The real solution 0 etc. / π‘ π’ +/0 = π‘ + π‘
Attack 1: Linearization * π !"# π’ !"# + * π !" π’ !" + * π ! π’ ! + π β 1 π(π + 1) = 0 Solution space (with more eqns): The real solution 0 etc. / π‘ π’ +/0 = π‘ + π‘
Attack 1: Linearization * π !"# π’ !"# + * π !" π’ !" + * π ! π’ ! + π β 1 π(π + 1) = 0 (with even more eqns): Solution space The real solution 0 etc. / π‘ π’ +/0 = π‘ + π‘
Attack 1: Linearization * π !"# π’ !"# + * π !" π’ !" + * π ! π’ ! + π β 1 π(π + 1) = 0 Solution space (keep going): The real solution 0 etc. / π‘ π’ +/0 = π‘ + π‘
Attack 1: Linearization * π !"# π’ !"# + * π !" π’ !" + * π ! π’ ! + π β 1 π(π + 1) = 0 When #eqns = #vars β π(π 1 ) the only surviving solution to the linear system is the real solution.
Attack 1: Linearization Given π©, π©π + π , find π . Can solve/break as long as π β« π ππͺ4π We will set πΆ = π 5(!) , in other words polynomial in π so as to blunt this attack.
Attack 2: Lattice Decoding a1*s1+a2*s2 a1*s1+a2*s2+e a2 a1 O The famed Lenstra-Lenstra-Lovasz algorithm decodes in polynomial time when π/πͺ > π π
Setting Parameters Put together, we are safe with: π = security parameter (β 1 β 10K) π = arbitrary poly in π πΆ = small poly in π, say π π = poly in π , larger than πΆ , and could be as large as sub-exponential , say 2 & !.## even from quantum computers, AFAWK!
Decisional LWE Can you distinguish between : s + and , e A A , b A Theorem: βDecisional LWE is as hard as LWEβ.
OWF and PRG g A (s,e) = As + e "#$ ( A β π ! " random βsmallβ secret vector s β π ! " : random βsmallβ error vector) π β π ! β’ g A is a one-way function (assuming LWE) β’ g A is a pseudo-random generator (decisional LWE) β’ g A is also a trapdoor functionβ¦ β’ also a homomorphic commitmentβ¦
Basic (Secret-key) Encryption [Regev05] n = security parameter, q = βsmallβ modulus & β’ Secret key sk = Uniformly random vector s Γ π % β’ Encryption Enc s ( π ): // π Γ {0,1} & , βsmallβ noise e Γ π β Sample uniformly random a Γ π % β The ciphertext c = ( a , b = Γ‘ a, s Γ± + e + π π/2 ) β’ Decryption Dec sk ( c ): Output Round q/2 (b β Γ‘ a, s Γ± mod q) // correctness as long as |e| < q/4
Basic (Secret-key) Encryption [Regev05] We already saw that this scheme is additively homomorphic. π = ( a , b = Γ‘ a, s Γ± + e + π π/2 ) + Enc s (m) π β² = ( a β² , b β² = Γ‘ a β² , s Γ± + e β² + π β² π/2 ) Enc s (mβ) π + π β² = ( a + a β² , b+ b β² = Γ‘ a +a β² , s Γ± + (e+e β² ) + ( π + π β²) π/2 ) π + π β² = ( a + a β² , b+ b β² ) In words: π + πβ² is an encryption of π + π β² (mod 2)
Basic (Secret-key) Encryption [Regev05] You can also negate the encrypted bit easily. We will see how to make this scheme into a fully homomorphic scheme (in the next lec) For now, note that the error increases when you add two ciphertexts. That is, |π <== β |π ! + π " β€ 2πΆ. Setting π = π 9:; & and πΆ = π (for example) lets us support any polynomial number of additions.
Public-key Encryption [Regev05] & β’ Secret key sk = Uniformly random vector s Γ π % β’ Public key pk: for π ππ ππ 1 π’π π = ππππ§(π) TBD π π = (π π , π π , π + π ! )
Public-key Encryption [Regev05] & β’ Secret key sk = Uniformly random vector s Γ π % β’ Public key pk: for π ππ ππ 1 π’π π = ππππ§(π) s + e , A A (π©, π = π©π + π) β’ Encrypting a message bit π : pick a random vector π β {0,1} ( (ππ©, ππ + π π/2 ) β’ Decryption: compute ππ + π π/2 β ππ© π and round to nearest multiple of q/2.
Correctness β’ Encrypting a message bit π : pick a random vector π β {0,1} ( (ππ©, ππ + π π/2 ) β’ Decryption: ππ + π π/2 β ππ© π = π(π©π + π) + π π/2 β ππ© π Decryption works as long as | ππ| < π/π or in other words, if the LWE error bound B < π/ππ β q/poly(n) .
Security Theorem: under decisional LWE, the scheme is IND- secure. In fact, even more: a ciphertext together with the public key is pseudorandom. We show this by a hybrid argument. Letβs stare at a public key, ciphertext pair. ππ = π©, π = π©π + π , π = πππ ππ, π = ππ©, ππ + π π/2 ) Call this distribution Hybrid 0 .
Security Theorem: under decisional LWE, the scheme is IND- secure. In fact, even more: a ciphertext together with the public key is pseudorandom. Hybrid 1 . Change the public key to random (from LWE). ^ π = πππ ^ ππ = π©, π , _ ππ, π = ππ©, ππ + π π/2 ) Hybrids 0 and 1 are comp. indist. by decisional LWE.
Detour: Leftover Hash Lemma [Impagliazzo-Levin-Lubyβ90] We want to understand how ππ©, ππ = π π© π] is distributed when π΅, π is random (and public). π πβ² πβ² π β π© π If π is truly random, so is π π© π] . But π is NOT truly random! It has small entries. Nevertheless, π has entropy. Leftover hash lemma tells us that matrix multiplication turns (sufficient) entropy into true randomness. We need π β« π + 1 log π.
Security Theorem: under decisional LWE, the scheme is IND- secure. In fact, even more: a ciphertext together with the public key is pseudorandom. Hybrid 1 . Change the public key to random (from LWE). ^ π = πππ ^ ππ = π©, π , _ ππ, π = ππ©, ππ + π π/2 ) Hybrids 0 and 1 are comp. indist. by decisional LWE.
Recommend
More recommend