Let . Let be a language. Recall means that there exists a determinstic algorithm and that means that there exists a such that with . We say that is a short proof that .
If is randomized, then we have the MA complexity class. If can interact with , then we get IP (interactive proofs). It turns out that [Shamir].
Zero-Knowledge Proof Systems
The goal is to prove a statement without leaking extra information, for example, for some , prove is a quadratic residue in .
Let . A zero-knowledge proof system for is a pair satisfying
-
(Complete) For all , a verifier says "yes" after interacting with the prover
-
(Sound) For all , and for all provers , a verifier says "no" after interacting with with probability at least .
-
(Perfect) For all verifiers , there exists a simulator that is a randomized polynomial time algorithm such that for all ,
(equality of distributions)
The existence of a simulator implies that if , then cannot learn more than the fact that .
Example: Let . Suppose we wish to prove that is a quadratic residue in . Then let (modulo ).
-
: , sends
-
: sends
-
: sends
-
: tests . If so, output "yes", otherwise output "no"
Completeness of this scheme is immediate. As for soundness: if is not a quadratic residue, then the verifier says "no" with probability at least one half (i.e. when ). If is a quadratic residue, but is not, then the verifier says "no" with probability at least one half (i.e when ).
Claim: if is not a quadratic residue in then for all , says "no" with probability at least one half.
It remains to show that the scheme is perfect zero-knowledge. Let be some verifier, and suppose .
Then construct a blackbox simulator as follows:
-
Pick a random , and a random .
-
Set
-
Run , give it as first message from prover.
-
outputs some in . If then goto step 1, otherwise output as the transcript. This takes two iterations on average.
Claim: (equality of distributions).
Sketch of proof: is uniform in the quadratic residues of because is a quadratic residue. is from the same distribution generated by given . saitsfies and is from the correct definition.
Soundness can be improved by repeating the protocol sequentially. One might consider repetition in parallel, i.e.
-
: , sends
-
: sends
-
: sends
-
: tests for . If so, output "yes", otherwise output "no"
This scheme is complete and sound, but it is not clear how to build a simulator. (We can only guess all the 's correctly with probability .)
Theorem [KG '89]: If has a three-round perfect zero knowledge proof with negligible cheating probability then .
Since it is believed that quadratic residuosity is not in BPP, it is therefore also thought that no three-round strongly sound perfect zero knowledge protocol for quadratic residuosity exists.
Hence we introduce a weaker version of zero knowledge:
Computational ZK: is a -zero-knowledge proof system for a language if it is
-
Sound
-
Complete
-
Computational ZK: for all verifiers there exists a simulator such that for all , the distribution is -indistinguishable from .
Theorem [GMW '87]: If a -bit commitment scheme exists, then all languages in have computational ZK proofs.
Definition: (imprecise definition) A -bit commitment scheme is defined as follows:
-
Commiter has a bit , and sends (a commitment to a bit ).
-
Commiter can open commitment as and the verifier can check that .
This scheme should be: Binding: infinitely powerful commiter can't convince verifier that commitment is a commitment to . Sound: reveals no information about , i.e. for any bit , is -indistinguishable from .
Example: one-way permutations imply commitment schemes:
Let be a one-way permutation. Choose , and set where is a hardcore bit of .
ZK for DDH
The language is defined to be the set of all tuples where is of order .
Chaum-Pederson ZK protocol: Denote
-
V: , sends .
-
P: , sends .
-
V: sends (i.e. opens the commitment)
-
P: sends
-
V: checks and
Aside: consider this commitment scheme: for some , set for some , where are fixed and public. This is computationally binding (relying on Dlog) but unconditionally sound.
Proof of ZK: Let . Let be a verifier, let . Then a simulator can be constructed as follows:
-
Pick a random
-
Run to get
-
Send random
-
sends , i.e. opens the commitment.
-
Set
-
Output