Docsity

The Graph Isomorphism Protocol - Luca Trevisan, UC Berkeley, Lecture notes of Mathematics

Toggle sidebar
bg1
U.C. Berkeley — CS276: Cryptography Handout N25
Luca Trevisan April 23, 2009
Notes for Lecture 25
Scribed by Alexandra Constantin, posted May 4, 2009
Summary
Today we show that the graph isomorphism protocol we defined last time is indeed a
zero-knowledge protocol. Then we discuss the quadratic residuosity problem modulo
a composite, and define a protocol for proving quadratic residuosity. (We shall prove
that the protocol is zero knowledge next time.)
1 The Graph Isomorphism Protocol
Last time we considered the following protocol for the graph isomorphism problem.
•Verifier’s input: two graphs G1= (V, E1), G2= (V, E2);
•Prover’s input: G1, G2and permutation π∗such that π∗(G1) = G2; the prover
wants to convince the verifier that the graphs are isomorphic
•The prover picks a random permutation πR:V→Vand sends the graph
G:= πR(G2)
•The verifier picks at random b∈ {1,2}and sends bto the prover
•The prover sends back πRif b= 2, and πR(π∗(·)) otherwise
•The verifier cheks that the permutation πreceived at the previous round is such
that π(Gb) = G, and accepts if so.
In order to prove that this protocol is zero knowledge, we have to show the existence
of an efficient simulator.
Theorem 1 (Honest-Verifier Zero Knowledge) There exists an efficient simu-
lator algorithm S∗such that, for every two isomorphic graphs G1, G2, and for every
isomorphism πbetween them, the distributions of transcripts
P(π, G1, G2)↔V er(G1, G2) (1)
1
pf3
pf4
pf5

Partial preview of the text

Download The Graph Isomorphism Protocol - Luca Trevisan, UC Berkeley and more Lecture notes Mathematics in PDF only on Docsity!

U.C. Berkeley — CS276: Cryptography Handout N Luca Trevisan April 23, 2009

Notes for Lecture 25

Scribed by Alexandra Constantin, posted May 4, 2009

Summary

Today we show that the graph isomorphism protocol we defined last time is indeed a zero-knowledge protocol. Then we discuss the quadratic residuosity problem modulo a composite, and define a protocol for proving quadratic residuosity. (We shall prove that the protocol is zero knowledge next time.)

1 The Graph Isomorphism Protocol

Last time we considered the following protocol for the graph isomorphism problem.

  • Verifier’s input: two graphs G 1 = (V, E 1 ), G 2 = (V, E 2 );
  • Prover’s input: G 1 , G 2 and permutation π∗^ such that π∗(G 1 ) = G 2 ; the prover wants to convince the verifier that the graphs are isomorphic
  • The prover picks a random permutation πR : V → V and sends the graph G := πR(G 2 )
  • The verifier picks at random b ∈ { 1 , 2 } and sends b to the prover
  • The prover sends back πR if b = 2, and πR(π∗(·)) otherwise
  • The verifier cheks that the permutation π received at the previous round is such that π(Gb) = G, and accepts if so.

In order to prove that this protocol is zero knowledge, we have to show the existence of an efficient simulator.

Theorem 1 (Honest-Verifier Zero Knowledge) There exists an efficient simu- lator algorithm S∗^ such that, for every two isomorphic graphs G 1 , G 2 , and for every isomorphism π between them, the distributions of transcripts

P (π, G 1 , G 2 ) ↔ V er(G 1 , G 2 ) (1)

and S(G 1 , G 2 ) (2)

are identical, where P is the prover algorithm and V er is the verifier algorithm in the above protocol.

Proof:

Algorithm S on input G 1 , G 2 is described as follows:

  • Input: graphs G 1 , G 2
  • pick uniformly at random b ∈ { 1 , 2 }, πR : V → V
  • output the transcript:
    1. prover sends G = πR(Gb)
    2. verifier sends b
    3. prover sends πR

At the first step, in the original protocol we have a random permutation of G 2 , while in the simulation we have either a random permutation of G 1 or a random permutation of G 2 ; a random permutation of G 1 , however, is distributed as πR(π∗(G 2 )), where πR is uniformly distributed and π∗^ is fixed. This is the same as a random permutation of G 2 , because composing a fixed permutation with a random permutation produces a random permutation.

The second step, both in the simulation and in the original protocol, is a random bit b, selected independently of the graph G sent in the first round. This is true in the simulation too, because the distribution of G := πR(Gb) conditioned on b = 1 is, by the above reasoning, identical to the distribution of G conditioned on b = 0.

