CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security

Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 21 November 18, 2015 CPSC 467, Lecture 21 1/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security The Legendre and Jacobi Symbols The Legendre symbol Jacobi symbol Computing the Jacobi symbol BBS Pseudorandom Sequence Generator Bit Commitment Problem Bit Commitment Using QR Cryptosystem Bit Commitment Using Symmetric Cryptography Bit Commitment Using Hash Functions Bit Commitment Using Pseudorandom Sequence Generators Appendix 1: Formalization of Bit Commitment Schemes Appendix 2: Security of BBS CPSC 467, Lecture 21 2/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security The Legendre and Jacobi Symbols CPSC 467, Lecture 21 3/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Notation for quadratic residues The Legendre and Jacobi symbols form a kind of calculus for reasoning about quadratic residues and non-residues. They lead to a feasible algorithm for determining membership in 01 10 Qn [ Qn . Like the Euclidean gcd algorithm, the algorithm does not require factorization of its arguments. The existence of this algorithm also explains why the Goldwasser-Micali cryptosystem can't use all of QNRn in the 01 10 encryption of \1", for those elements in Qn [ Qn are readily determined to be in QNRn. CPSC 467, Lecture 21 4/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Legendre Legendre symbol a Let p be an odd prime, a an integer. The Legendre symbol p is a number in {−1; 0; +1g, defined as follows: 8 +1 if a is a non-trivial quadratic residue modulo p a < = 0 if a ≡ 0 (mod p) p : −1 if a is not a quadratic residue modulo p By the Euler Criterion, we have Theorem Let p be an odd prime. Then a p−1 ≡ a( 2 ) (mod p) p Note that this theorem holds even when p ja. CPSC 467, Lecture 21 5/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Legendre Properties of the Legendre symbol The Legendre symbol satisfies the following multiplicative property: Fact Let p be an odd prime. Then a a a a 1 2 = 1 2 p p p Not surprisingly, if a1 and a2 are both non-trivial quadratic residues, then so is a1a2. Hence, the fact holds when a a 1 = 2 = 1: p p CPSC 467, Lecture 21 6/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Legendre Product of two non-residues Suppose a1 62 QRp, a2 62 QRp. The above fact asserts that the product a1a2 is a quadratic residue since a a a a 1 2 = 1 2 = (−1)(−1) = 1: p p p Here's why. I Let g be a primitive root of p. k k I Write a1 ≡ g 1 (mod p) and a2 ≡ g 2 (mod p). I Both k1 and k2 are odd since a1, a2 62 QRp. I But then k1 + k2 is even. (k +k )=2 k +k I Hence, g 1 2 is a square root of a1a2 ≡ g 1 2 (mod p), so a1a2 is a quadratic residue. CPSC 467, Lecture 21 7/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Jacobi The Jacobi symbol The Jacobi symbol extends the Legendre symbol to the case where the \denominator" is an arbitrary odd positive number n. Qk ei Let n be an odd positive integer with prime factorization i=1 pi . We define the Jacobi symbol by k e a Y a i = (1) n pi i=1 The symbol on the left is the Jacobi symbol, and the symbol on the right is the Legendre symbol. a (By convention, this product is 1 when k = 0, so 1 = 1.) The Jacobi symbol extends the Legendre symbol since the two definitions coincide when n is an odd prime. CPSC 467, Lecture 21 8/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Jacobi Meaning of Jacobi symbol What does the Jacobi symbol mean when n is not prime? a I If n = +1, a might or might not be a quadratic residue. a I If n = 0, then gcd(a; n) 6= 1. a I If n = −1 then a is definitely not a quadratic residue. CPSC 467, Lecture 21 9/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Jacobi Jacobi symbol = +1 for n = pq Let n = pq for p, q distinct odd primes. Since a a a = (2) n p q a there are two cases that result in n = 1: a a 1. p = q = +1, or a a 2. p = q = −1. CPSC 467, Lecture 21 10/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Jacobi Case of both Jacobi symbols = +1 a a 11 If p = q = +1, then a 2 QRp \ QRq = Qn . It follows by the Chinese Remainder Theorem that a 2 QRn. p This fact was implicitly used in the proof sketch that j aj = 4. CPSC 467, Lecture 21 11/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Jacobi Case of both Jacobi symbols = −1 a a 00 If p = q = −1, then a 2 QNRp \ QNRq = Qn . In this case, a is not a quadratic residue modulo n. Such numbers a are sometimes called \pseudo-squares" since they have Jacobi symbol 1 but are not quadratic residues. CPSC 467, Lecture 21 12/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Identities Computing the Jacobi symbol a The Jacobi symbol n is easily computed from its definition (equation 1) and the Euler Criterion, given the factorization of n. Similarly, gcd(u; v) is easily computed without resort to the Euclidean algorithm given the factorizations of u and v. The remarkable fact about the Euclidean algorithm is that it lets us compute gcd(u; v) efficiently, without knowing the factors of u and v. a A similar algorithm allows us to compute the Jacobi symbol n efficiently, without knowing the factorization of a or n. CPSC 467, Lecture 21 13/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Identities Identities involving the Jacobi symbol The algorithm is based on identities satisfied by the Jacobi symbol: 1 if n = 1 1. 0 = n 0 if n 6= 1; 1 if n ≡ ±1 (mod 8) 2. 2 = n −1 if n ≡ ±3 (mod 8); a1 a2 3. n = n if a1 ≡ a2 (mod n); 2a 2 a 4. n = n · n ; ( n if a; n odd and :(a ≡ n ≡ 3 (mod 4)) 5. a = a n n − a if a; n odd and a ≡ n ≡ 3 (mod 4): CPSC 467, Lecture 21 14/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Identities A recursive algorithm for computing Jacobi symbol /* Precondition: a, n >= 0; n is odd */ int jacobi(int a, int n) { if (a == 0) /* identity 1 */ return (n==1) ? 1 : 0; if (a == 2) /* identity 2 */ switch (n%8) { case 1: case 7: return 1; case 3: case 5: return -1; } if ( a >= n ) /* identity 3 */ return jacobi(a%n, n); if (a%2 == 0) /* identity 4 */ return jacobi(2,n)*jacobi(a/2, n); /* a is odd */ /* identity 5 */ return (a%4 == 3 && n%4 == 3) ? -jacobi(n,a) : jacobi(n,a); } CPSC 467, Lecture 21 15/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security BBS Pseudorandom Sequence Generator CPSC 467, Lecture 21 16/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Blum primes and integers A Blum prime is a prime p such that p ≡ 3 (mod 4). A Blum integer is a number n = pq, where p and q are Blum primes. If p is a Blum prime, then −1 2 QNRp. This follows from the p−1 Euler criterion, since 2 is odd. By definition of the Legendre −1 symbol, p = −1. If n is a Blum integer, then −1 2 QNRn, but now −1 −1 −1 = = (−1)(−1) = 1: n p q CPSC 467, Lecture 21 17/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Square roots of Blum primes Theorem p Let p be a Blum prime, a 2 QRp, and fb; −bg = a be the two square roots of a. Then exactly one of b and −b is itself a quadratic residue. Proof. (−b)(p−1)=2 6= b(p−1)=2 since (−b)(p−1)=2 = (−1)(p−1)=2b(p−1)=2 = (−1)b(p−1)=2: p Both (−b)(p−1)=2 and b(p−1)=2 are in 1 = {±1g, so it follows from the Euler criterion that one of b, −b is a quadratic residue and the other is not. CPSC 467, Lecture 21 18/67 Outline Legendre/Jacobi BBS Bit commitment Appendix 1: Formalization of Bit Commitment Schemes BBS Security Square roots of Blum integers Theorem (QR square root) Let n = pq be a Blum integer and a 2 QRn.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    67 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us