



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




U.C. Berkeley — CS276: Cryptography Handout N Luca Trevisan April 30, 2009
Scribed by Madhur Tulsiani, posted May 16, 2009
In this lecture we begin the construction and analysis of a zero-knowledge protocol for the 3-coloring problem. Via reductions, this extends to a protocol for any prob- lem in NP. We will only be able to establish a weak form of zero knowledge, called “computational zero knowledge” in which the output of the simulator and the inter- action in the protocol are computationally indistinguishable (instead of identical). It is considered unlikely that NP-complete problem can have zero-knowledge protocols of the strong type we defined in the previous lectures.
As a first step, we will introduce the notion of a commitment scheme and provide a construction based on any one-way permutation.
A commitment scheme is a two-phase protocol between a Sender and a Receiver. The Sender holds a message m and, in the first phase, it picks a random key K and then “encodes” the message using the key and sends the encoding (a commitment to m) to the Receiver. In the second phase, the Sender sends the key K to the Receiver can open the commitment and find out the content of the message m.
A commitment scheme should satisfy two security properties:
It is impossible to satisfy both properties against computationally unbounded adver- saries. It is possible, however, to have schemes in which the Hiding property holds against computationally unbounded Receivers and the Binding property holds (un- der appropriate assumptions on the primitive used in the construction) for bounded- complexity Senders; and it is possible to have schemes in which the Hiding property
holds (under assumptions) for bounded-complexity Receivers while the Binding prop- erty holds against any Sender. We shall describe a protocol of the second type, based on one-way permutations. The following definition applies to one-round implementa- tions of each phase, although a more general definition could be given in which each phase is allowed to involve multiple interactions.
Definition 1 (Computationally Hiding, Perfectly Binding, Commitment Scheme) A Perfectly Binding and (t, )-Hiding Commitment Scheme for messages of length ` is a pair of algorithms (C, O) such that
O(K, C(K, m)) = m
| (^) P[A(C(K, m)) = 1] − (^) P[A(C(K, m′)) = 1]| ≤
O(K′, C(K, m)) ∈ {m, F AIL}
In the following we shall refer to such a scheme (C, O) as simply a (t, )-secure com- mitment scheme.
Given a one-way permutation f : { 0 , 1 }n^ → { 0 , 1 }n^ and a hard-core predicate P , we consider the following construction of a one-bit commitment scheme:
Theorem 2 If P is a (t, )-secure hard core predicate for f , then the above construc- tion is a (t − O(1), 2 )-secure commitment scheme.
Proof: The binding property of the commitment scheme is easy to argue as the commitment is a permutation of the key and the message. In particular, given C(K, m) = (x, y), we can find the unique K and m that generate it as
K = f −^1 (x) and m = y ⊕ P (K) = y ⊕ P (f −^1 (x))
, m) := C(K 1 , m 1 ),... , C(K, m`), c 1 ,... , c) equals F AIL if at least one of O(Ki, ci) outputs F AIL; otherwise it equals O(K 1 , c 1 ),... , O(K, c).Proof: The commitment to m is easily seen to be binding since the commitments to each bit of m are binding. The soundness can be proven by a hybrid argument.
Suppose there is an A algorithm distinguishing C(K 1 ,... , K, m) and C(K 1 ,... , K, m) with probability more than · . We then consider “hybrid messages” m(0),... , m(), where m(i)^ = m′ 1... m′ imi+1,... , m`. By a hybrid argument, there is some i such that
∣ ∣P[A(K 1 ,... , K, m(i)) = 1] − (^) P[A(K 1 ,... , K, m(i+1)) = 1]
But since m(i)^ and m(i+1)^ differ in only one bit, we can get an algorithm A′^ that breaks the hiding property of the one bit commitment scheme C(·, ·). A′, given a commitment c, outputs
A′(c) = A(C(K 1 , m 1 ),... , C(Ki, mi), c, C(Ki+2, m′ i+2),... , C(K, m′))
Hence, A′^ has complexity at most t + O(r · l) and distinguishes C(Ki+1, mi+1) from C(Ki+1, m′ i+1).
There is also a construction based on one-way permutations that is better in terms of key length.
We assume we have a (t, )-secure commitment scheme (C, O) for messages in the set { 1 , 2 , 3 }.
The prover P takes in input a 3-coloring graph G = ([n], E) (we assume that the set of vertices is the set { 1 ,... , n} and use the notation [n] := { 1 ,... , n}) and a proper 3-coloring α : [n] → { 1 , 2 , 3 } of G (that is, α is such that for every edge (u, v) ∈ E we have α(u) 6 = α(v)). The verifier V takes in input G. The protocol, in which the prover attempts to convince the verifier that the graph is 3-colorable, proceeds as follows:
Theorem 4 The protocol is complete and it has soundness error at most (1 − 1 /|E|).
Proof: The protocol is easily seen to be complete, since if the prover sends a valid 3-coloring, the colors on endpoints of every edge will be different.
To prove the soundness, we first note that if any commitment sent by the prover opens to an invalid color, then the protocol will fail with probability at least 1/|E| when querying an edge adjacent to the corresponding vertex (assuming the graph has no isolated vertices - which can be rivially removed). If all commitments open to valid colos, then the commitments define a 3-coloring of the graph. If the graph is not 3-colorable, then there must be at least one edge e both of whose end points receive the same color. Then the probability of the verifier rejecting is at least the probability of choosing e, which is 1/|E|.
Repeating the protocol k times sequentially reduces the soundness error to (1 − 1 /|E|)k; after about 27 · |E| repetitions the error is at most about 2−^40.
We now describe, for every verifier algorithm V ∗, a simulator S∗^ of the interaction between V ∗^ and the prover algorithm.
The basic simulator is as follows:
Algorithm S 1 ∗round
Given the lemma, we can now easily prove the theorem.
Proof: (of Theorem 5) The probability that S 1 ∗round outputs F AIL is given by
P [S 1 ∗round outputs^ F AIL]^ =^
3 n^
c∈{ 1 , 2 , 3 }n
(u,v)∈E c(u) 6 =c(v)
p(u, v, c)
Let 1 denote the coloring which assigns the color 1 to every vertex. Then using Lemma 6 we bound the above as
P [S∗ 1 round outputs^ F AIL]^ ≤^
3 n^
c∈{ 1 , 2 , 3 }n
(u,v)∈E c(u) 6 =c(v)
(p(u, v, 1 ) + )
(u,v)∈E
p(u, v, 1 )
c:c(u) 6 =c(v)
3 n
(u,v)∈E
p(u, v, 1 ) +
where in the second step we used the fact that c(u) 6 = c(v) for a 1/3 fraction of all the colorings and the last step used that the probability of V ∗^ selecting some edge given the coloring 1 is 1.