Docsity

Cryptography Homework 9: Interactive Proofs and Zero-Knowledge Protocols, Exercises of Cryptography and System Security

Toggle sidebar
bg1
COS 433/MAT 473 — Cryptography — Homework 9.
Do not submit. A solution will be posted on the website soon.
See course homepage for collaboration policy and late submissions.
Problem 1 (20 points) This question deals with ‘complexity theoretic’ interactive proofs. That is,
the verifier is a randomized polynomial time algorithm and the prover is unbounded (recall the definition
of IP shown in class).
•(The verifier randomness is essential) Show that the set of languages possessing interactive proofs
with a deterministic verifier is equal to NP.
•(The prover randomness is inessential) Show that any language that has an interactive proof has
one with a deterministic prover.
Problem 2 (40 points) Let gbe a known generator of Z∗
pwhere pis a prime. Let y=gx(where
xR
←Zp−1={1,· · · , p −2}) be an element of Z∗
p. A prover Pwants to prove to a verifier Vthat he
knows xthe discrete logarithm of yto the base g(both have yas input). Consider the following protocol
on input (p, g, y):
1. P: Choose rR
← {0.· · · , p −2}. Send w=grmod pto V.
2. V: Choose and send bR
← {0,1}
3. P: If b= 0,Psends s=rto V. If b= 1,Psends s=r+xmod p−1to V.
4. V: If b= 0, accept if gs=wmod p. If b= 1, accept if gs=wy mod p.
Show that the above is an interactive zero-knowledge proof system for Discrete Log. Your proof
should follow the same steps shown in class for the Quadratic Residues protocol:
•Show that this protocol satisfies completeness and soundness.
•Show that it is Zero-Knowledge by constructing, for every efficient verifier V∗, a simulator Sthat
generates a distribution which is statistically close to the view of V∗in the protocol. State clearly
all the steps performed by the simulator.
Problem 3 (30 points) In this question you will see a zero-knowledge protocol for proving inequality
of encrypted messages.
Consider a public-key encryption scheme (G, E, D)with the property that ciphertexts can be effi-
ciently re-randomized. That is, there is a probabilistic polynomial-time algorithm Tsuch that given any
valid public key pk and a ciphertext c=Epk (m;r)for some message mand randomness r,T(pk, c)
outputs a random encryption of mwith respect to pk . That is, T(pk , c)≡Epk (m;R)for uniformly
random R(El-Gamal has this property). Assume for simplicity that it is also easy to recognize valid
public keys and valid ciphertexts. (This holds for El Gamal as well.)
1
pf2

Partial preview of the text

Download Cryptography Homework 9: Interactive Proofs and Zero-Knowledge Protocols and more Exercises Cryptography and System Security in PDF only on Docsity!

COS 433/MAT 473 — Cryptography — Homework 9.

Do not submit. A solution will be posted on the website soon.

See course homepage for collaboration policy and late submissions.

Problem 1 (20 points) This question deals with ‘complexity theoretic’ interactive proofs. That is, the verifier is a randomized polynomial time algorithm and the prover is unbounded (recall the definition of IP shown in class).

  • (The verifier randomness is essential) Show that the set of languages possessing interactive proofs with a deterministic verifier is equal to NP.
  • (The prover randomness is inessential) Show that any language that has an interactive proof has one with a deterministic prover.

Problem 2 (40 points) Let g be a known generator of Z∗ p where p is a prime. Let y = gx^ (where

x ←R Zp− 1 = { 1 , · · · , p − 2 }) be an element of Z∗ p. A prover P wants to prove to a verifier V that he knows x the discrete logarithm of y to the base g (both have y as input). Consider the following protocol on input (p, g, y):

  1. P : Choose r ← {R 0. · · · , p − 2 }. Send w = gr^ mod p to V.
  2. V : Choose and send b ← {R 0 , 1 }
  3. P : If b = 0, P sends s = r to V. If b = 1, P sends s = r + x mod p − 1 to V.
  4. V : If b = 0, accept if gs^ = w mod p. If b = 1, accept if gs^ = wy mod p. Show that the above is an interactive zero-knowledge proof system for Discrete Log. Your proof should follow the same steps shown in class for the Quadratic Residues protocol:
  • Show that this protocol satisfies completeness and soundness.
  • Show that it is Zero-Knowledge by constructing, for every efficient verifier V ∗, a simulator S that generates a distribution which is statistically close to the view of V ∗^ in the protocol. State clearly all the steps performed by the simulator.

Problem 3 (30 points) In this question you will see a zero-knowledge protocol for proving inequality of encrypted messages. Consider a public-key encryption scheme (G, E, D) with the property that ciphertexts can be effi- ciently re-randomized. That is, there is a probabilistic polynomial-time algorithm T such that given any valid public key pk and a ciphertext c = Epk (m; r) for some message m and randomness r, T (pk , c) outputs a random encryption of m with respect to pk. That is, T (pk , c) ≡ Epk (m; R) for uniformly random R (El-Gamal has this property). Assume for simplicity that it is also easy to recognize valid public keys and valid ciphertexts. (This holds for El Gamal as well.)

  1. Prove that the following protocol is an interactive proof system for the language L = {(pk , Epk (m 0 ), Epk (m 1 )) : m 0 6 = m 1 }. Interactive proof (P, V ) Common input: (pk , c 0 , c 1 ) Prover’s private input: sk corresponding to pk

(a) V : Choose b ← {R 0 , 1 }, let c ←R T (cb), and send c to P. (b) P : Let m = Dsk (c). If m = m 0 , let g = 0, else let g = 1. Send g to V. (c) V : Accept iff g = b.

  1. Show that the above protocol is perfect zero knowledge for honest-but-curious verifiers. That is, exhibit a simulator whose output distribution is identical to the view of the honest verifier V when (pk , c 0 , c 1 ) ∈ L. This is a weaker notion of ZK than the one we defined in class (where the verifier can behave arbitrarily) but is still useful.