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 10 Today: Constructions of Public-Key Encryption 1: Trapdoor Permutations (RSA) composite N/factoring 2: Quadratic Residuosity/Goldwasser-Micali composite N/factoring 3:


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

  2. Today: Constructions of Public-Key Encryption 1: Trapdoor Permutations (RSA) composite N/factoring 2: Quadratic Residuosity/Goldwasser-Micali composite N/factoring 3: Diffie-Hellman/El Gamal prime p/discrete log small numbers, large 4: Learning with Errors/Regev dimensions

  3. Trapdoor One-way Permutations Trapdoor One-way Functions F Easy to compute Hard to invert Easy to invert domain range given a range trapdoor Domain = Range

  4. Review: Number Theory Let’s review some number theory from L7-8. Let 𝑂 = π‘žπ‘Ÿ be a product of two large primes. βˆ— = {𝑏 ∈ π‘Ž ! : gcd a, N = 1} is a group. Fact: π‘Ž ! group operation is multiplication mod 𝑂 . β€’ inverses exist and are easy to compute (how so?) β€’ the order of the group is Ο• 𝑂 = π‘ž βˆ’ 1 (π‘Ÿ βˆ’ 1) β€’ Lecture 8: The map 𝐺 𝑦 = 𝑦 # mod 𝑂 is a 4-to-1 trapdoor function, as hard to invert as factoring 𝑂 .

  5. The RSA Trapdoor Permutation Today: Let 𝑓 be an integer with gcd 𝑓, Ο•(𝑂) = 1. Then, !,% 𝑦 = 𝑦 % mod 𝑂 is a trapdoor permutation. the map 𝐺 Key Fact: Given 𝑒 such that 𝑓𝑒 = 1 mod Ο• 𝑂 , it is easy to compute 𝑦 given 𝑦 % . Proof: (𝑦 % ) & = 𝑦 '( ! )* = (𝑦 ( ! ) ' = 𝑦 = 𝑦 mod 𝑂 (for some integer k) This gives us the RSA trapdoor permutation collection. {𝐺 !,% : gcd 𝑓, 𝑂 = 1} Trapdoor for inversion: 𝑒 = 𝑓 +* mod Ο• 𝑂 .

  6. The RSA Trapdoor Permutation Today: Let 𝑓 be an integer with gcd 𝑓, Ο•(𝑂) = 1. Then, !,% 𝑦 = 𝑦 % mod 𝑂 is a trapdoor permutation. the map 𝐺 Hardness of inversion without trapdoor = RSA assumption given 𝑂, 𝑓 (as above) and 𝑦 % mod N, hard to compute 𝑦. We know that if factoring is easy, RSA is broken (and that’s the only known way to break RSA) Major Open Problem: Are factoring and RSA equivalent?

  7. The RSA Trapdoor Permutation Today: Let 𝑓 be an integer with gcd 𝑓, Ο•(𝑂) = 1. Then, !,% 𝑦 = 𝑦 % mod 𝑂 is a trapdoor permutation. the map 𝐺 Hardcore bits (galore) for the RSA trapdoor one-way perm: The Goldreich-Levin bit GL 𝑠; 𝑠 , = 𝑠, 𝑠′ mod 2 β€’ The least significant bit LSB 𝑠 β€’ The β€œmost significant bit” 𝐼𝐡𝑀𝐺 ! 𝑠 = 1 iff 𝑠 < 𝑂/2 β€’ In fact, any single bit of 𝑠 is hardcore. β€’

  8. RSA Encryption π»π‘“π‘œ 1 - : Let 𝑂 = π‘žπ‘Ÿ and 𝑓, 𝑒 be such that β€’ 𝑓𝑒 = 1 𝑛𝑝𝑒 𝜚(𝑂) . Let π‘žπ‘™ = (𝑂, 𝑓) and let 𝑑𝑙 = 𝑒 . πΉπ‘œπ‘‘ π‘žπ‘™, 𝑐 where 𝑐 is a bit: Generate random 𝑠 ∈ β€’ βˆ— and output 𝑠 % mod 𝑂 and LSB 𝑠 ⨁𝑛 . π‘Ž ! 𝐸𝑓𝑑 𝑑𝑙, 𝑑 : Recover 𝑠 via RSA inversion. β€’ IND-secure under the RSA assumption: given 𝑂, 𝑓 (as above) and 𝑠 % mod N, hard to compute 𝑠.

  9. Today: Constructions of Public-Key Encryption 1: Trapdoor Permutations (RSA) 2: Quadratic Residuosity/Goldwasser-Micali 3: Diffie-Hellman/El Gamal 4: Learning with Errors/Regev

  10. Quadratic Residuosity Let’s review some more number theory from L7-8. Let 𝑂 = π‘žπ‘Ÿ be a product of two large primes. βˆ— π‘Ž ! 𝐾𝑏𝑑 )* 𝐾𝑏𝑑 +* {𝑦: 𝑦 {𝑦: 𝑦 𝑂 = +1} 𝑂 = βˆ’1} Jacobi symbol . ! = . . 0 is +1 if 𝑦 is a square mod / both π‘ž and π‘Ÿ or a non-square mod both π‘ž and π‘Ÿ .

  11. Quadratic Residuosity Let’s review some more number theory from L7-8. Let 𝑂 = π‘žπ‘Ÿ be a product of two large primes. βˆ— π‘Ž ! 𝐾𝑏𝑑 )* 𝐾𝑏𝑑 +* {𝑦: 𝑦 {𝑦: 𝑦 𝑂 = +1} 𝑂 = βˆ’1} Surprising fact : Jacobi symbol . ! = . . 0 is / computable in poly time without knowing π‘ž and π‘Ÿ .

  12. Quadratic Residuosity Let’s review some more number theory from L7-8. Let 𝑂 = π‘žπ‘Ÿ be a product of two large primes. 𝐾𝑏𝑑 )* " " 𝑅𝑆 ! So: 𝑅𝑆 ! = {𝑦: # = $ = +1} 𝑅𝑂𝑆 ! " " 𝑅𝑂𝑆 ! = {𝑦: # = $ = βˆ’1} 𝑅𝑆 ! is the set of squares mod 𝑂 and 𝑅𝑂𝑆 ! is the set of non-squares mod 𝑂 with Jacobi symbol +1.

  13. Quadratic Residuosity Let’s review some more number theory from L7-8. Let 𝑂 = π‘žπ‘Ÿ be a product of two large primes. Quadratic Residuosity Assumption (QRA) Let 𝑂 = π‘žπ‘Ÿ be a product of two large primes. No PPT algorithm can distinguish between a random element of 𝑅𝑆 ! from a random element of 𝑅𝑂𝑆 ! given only 𝑂 .

  14. Goldwasser-Micali (GM) Encryption π»π‘“π‘œ 1 - : Generate random π‘œ -bit primes π‘ž and π‘Ÿ and let 𝑂 = π‘žπ‘Ÿ . Let 𝑧 ∈ 𝑅𝑂𝑆 ! be some quadratic non- residue with Jacobi symbol +1. Let π‘žπ‘™ = (𝑂, 𝑧) and let 𝑑𝑙 = (π‘ž, π‘Ÿ) . πΉπ‘œπ‘‘ π‘žπ‘™, 𝑐 where 𝑐 is a bit: βˆ— and output 𝑠 # mod 𝑂 if Generate random 𝑠 ∈ π‘Ž ! 𝑐 = 0 and 𝑠 # 𝑧 mod 𝑂 if 𝑐 = 1 . βˆ— is a quadratic residue 𝐸𝑓𝑑 𝑑𝑙, 𝑑 : Check if c ∈ π‘Ž ! using π‘ž and π‘Ÿ . If yes, output 0 else 1.

  15. Goldwasser-Micali (GM) Encryption πΉπ‘œπ‘‘ π‘žπ‘™, 𝑐 where 𝑐 is a bit: βˆ— and output 𝑠 # mod 𝑂 if Generate random 𝑠 ∈ π‘Ž ! 𝑐 = 0 and 𝑠 # 𝑧 mod 𝑂 if 𝑐 = 1 . IND-security follows directly from the quadratic residuosity assumption.

  16. GM is a Homomorphic Encryption Given a GM-ciphertext of 𝑐 and a GM-ciphertext of 𝑐′ , I can compute a GM-ciphertext of 𝑐 + 𝑐 , 𝑛𝑝𝑒 2. without knowing anything about 𝒄 or 𝒄′ ! πΉπ‘œπ‘‘ π‘žπ‘™, 𝑐 where 𝑐 is a bit: βˆ— and output 𝑠 # 𝑧 < mod 𝑂. Generate random 𝑠 ∈ π‘Ž ! Claim: πΉπ‘œπ‘‘ π‘žπ‘™, 𝑐 = πΉπ‘œπ‘‘(π‘žπ‘™, 𝑐 , ) is an encryption of 𝑐⨁𝑐 , = 𝑐 + 𝑐 , 𝑛𝑝𝑒 2 .

  17. Today: Constructions of Public-Key Encryption 1: Trapdoor Permutations (RSA) 2: Quadratic Residuosity/Goldwasser-Micali 3: Diffie-Hellman/El Gamal 4: Learning with Errors/Regev

  18. Diffie-Hellman Key Exchange (𝑕 . ) = = (𝑕 = ) . Commutativity in the exponent: (where 𝑕 is an element of some group) So, you can compute 𝑕 .= given either 𝑕 . and 𝑧 , or 𝑕 = and 𝑦. Diffie-Hellman Assumption (DHA): Hard to compute 𝑕 .= given only 𝑕, 𝑕 . and 𝑕 =

  19. Diffie-Hellman Key Exchange Diffie-Hellman Assumption (DHA): Hard to compute it given only 𝑕, 𝑕 . and 𝑕 = We know that if discrete log is easy, DHA is false. Major Open Problem: Are discrete log and DHA equivalent?

  20. Diffie-Hellman Key Exchange π‘ž, 𝑕: Generator of our group π‘Ž ! βˆ— 𝑕 . mod π‘ž 𝑕 = mod π‘ž Pick a random Pick a random number 𝑦 ∈ π‘Ž /+* number y ∈ π‘Ž /+* Shared key K = 𝑕 .= mod π‘ž Shared key K = 𝑕 .= mod π‘ž = (𝑕 = ) . mod π‘ž = (𝑕 . ) = mod π‘ž

  21. Diffie-Hellman/El Gamal Encryption π»π‘“π‘œ 1 - : Generate an π‘œ -bit prime π‘ž and a generator β€’ βˆ— . Choose a random number 𝑦 ∈ π‘Ž /+* 𝑕 of π‘Ž / Let π‘žπ‘™ = (π‘ž, 𝑕, 𝑕 . ) and let 𝑑𝑙 = 𝑦 . βˆ— : Generate random 𝑧 ∈ πΉπ‘œπ‘‘ π‘žπ‘™, 𝑛 where 𝑛 ∈ π‘Ž / β€’ π‘Ž /+* and output (𝑕 = , 𝑕 .= = 𝑛 ) 𝐸𝑓𝑑 𝑑𝑙 = 𝑦, 𝑑 : Compute 𝑕 .= using 𝑕 = and 𝑦 and β€’ divide the second component to retrieve 𝑛 . Is this Secure?

  22. The Problem Claim: Given p, g, 𝑕 . mod π‘ž and 𝑕 = mod π‘ž, adversary can compute some information about 𝑕 .= mod π‘ž. determine if 𝑕 .= mod π‘ž is a square mod π‘ž . Corollary: Therefore, additionally given 𝑕 .= = 𝑛 mod π‘ž , the adversary can determine whether 𝑛 is a square mod π‘ž , violating β€œIND-security”.

  23. The Problem Claim: Given p, g, 𝑕 . mod π‘ž and 𝑕 = mod π‘ž, adversary can determine if 𝑕 .= mod π‘ž is a square mod π‘ž . 𝑕 .= mod π‘ž is a square ⟺ 𝑦𝑧 (mod π‘ž βˆ’ 1) is even ⟺ 𝑦𝑧 is even ⟺ 𝑦 is even or 𝑧 is even ⟺ 𝑦 (𝑛𝑝𝑒 π‘ž βˆ’ 1) is even or 𝑧 (mod p βˆ’ 1) is even ⟺ 𝑕 . 𝑛𝑝𝑒 π‘ž or 𝑕 = 𝑛𝑝𝑒 π‘ž is a square This can be checked in poly time!

  24. Diffie-Hellman Encryption Claim: Given p, g, 𝑕 . mod π‘ž and 𝑕 = mod π‘ž, adversary can determine if 𝑕 .= mod π‘ž is a square mod π‘ž . More generally, dangerous to work with groups that have non-trivial subgroups (in our case, the subgroup of all squares mod p) Lesson: Best to work over a group of prime order. Such groups have no subgroups. An Example: Let π‘ž = 2π‘Ÿ + 1 where π‘Ÿ is a prime itself. /+* Then, the group of squares mod π‘ž has order = π‘Ÿ . #

  25. Diffie-Hellman/El Gamal Encryption π»π‘“π‘œ 1 - : Generate an π‘œ -bit β€œsafe” prime π‘ž = 2π‘Ÿ + 1 β€’ βˆ— and let β„Ž = 𝑕 # mod π‘ž be a and a generator 𝑕 of π‘Ž / generator of 𝑅𝑆 / . Choose a random number 𝑦 ∈ π‘Ž 0 . Let π‘žπ‘™ = (π‘ž, β„Ž, β„Ž . ) and let 𝑑𝑙 = 𝑦 . πΉπ‘œπ‘‘ π‘žπ‘™, 𝑛 where 𝑛 ∈ 𝑅𝑆 / : Generate random 𝑧 ∈ β€’ π‘Ž 0 and output (𝑕 = , 𝑕 .= = 𝑛 ) 𝐸𝑓𝑑 𝑑𝑙 = 𝑦, 𝑑 : Compute 𝑕 .= using 𝑕 = and 𝑦 and β€’ divide the second component to retrieve 𝑛 .

  26. Decisional Diffie-Hellman Assumption Decisional Diffie-Hellman Assumption (DDHA): Hard to distinguish between 𝑕 .= and a uniformly random group element, given 𝑕, 𝑕 . and 𝑕 = That is, the following two distributions are computationally indistinguishable: (𝑕, 𝑕 . , 𝑕 = , 𝑕 .= ) β‰ˆ (𝑕, 𝑕 . , 𝑕 = , 𝑣) DH/El Gamal is IND-secure under the DDH assumption.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend