mit 6 875 berkeley cs276
play

MIT 6.875 & Berkeley CS276 Foundations of Cryptography Lecture - PowerPoint PPT Presentation

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


  1. MIT 6.875 & Berkeley CS276 Foundations of Cryptography Lecture 20

  2. TODAY: Lattice-based Cryptography

  3. 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)

  4. Solving Linear Equations 5𝑑 ! + 11𝑑 " = 2 2𝑑 ! + 𝑑 " = 6 7𝑑 ! + 𝑑 " = 26 where all equations are over β„€ , the integers

  5. Solving Linear Equations s and A Given : A GOAL : Find s. More generally, π‘œ variables and 𝑛 ≫ π‘œ equations.

  6. Solving Linear Equations s and A Given : A GOAL : Find s. EASY! For example, by Gaussian Elimination

  7. 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 π‘Ÿ

  8. 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.

  9. 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!

  10. 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 πœ“ $ .

  11. 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]

  12. 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

  13. Attack 1: Linearization Given 𝑩, 𝑩𝒕 + 𝒇 , find 𝒕 . BUT: Solving (even degree 2) polynomial equations is NP-hard. 𝒐 𝒐 𝒐 ( b βˆ’ βˆ‘ 𝒋(𝟐 𝑏 + 𝑑 + βˆ’ 1) ( b βˆ’ βˆ‘ 𝒋(𝟐 𝑏 + 𝑑 + ) ( b βˆ’ βˆ‘ 𝒋(𝟐 𝑏 + 𝑑 + + 1) = 0

  14. 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 ,-. !!!

  15. Attack 1: Linearization * 𝑏 !"# 𝑒 !"# + * 𝑏 !" 𝑒 !" + * 𝑏 ! 𝑒 ! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0 Solution space (with some eqns): The real solution 0 etc. / 𝑑 𝑒 +/0 = 𝑑 + 𝑑

  16. Attack 1: Linearization * 𝑏 !"# 𝑒 !"# + * 𝑏 !" 𝑒 !" + * 𝑏 ! 𝑒 ! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0 Solution space (with more eqns): The real solution 0 etc. / 𝑑 𝑒 +/0 = 𝑑 + 𝑑

  17. Attack 1: Linearization * 𝑏 !"# 𝑒 !"# + * 𝑏 !" 𝑒 !" + * 𝑏 ! 𝑒 ! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0 (with even more eqns): Solution space The real solution 0 etc. / 𝑑 𝑒 +/0 = 𝑑 + 𝑑

  18. Attack 1: Linearization * 𝑏 !"# 𝑒 !"# + * 𝑏 !" 𝑒 !" + * 𝑏 ! 𝑒 ! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0 Solution space (keep going): The real solution 0 etc. / 𝑑 𝑒 +/0 = 𝑑 + 𝑑

  19. Attack 1: Linearization * 𝑏 !"# 𝑒 !"# + * 𝑏 !" 𝑒 !" + * 𝑏 ! 𝑒 ! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0 When #eqns = #vars β‰ˆ 𝑃(π‘œ 1 ) the only surviving solution to the linear system is the real solution.

  20. 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.

  21. 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 𝒓/π‘ͺ > πŸ‘ 𝒐

  22. 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!

  23. Decisional LWE Can you distinguish between : s + and , e A A , b A Theorem: β€œDecisional LWE is as hard as LWE”.

  24. 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…

  25. 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

  26. 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)

  27. 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.

  28. Public-key Encryption [Regev05] & β€’ Secret key sk = Uniformly random vector s Î π‘Ž % β€’ Public key pk: for 𝑗 𝑔𝑠𝑝𝑛 1 𝑒𝑝 𝑛 = π‘žπ‘π‘šπ‘§(π‘œ) TBD 𝒅 𝒋 = (𝒃 𝒋 , 𝒃 𝒋 , 𝒕 + 𝑓 ! )

  29. 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.

  30. 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) .

  31. 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 .

  32. 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.

  33. 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 π‘Ÿ.

  34. 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