Department of Electrical Engineering, IIT Bombay
November 6, 2024
Interactive protocols that allow a prover to prove the validity of a statement without revealing anything else
Traditional proofs have no interaction
Examples of statements
Knowledge is related to computational difficulty
The prover is trying to prove a statement without leaking knowledge
The set of messages exchanged by the prover and verifier is called a transcript
An interactive protocol is ZK if there is a PPT simulator who can simulate the transcript
Simulation = Generation of identically distributed transcript without knowledge of prover’s secret
Distributions can also be negligibly different
A language is a subset of \{0,1\}^*
A prover is interested proving membership of a public value in a language
Examples of languages
Prover and verifier will be modeled as algorithms
Prover is attempting to prove a statement
Malicious or dishonest provers will try convincing the verifier that incorrect statements are true
When the prover is forced to be PPT, we get an argument (not a proof)
Let \langle A, B \rangle(x) denote the output of B when interacting with A on common input x
Output 1 is interpreted as “accept” and 0 is interpreted as “reject”
Definition: A pair of interactive machines (P, V) is called an interactive proof system for a language L if V is PPT and the following conditions hold:
Soundness condition \rightarrow any possible prover
Completeness condition \rightarrow only prescribed prover
By repeating interaction and taking majority, probabilities can be made close to 1 and 0
The \frac{2}{3} and \frac{1}{3} are arbitrary choices by convention
Any c(n), s(n) such that the acceptance gap c(|x|) - s(|x|) \ge \frac{1}{p(|x|)} for a polynomial p will do
Let c,s: \mathbb{N} \to \mathbb{R} be functions satisfying c(n) > s(n) + \frac{1}{p(n)} for some polynomial p(\cdot).
Definition: A pair of interactive machines (P, V) is called an interactive proof system for a language L if V is PPT and the following conditions hold:
Suppose Peggy claims that Pepsi in large bottles tastes different than Pepsi in small bottles
Victor challenges Peggy to prove her claim
If the claim is correct, \Pr\left[ \langle P, V \rangle(x) = 1 \right] = 1
If the claim is wrong, \Pr\left[ \langle P, V \rangle(x) = 1 \right] = \frac{1}{2} for any P
The acceptance gap is 1- \frac{1}{2} = \frac{1}{2}
Graphs G_1 = (V_1, E_1) and G_2 = (V_2, E_2) are isomorphic if there exists a bijection \pi : V_1 \mapsto V_2 such that (u,v) \in E_1 \iff (\pi(u), \pi(v)) \in E_2
Example
Proving that two graphs G_1, G_2 are isomorphic is easy
How can we prove that two graphs G_1, G_2 are non-isomorphic?
Verifier picks \sigma \in \{1,2\} randomly and a random permutation \pi from the set of all permutations over V_\sigma
Verifier calculates F = \left\{ (\pi(u), \pi(v) \mid (u,v) \in E_\sigma \right\} and sends the graph G' = (V_\sigma, F) to prover
Prover finds \tau \in \{1,2\} such that G' is isomorphic to G_\tau and sends \tau to verifier
If \tau = \sigma, verifier accepts claim. Otherwise, it rejects.
Verifier is PPT but no known PPT implementation for prover
If G_1 and G_2 are not isomorphic, then verifier always accepts
If G_1 and G_2 are isomorphic, then verifier rejects with probability \frac{1}{2}
Informal definition: An interactive proof system is zero-knowledge if whatever can be efficiently computed after interaction with P on input x can also be efficiently computed from x (without interaction)
Let \text{view}^P_{V^*}(x) denote the verifier’s view of the protocol
Should be possible to generate something with the same distribution as \text{view}^P_{V^*}(x) without interacting with P
Formal definition (ideal) : We say (P,V) is perfect zero-knowledge if for every PPT interactive machine V^* there exists a PPT algorithm M^* such that for every x \in L the random variables \text{view}^P_{V^*}(x) and M^*(x) are identically distributed
Unfortunately, the above definition is too strict
Definition: We say that (P,V) is perfect zero-knowledge if for every PPT interactive machine V^* there exists a PPT algorithm M^* such that for every x \in L the following two conditions hold:
The simulator fails with probability at most \frac{1}{2}
It can be run repeatedly until it generates the non-failure output
On the average it requires two runs
Verifier picks \sigma \in \{1,2\} randomly and a random permutation \pi from the set of all permutations over V_\sigma
Verifier calculates F = \left\{ (\pi(u), \pi(v) \mid (u,v) \in E_\sigma \right\} and sends the graph G' = (V_\sigma, F) to prover
Prover finds \tau \in \{1,2\} such that G' is isomorphic to G_\tau and sends \tau to verifier
\text{view}^P_{V^*} = (\sigma, \pi, G', \tau) where G' = \pi(G_\sigma) and \tau = \sigma
A simulator M^* can pick \sigma and \pi randomly, set \tau=\sigma, and set G' = \pi(G_\sigma)
Verifier is PPT
If \phi is known, prover is PPT
If G_1 and G_2 are isomorphic, then verifier always accepts
If G_1 and G_2 are not isomorphic, then verifier accepts with probability \frac{1}{2}
For an arbitrary PPT verifier V^*, \text{view}^P_{V^*}(x) = \langle G', \sigma, \psi \rangle where \psi is an isomorphism between G_\sigma and G'
The simulator M^* uses V^* as a subroutine
On input (G_1, G_2), simulator randomly picks \tau \in \{1,2\} and generates a random isomorphic copy G'' of G_\tau
Simulator gives G'' to V^* and receives \sigma \in \{1,2\} from it
If \sigma = \tau, then the simulator can provide the isomorphism \pi : G_\tau \mapsto G''
If \sigma \neq \tau, then the simulator outputs \perp
If the simulator does not output \perp, then \langle G'', \tau, \pi \rangle is identically distributed to \langle G', \sigma, \psi \rangle
For N=pq, prover wants to prove x \in \mathcal{QR}_N
Prover knows w \in \mathbb{Z}_N^* such that x=w^2 \bmod N
Verifier does not know factorization of N
Prover does not want to reveal w to the verifier
P picks r \xleftarrow{\$} \mathbb{Z}_N^* and sends y=r^2 to V
V picks a bit b \xleftarrow{\$} \{0,1\} and sends b to P
If b=0, P sends z = r. If b=1, P sends z = wr
If b=0, V checks z^2 = y. If b=1, V checks z^2 = xy
For an arbitrary PPT verifier V^*, \text{view}^P_{V^*}(x) = \langle y, b, z \rangle where z^2 = x^by
Consider a simulator M^* which does the following
The above protocol is honest verifier zero-knowledge (HVZK) but not ZK
Consider a PPT verifier V^* which wants to find out if some u \in \mathbb{Z}_N^* is in \mathcal{QR}_N
By replacing x in the above protocol with u, verifier V^* can get information about u
If the protocol was ZK, then there exists a PPT M^* which can get the same information without interacting with P
This contradicts the non-existence of PPT algorithms for checking membership in \mathcal{QR}_N
P wants to prove that x \in \mathcal{QNR}_N^{+1} for N=pq
V picks y \xleftarrow{\$} \mathbb{Z}_N^* and a bit b \xleftarrow{\$} \{0,1\}
If b=0, V sends z = y^2. If b=1, V sends z = xy^2
For 1 \le j \le m,
V picks r_{j,1}, r_{j,2} \xleftarrow{\$} \mathbb{Z}_N^* and \text{bit}_j \xleftarrow{\$} \{0,1\}
V computes \alpha_j = r_{j,1}^2 and \beta_j = xr_{j,2}^2.
If \text{bit}_j = 0, V sends \text{pair}_j = (\alpha_j, \beta_j).
If \text{bit}_j = 1, V sends \text{pair}_j = (\beta_j, \alpha_j).
V sends P the sequence v_1, v_2,\ldots,v_m
P checks the following:
If z \in \mathcal{QR}_N, P sends b'=0.
If z \in \mathcal{QNR}_N^{+1}, P sends b'=1
V accepts if b'=b