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: Diffie-Hellman/El Gamal prime p/discrete log small numbers, large 4: Learning with Errors/Regev dimensions
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
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 π .
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 Ο π .
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?
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. β’
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 π .
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
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 π .
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 π .
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.
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 π .
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.
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.
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 .
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
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 π =
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?
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 π
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?
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β.
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!
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 = π . #
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 π .
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.
Recommend
More recommend