Zero Knowledge

Basic Zero Knowledge

Definition: A proof system for membership in LL is an algorithm VV such that \forall xx:

  • Completeness: If xLx \in L, then \exists π\pi, V(x,π)=ACCEPTV(x,\pi) = \textsf{ACCEPT}.
  • Soundness: If xLx \notin L, then π,V(x,π)=REJECT\forall \pi, V(x, \pi)= \textsf{REJECT}.

Definition: A NP proof system for membership in LL is an algorithm VV such that \forall xx:

  • Completeness: If xLx \in L, then \exists π\pi, V(x,π)=ACCEPTV(x,\pi) = \textsf{ACCEPT}.
  • Soundness: If xLx \notin L, then π,V(x,π)=REJECT\forall \pi, V(x, \pi)= \textsf{REJECT}.
  • Efficiency: V(x,π)V(x,\pi) halts after at most ploy(x)ploy(|x|) steps.

Definition: LPL \in \mathcal{P} if there is a poly-time algorithm A\mathcal{A} such that L={xA(x)=ACCEPT}L = \{x \mid A(x) = \textsf{ACCEPT}\}.


Non QR


Definition [GMR'85]: An interactive proof system for LL is a PPTPPT algorithm VV and a function PP such that \forall xx:

  • Completeness: If xLx \in L, then Pr[(P,V) accepts x]2/3\Pr[(P, V) \text{ accepts } x] \ge 2/3.
  • Soundness: If xLx \notin L, then P,Pr[(P,V) accepts x]1/3\forall P^*, \Pr[(P^*,V) \text{ accepts } x] \leq 1/3.
  1. Completeness and soundness can be bounded by any c:N[0,1]c: \mathbb{N} \rightarrow [0,1] and s:N[0,1]s: \mathbb{N} \rightarrow [0,1] as long as
    • c(x)1/2+1/poly(x)c(|x|) \geq 1/2 + 1/poly(x),
    • s(x)1/21/poly(x)s(|x|) \leq 1/2 - 1/poly(x).
  2. poly(x)poly(|x|) independent repetitions c(x)s(x)12poly(x)\rightarrow c(|x|) - s(|x|) \geq 1 - 2^{-poly(|x|)}.
  3. NP\mathcal{NP} is a special case (c(|x|) = 1 and s(|x|) = 0).
  4. BPP\mathcal{BPP} is a special case (no interaction).

Proposition: QRNIP\overline{QR_N} \in \mathcal{IP}.

  • NP proof for QRN\overline{QR_N} not self-evident.
  • This suggests that maybe NPIP\mathcal{NP} \subset \mathcal{IP}.
  • Turns out that SATIPSAT \in \mathcal{IP} (in fact #SAT\#SAT).

Theorem [LFKN'90]: P#PIP\mathcal{P}^{\#P} \subseteq \mathcal{IP}

Theorem [Shamir’90]: IP=PSPACE\mathcal{IP} = \mathcal{PSPACE}

complexity class


Definition [GMR'85]: An interactive proof (P,V)(P,V) for LL is (honest-verifier) zero-knowledge if  PPT S  xL\exists \text{ PPT } S \ ~\forall x \in L:

S(x)(P,V)(x).S(x) \cong (P, V)(x) \,.

  • We use (P,V)(x)(P, V)(x) to denote VV’s view.
  • Usually (P,V)(x)=V(view)(P, V)(x) = V(view) denotes VV's output.
  • Simulator for VV's view implies simulator for VV's output.

An interactive proof (P,V)(P,V) for LL is not (honest-verifier) zero-knowledge if  PPT S  xL\forall \text{ PPT } S \ ~\exists x \in L:

S(x)(P,V)(x).S(x) \ncong (P, V)(x) \,.

ZeroKnowledgeProofQR

Proposition: QRNHVZKQR_N \in HVZK.


Definition: An interactive proof (P,V)(P,V) for LL is prefect zero-knowledge if  PPT V   PPT S  xL\forall \text{ PPT } V^* \ ~\exists \text{ PPT } S \ ~\forall x \in L:

S(x)(P,V)(x).S(x) \cong (P, V^*)(x) \,.

Proposition: QRNPZKQR_N \in PZK.

  • "black-box" ZK (stronger):  PPT S   PPT V  xL\exists \text{ PPT } S \ ~\forall \text{ PPT } V^* \ ~\forall x \in L:

    SV(x)(P,V)(x).S^{V^*}(x) \cong (P, V^{*})(x) \,.

  • We allowed SS to run in expected polynomial time. NonQRHVZKButNotZK

Definition: An interactive proof (P,V)(P,V) for LL is (perfect) zero-knowledge wrt auxiliary input if  PPT V   PPT S  xL  z\forall \text{ PPT } V^* \ ~\exists \text{ PPT } S \ ~\forall x \in L \ ~\forall z:

S(x,z)(P,V(z))(x).S(x, z) \cong (P, V^*(z))(x) \,.

  • zz captures "context" in which protocol is executed.
    • Other protocol executions ("environment").
    • A-priori information (in particular about ww).
  • Simulator is also given the auxiliary input zz.
  • Simulator runs in time poly(x)poly(|x|).
  • Auxiliary input zz is essential for composition.

Theorem: ZK is closed under sequential composition.


Zero Knowledge and NP

Theorem [F'87, BHZ'87]: If SATPZKSAT \in PZK then the polynomial-time hierarchy collapses to the second level.


Statistical ZK:  PPT V   PPT S  xL  z\forall \text{ PPT } V^* \ ~\exists \text{ PPT } S \ ~\forall x \in L \ ~\forall z (我猜有 wrt Auxiliary input):

S(x,z)s(P,V(z))(x).S(x, z) \cong_s (P, V^*(z))(x) \,.

Theorem [F'87, BHZ'87]: If SATSZKSAT \in SZK then the polynomial-time hierarchy collapses to the second level.


Computational ZK:  PPT V   PPT S  xL  z\forall \text{ PPT } V^* \ ~\exists \text{ PPT } S \ ~\forall x \in L \ ~\forall z:

S(x,z)c(P,V(z))(x).S(x, z) \cong_c (P, V^*(z))(x) \,.

Theorem [GMW'86]: Suppose one-way functions exist. Then NPCZK\mathcal{NP} \subseteq CZK.

Theorem [GMW'86]: If statistically-binding commitments exist then NPCZK\mathcal{NP} \subseteq CZK.

Theorem [B'86]: If statistically-binding commitments exist then HAMCZKHAM \in CZK

StatisticallyBindingHAM

Theorem [OW'90]: If ZK\exists ZK proofs for languages outside of BPP\mathcal{BPP} then there exist functions with one-way instances.

Theorem [OW'90]: If ZK\exists ZK proofs for languages that are hard on average then there exist one-way functions.


BPPPZKSZKCZK=IP\mathcal{BPP} \subseteq PZK \subseteq SZK \subset CZK = IP.


Computational ZK:  PPT 𝑉  PPT S D xL z\forall \text{ PPT } 𝑉^* \ \exists \text{ PPT } S \ \forall D \ \forall x \in L \ \forall z:

Pr[D(x,z,S(x,z))=1]Pr[D(x,z(P,V(z))(x),z)=1]neg(x)|\Pr[D(x, z, S(x, z)) = 1] - \Pr[D(x, z (P, V^*(z))(x), z) = 1] | \leq neg(|x|)

Zero-Knowledge Proof of Knowledge

FormalizingKnowledge


A proof system has knowledge soundness with error κ\kappa if there exists a PPT KK s.t. for every prover PP^*, if PP^* convinces VV of xx with probability ϵ>κ\epsilon > \kappa, then KP()(x)K^{P^*(\cdot)}(x) outputs ww s.t. (x,w)R(x, w) \in R with probability at least ϵ(x)κ(x)\epsilon(|x|) - \kappa(|x|).

An Alternative Formulation

Motivation: one can trade off running time and success probability

  • Definition says: run in PPT and output w.p. ϵ\epsilon
  • Alternative definition: run in expected time 1ϵ\frac{1}{\epsilon} and always output

A proof system has knowledge soundness with error κ\kappa if there exists a KK s.t.for every prover PP^*, if PP^* convinces VV of xx with probability ϵ>κ\epsilon > \kappa, then KP()(x)K^{P^*(\cdot)}(x) outputs ww s.t. (x,w)R(x, w) \in R in expected time poly(x)ϵ(x)κ(x)\frac{poly(|x|)}{\epsilon(|x|) - \kappa(|x|)}. KnowledgeSoundnessDef


A proof system is a zero‐knowledge proof of knowledge if it has

  • Completeness: honest prover convinces honest verifier
  • Zero knowledge: ensures verifier learns nothing
  • Knowledge soundness: ensures prover knows witness

Zero knowledge is a property of the prover

  • Prover behavior is guaranteed to reveal nothing
  • Protect against a cheating verifier

Knowledge soundness is a property of the verifier

  • Verifier behavior guarantees that prover knows witness
  • Protect against a cheating prover

ReduceKnowledgeError


ZKPOFNPError


Strong Proofs of knowledge

A proof system has strong knowledge soundness if there exists a negligible function μ\mu and a (strict) PPT KK s.t.for every prover PP^*, if PP^* convinces VV of xx with probability ϵ>μ\epsilon > \mu, then KP()(x)K^{P^*(\cdot)}(x) outputs ww s.t. (x,w)R(x, w) \in R with probability at least 1μ(x)1 - \mu(|x|).

Theorem: sequential Hamiltonicityis a strong proof of knowledge.

We cannot construct constant round strong proofs of knowledge. (even for un black-box)


witness‐extended emulation

A witness‐extended emulator EP()(x)E^{P^*(\cdot)}(x)outputs a VIEW and some ww:

  • The view output is indistinguishable from a real execution
  • The probability that the view is accepting and yet (x,w)R(x, w)\notin R is negligible
  • EE runs in expected polynomial‐time

Lemma: If (P,V)(P, V) is a ZKPOK, then there exists a witness extended emulator for (P,V)(P, V).

  • Very useful when use ZKPOK inside proofs of security (and greatly simplifies)
  • Can also formalize an ideal ZK functionality: Fzk((x,w),x)=(λ,R(x,w))\mathcal{F}_{zk}((x, w), x) = (\lambda, R(x, w))

Lemma: If (P,V)(P, V) is a ZKPOK, then it securely computes the ideal ZK functionality (in the secure computation sense).


ZKForNonQR

ZKForNonQR


Constant-Round Zero-Knowledge Proofs

MalleabilityOfProverCommitment


Definition: A statistically-hiding (Com,Dec)(Com, Dec) satisfies:

  • Statistical hiding: R m1,m2\forall R^* \ \forall m_1, m_2

    Com(m1)Com(m2Com(m_1) \cong Com(m_2

  • Computational binding:  PPT C m1m2\forall \text{ PPT }C^* \ \forall m_1 \ne m_2

Pr[C wins the blinding game ]neg(n)\Pr[C^* \text{ wins the blinding game }] \leq neg(n)


ExamplesOfStatisticallyHiding


NaiveSimulatorAndIssue

这里算的是期望,不abort,然后得到valid不停尝试的次数

Theorem [GK'91]: If statistically-hiding commitments exist then every LNPL \in \mathcal{NP} has a ZK proof with soundness error 2k2^{-k}.

Round-optimal[K'12]: if a language LL has a four-round zero-knowledge proof then LcoMAL \in coMA

GKSolution

ASimpleSolution


SolutionToFiveRoundsPOW Commitment from prover is statistically-binding. Commitment from verifier is statistically-hiding.


Witness Indistinguishability and Constant-Round Arguments

Definition [BCC'86]:An interactive argument system for LL is a PPTPPT algorithm VV and a function PP such that x\forall x:

  • Completeness: If xLx \in L, then $\Pr[(P, V) \text{ accepts }x = 1
  • Computational soundness: If xLx \notin L, then \forall PPT PP^*

Pr[(P,V) accepts x]neg(n)\Pr[(P^*,V) \text{ accepts } x] \leq neg(n)

  1. Computational soundness is typically based on a cryptographic assumption (e.g. CRH)
  2. Hardness of breaking the assumption is parametrized by security parameter nn
  3. Independent parallel repetitions do not necessarily reduce the soundness error [BIN'97]

CZK Proofs

  • Soundness is unconditional (undisputable)
  • Secrecy is computational - suitable when secrets are ephemeral and "environment" is not too powerful

SZK Arguments

  • Secrecy is unconditional (everlasting)
  • Soundness is computational – suitable when prover is a weak device and no much time for preprocessing

NPSZKarguments\mathcal{NP} \subseteq SZK arguments


Theorem: If statistically-hiding commitments exist then there exists an SZK argument for HAMHAM.

HAMComputationalSoundness


Witness-indistinguishable: w1,w2\forall w_1, w_2

(P(w1),V)(x)c(P(w2),V)(x)(P(w_1), V^*)(x) \cong_c (P(w_2), V^*)(x)

Witness independent: w1,w2\forall w_1, w_2

(P(w1),V)(x)s(P(w2),V)(x)(P(w_1), V^*)(x) \cong_s (P(w_2), V^*)(x)

Defined with respect to some NP\mathcal{NP}-relation RLR_L.


Definition [FS'90]:(P,V)(P, V) is witness indistinguishable wrt NPrelation\mathcal{NP}-relation RLR_L if \forall PPT VV^*, w1,w2RL(x)\forall w_1, w_2 \in R_L(x)

(P(w1),V)(x)c(P(w2),V)(x)(P(w_1), V^*)(x) \cong_c (P(w_2), V^*)(x)

  • Holds trivially (and hence no security guarantee) if there is a unique witness ww for xLx \in L
  • Interesting (and useful) whenever more than one ww
  • Holds even if w1,w2w_1, w_2are public and known
  • Every ZKproof/argument is also WI
  • WI is closed under parallel/concurrent composition

EquivalentDefOfWI

Definition: An interactive proof (P,V)(P,V) for LL is prefect zero-knowledge if  PPT V   PPT S  xL\forall \text{ PPT } V^* \ ~\exists \text{ PPT } S \ ~\forall x \in L:

S(x)(P,V)(x).S(x) \cong (P, V^*)(x) \,.


ZKImpliesWI


Let (Pk,Pk)(P_k, P_k) denote kk parallel executions of (P,V)(P, V)

Theorem: If (P, V) is WI then (P^{(k)}, V^{(k)}) is also WI.

HybridArgumentForWI


Theorem: Assuming non-interactive statistically-binding commitments, every LNPL \in \mathcal{NP} has a 3-round witness-indistinguishable proof with soundness error 2k2^{-k}

Theorem: Assuming 2-round statistically-hiding commitments, every LNPL \in \mathcal{NP} has a 4-round witness-independent argument with soundness error exp(O(k))\exp(-\mathcal{O}(k))

  • The protocols are in fact proofs of knowledge
  • We will use them to construct
    • a 5-round SZK argument (of knowledge) for NP\mathcal{NP}
    • a constant-round identification scheme
    • both with soundness error exp(O(k))\exp(-\mathcal{O}(k))

StatisticalZKAargumentForNP

SoundnessPOK

ZeroKnowledgePOK

Corollary: If 2-round statistically-hiding commitments exist then every LNPL \in \mathcal{NP} has a constant-round SZK argument.

In order to get 4-rounds ZK argument more ideas are required [FS'89, BJY'97]


Definition [FS'90]:(P,V)(P, V) is witness hiding with respect to (Gen,RL)(Gen, R_L), if \exists PPT MM \forall PPT VV^*

Pr[(P(w),V)(x)RL(x)]Pr[MV(X)RL(x)]+neg(x)\Pr[(P(w), V^*)(x) \in R_L(x)] \leq \Pr[M^{V^*}(X) \in R_L(x)] + neg(x)

  • WH is implied by ZK but does not necessarily imply ZK
  • Defined with respect to an instance generator GenGen for RLR_L

Claim: If an NP-statement XLX \in L has two independent witnesses then any WI protocol for xLx \in L is also WH


FiatShamirIdentificationScheme


Non-Interactive Zero-Knowledge

Claim: If LL has a ZK proof in which prover sends a single message then LBPPL \in \mathcal{BPP}.

Proof: Decision procedure for 𝐿:

  1. Given xLx \in L, run Sim(x)Sim(x) to get a simulated proof π\pi.
  2. Output V(x,π)V(x, \pi).
  • Completeness: If xLx \in L then simulated proof indis. from real proof \Rightarrow VV accepts.
  • Soundness: If xLx \in L then VV rejects all proofs (whp).

Non-Interactive Zero-Knowledge [BFM88]

  • Key idea:trusted setup.
  • Typically, the Common Reference String (CRS) model.
  • A trusted party generates a CRS that all parties can see.
  • Even Better: common uniform random string (CURS).

Definition: NIZK

  • Completeness: if xLx \in L \Rightarrow Pr[V accepts ]=1negl\Pr[V \text{ accepts }] = 1 - negl
  • Soundness:if xLx \notin L \Rightarrow \forall PPT PP^*, Pr[V accepts]=negl\Pr[V \text{ accepts}] = negl.
  • Zero-Knowledge: “Can simulate view of the verifier”
    • Sim\exists Sim such that for xLx \in L Sim(x)c(CRS,π)Sim(x) \approx_c (CRS, \pi)

Variants of NIZKs

  • Multi theorem:can-reuse CRS for many xx’s.
  • Adaptive soundness: sound even if xLx \in L chosen after CRS.
  • Adaptive ZK: ZK distinguisher can choose xLx \in L after CRS.
  • Statistical soundness (proof): sound against unbounded provers.
  • Statistical ZK: ZK for unbounded distinguishers.

[FLS90]: NIZK for all of NP from Trapdoor Permutations*

Corollary: NIZK based on hardness of factoring.

Other known results:

  • Bilinear maps [GOS06].
  • Random oracle model.
  • Obfuscation [SW13,BP15].
  • Optimal hardness assumptions [CCRR18,CCHLRR18]

New & Exciting Feasibility Results [2019]

  • LWE + circular security [CLW19]
  • LWE! [PS19]

The FLS ParadigmConstruction has two main steps:

  1. Construct NIZK in the “hidden bits” model.
  2. Compile hidden bits NIZK to standard NIZK

The Fiat-Shamir Transform

The Fiat-Shamir Transform[FS86], Original goal was transforming ID schemes into signature schemes.


Theorem[PS96,Folklore]: for every constant-round interactive argument Π\Pi with negl. soundness, whp over RR, the protocol ΠR\Pi_R is secure. (Actually extends to some multi-round protocols.)

Claim: \exists multi-round protocol Π\Pi with negl. soundness error s.t. ΠFS\Pi_{FS} is not sound (even in ROM).

Proof: Take any constant-round protocol with constant soundness and repeat sequentially.


Bad news [CHG98]: \exists protocols secure in ROM but totally broken using any instantiation.

Do there exist hash functions for which the Fiat-Shamir transform is secure? Answer: we don’t (quite) know


Def: a hash family HH is FS-compatible for a Π\Pi if FSH(Π)FS_{H}(\Pi) is “secure”.

FSHashCompatibleSecure

Def: HH is programmable if can sample random hHh \in H conditioned on h(x,α)=βh(x, \alpha) =\beta.


Claim: if HH is programmable and Π\Pi is HVZK \Rightarrow ΠFS(h)\Pi_{FS}(h) is ZK.

Proof: construct simulator.

  1. Sample (α,β,γ)(\alpha, \beta, \gamma).
  2. Sample HH conditioned on H(x,α)=βH(x, \alpha) = \beta.
  3. Output (H,(α,β,γ))(H, (\alpha, \beta, \gamma)).

Thm[B01,GK03]: \exists protocols which are not FS-compatible for any HH.

[BDGJKLW13]: no blackbox reduction to a falsifiable assumption, even for proofs.


Lower Bounds and Limitations on Zero Knowledge

Unidirectional proof: a single message from PP to VV. Example: NP\mathcal{NP} proofs

Theorem: Suppose that LL has a unidirectional ZK proof. Then LBPPL \in \mathcal{BPP}

Theorem: Suppose that LL has a ZK proof in which the verifier VV is deterministic. Then LBPPL \in \mathcal{BPP}

Theorem: Suppose that LL has an auxiliary-input ZK proof in which the prover PP is deterministic. Then LBPPL \in \mathcal{BPP}.

TrivialityOfUnidirectionalZK

TrivialityOfZKWithDeterministic

TrivialityOf2RoundZK

  • Problem: VV^*’s challenge is a string bR{0,1}kb \in_R \{0, 1\}^k
  • Simulator’s expected number of guessing attempts is 2k2^k
  • Solution: Let verifier commit to bb in advance
  • Yields 5 round proof (assuming OWF, 4-round argument)

original: VS\forall V^* \exists S black-box: SV\exists S \forall V^*


  • Triviality of BB ZK: only LBPPL \in \mathcal{BPP} have (negligible error)

    • constant-round public-coin BB ZKproofs/arguments
    • 3-round BB ZKproofs/arguments
  • parallel repetition of HAMHAM and QRNQR_N protocols are public-coin

  • applies to any constant number of rounds

  • if HAM,RQNBPPHAM, RQ_N \notin \mathcal{BPP}, even private coins do not help for BB ZK


Theorem[GK'91]: Suppose that LL has a constant-round, negligible error, public-coin ZKproof. Then LBPPL \in \mathcal{BPP}.

Proof idea:

  • Consider a PPT BB simulator SS
  • Define a PPT VV^* that on input m1,,mi1m_1, \ldots, m_{i-1} returns $m_i = f_K(m_1, \ldots, m_{i-1}),where fkf_k is a pseudorandom function
  • To decide if xLx \in L, run SV(x)S^{V^*}(x) and accept if and only if the resulting transcript is accepting

XNotInLCheatingProver


Theorem[F'90]: There exists a ZK protocol that does not retain its ZK properties when run twice in parallel.

  • There exist two provers P1,P2P_1, P_2 such that each is ZK, but the prover that runs both in parallel yields knowledge
  • Specifically, a cheating VV^* can extract a solution for a problem that is not solvable in polynomial time
  • P1P_1 sends “knowledge” if and only if VV can solve a computationally hard challenge generated by P1P_1
  • Solutions are pseudorandom but can be verified by P1P_1 (which is unbounded)
  • P2P_2 solves such pseudorandom challenges
  • Both P1,P2P_1, P_2 are ZK
  • P1P_1 because a PPT VV^* is unable to solve the challenge and so P1P_1 will not send “knowledge”
  • P2P_2 because the solution cannot be verified in poly time
  • Can be made to work for poly time P1,P2P_1, P_2 using statistically-binding commitments and ZKPOKs

RoundComplexityOfCZK


Non Black-Box Zero Knowledge (Barak’s Protocol)

Goal: construct CZKargument LNP\forall L \in \mathcal{NP}

  • with negligible soundness
  • a constant number of rounds
  • and public-coin

No LBPPL \notin \mathcal{BPP} has a black-box ZK protocol that is:

  • constant-round
  • negligible-soundness
  • public-coin

So for LBPPL \notin \mathcal{BPP} must use a non-black box simulator

  • On the one hand, VS\forall V^* \exists S should be easier than SV\exists S \forall V^*
  • On the other hand, where do we even begin?
    • Reverse engineering VV^* is difficult!
    • Key insight: there is no need to reverse engineer
    • Enough for SS to prove that he possesses VV^*'s code

Theorem [B'01]: If CRH exist, every LNPL \in \mathcal{NP} has a constant-round, public-coin, negligible-soundness, ZK argument

  • Idea: enable usage of verifier’s code as a “fake” witness
  • In the real proof, the code is VV’s random tape
  • In simulation, the code is VV^*'s “next-message function”
  • Since PP does not have access to VV's random tape in real interactions, this will not harm soundness
  • The simulator SS, on the other hand, will be always able to make verifier accept since it obtains VV^*’s code as input

UniversalArgumentSystems