Finally, the third step is, both in the protocol and in the simulation, a distribution uniformly distributed among those establishing an isomorphism between G and Gb. 

To establish that the protocol satisfies the general zero knowledge protocol, we need to be able to simulate cheating verifiers as well.

Theorem 2 (General Zero Knowledge) For every verifier algorithm V ∗^ of com- plexity t there is a simulator algorithm S∗^ of expected complexity ≤ 2 t + O(n^2 ) such that, for every two isomorphic graphs G 1 , G 2 , and for every isomorphism π between them, the distributions of transcripts

P (π, G 1 , G 2 ) ↔ V ∗(G 1 , G 2 ) (3)

  • Z∗ N has (p − 1) · (q − 1) elements, and is a group with respect to multiplication;

Proof: Consider the mapping x → (x mod p, x mod q); it is a bijection because of the Chinese remainder theorem. (We will abuse notation and write x = (x mod p, x mod q).) The elements of Z∗ N are precisely those which are mapped into pairs (a, b) such that a 6 = 0 and b 6 = 0, so there are precisely (p − 1) · (q − 1) elements in Z∗ N. If x = (xp, xq), y = (yp, yq), and z = (xp × yp mod p, xq × yq mod q), then z = x × y mod N ; note that if x, y ∈ Z∗ N then xp, yp, xq, yq are all non-zero, and so z mod p and z mod q are both non-zero and z ∈ Z∗ N. If we consider any x ∈ Z∗ N and we denote x′^ = (x− p 1 mod p, x− q 1 mod q), then x · x′^ mod N = (xpx− p 1 , xqx− q 1 ) = (1, 1) = 1. Therefore, Z∗ N is a group with respect to multiplication. 

  • If r = x^2 mod N is a quadratic residue, and is an element of Z∗ N , then it has exactly 4 square roots in Z∗ N Proof: If r = x^2 mod N is a quadratic residue, and is an element of Z∗ N , then: r ≡ x^2 mod p r ≡ x^2 mod q. Define xp = x mod p and xq = x mod q and consider the following four numbers: x = x 1 = (xp, xq) x 2 = (−xp, xq) x 3 = (xp, −xq) x 4 = (−xp, −xq). x^2 ≡ x^21 ≡ x^22 ≡ x^23 ≡ x^24 ≡ r mod N. Therefore, x 1 , x 2 , x 3 , x 4 are distinct square roots of r, so r has 4 square roots. 
  • Precisely (p − 1) · (q − 1)/4 elements of Z∗ N are quadratic residues

Proof: According to the previous results, Z∗ N has (p − 1) · (q − 1) elements, and each quadratic residue in Z∗ N has exactly 4 square roots. Therefore, (p − 1) · (q − 1)/ 4 elements of Z∗ N are quadratic residues. 

  • Knowing the factorization of N , there is an efficient algorithm to check if a given y ∈ Z∗ N is a quadratic residue and, if so, to find a square root.

It is, however, believed to be hard to find square roots and to check residuosity modulo N if the factorization of N is not known.

Indeed, we can show that from any algorithm that is able to find square roots effi- ciently mod N we can derive an algorithm that factors N efficiently.

Theorem 3 If there exists an algorithm A of running time t that finds quadratic residues modulo N = p · q with probability ≥ , then there exists an algorithm A∗^ of running time t + O(log N )O(1)^ that factors N with probability ≥  2.

Proof: Suppose that, for a quadratic residue r ∈ Z∗ N , we can find two square roots x, y such that x 6 = ±y (mod N ). Then x^2 ≡ y^2 ≡ r mod N , then x^2 − y^2 ≡ 0 mod N. Therefore, (x − y)(x + y) ≡ 0 mod N. So either (x − y) or (x + y) contains p as a factor, the other contains q as a factor.

The algorithm A∗^ is described as follows:

Given N = p × q

  • pick x ∈ { 0... N − 1 }
  • if x has common factors with N , return gcd(N, x)
  • if x ∈ Z∗ N
    • r := x^2 mod N
    • y := A(N, r)
    • if y 6 = ±x mod N return gcd(N, x + y)

WIth probability  over the choice of r, the algorithm finds a square root of r. Now the behavior of the algorithm is independent of how we selected r, that is which of the four square roots of r we selected as our x. Hence, there is probability 1/2 that, conditioned on the algorithm finding a square root of r, the square root y satisfies x 6 = ±y (mod N ), where x is the element we selected to generate r. 

3 The Quadratic Residuosity Protocol

We consider the following protocol for proving quadratic residuosity.