Zero-Knowledge Proof System Slides by Ouzy Hadad, Yair Gazelle & Gil Ben-Artzi Adapted from Ely Porat course lecture notes.

Slides:



Advertisements
Similar presentations
Reductions Complexity ©D.Moshkovitz.
Advertisements

Sublinear Algorithms … Lecture 23: April 20.
On the Amortized Complexity of Zero-Knowledge Proofs Ronald Cramer, CWI Ivan Damgård, Århus University.
Shortest Vector In A Lattice is NP-Hard to approximate
Zero Knowledge Proofs(2) Suzanne van Wijk & Maaike Zwart
Complexity Theory Lecture 9 Lecturer: Moni Naor. Recap Last week: –Toda’s Theorem: PH  P #P. –Program checking and hardness on the average of the permanent.
Foundations of Cryptography Lecture 10 Lecturer: Moni Naor.
Gibbs sampler - simple properties It’s not hard to show that this MC chain is aperiodic. Often is reversible distribution. If in addition the chain is.
1 The 29th Annual ACM-ICPC World Finals 1. Shanghai Jiaotong University 2. Moscow State University 3. St. Petersburg Institute of Fine Mechanics and Optics.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
Dana Moshkovitz. Back to NP L  NP iff members have short, efficiently checkable, certificates of membership. Is  satisfiable?  x 1 = truex 11 = true.
Computability and Complexity
Having Proofs for Incorrectness
Slide 1 Vitaly Shmatikov CS 380S Introduction to Zero-Knowledge.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 26-1 Complexity Andrei Bulatov Interactive Proofs.
Complexity 18-1 Complexity Andrei Bulatov Probabilistic Algorithms.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
CS426Fall 2010/Lecture 351 Computer Security CS 426 Lecture 35 Commitment & Zero Knowledge Proofs.
1 Slides by Roel Apfelbaum & Eti Ezra. Enhanced by Amit Kagan. Adapted from Oded Goldreich’s course lecture notes.
CS151 Complexity Theory Lecture 7 April 20, 2004.
1 Adapted from Oded Goldreich’s course lecture notes.
Tirgul 10 Rehearsal about Universal Hashing Solving two problems from theoretical exercises: –T2 q. 1 –T3 q. 2.
Complexity and Cryptography
Co-operative Private Equality Test(CPET) Ronghua Li and Chuan-Kun Wu (received June 21, 2005; revised and accepted July 4, 2005) International Journal.
Introduction to Modern Cryptography, Lecture 7/6/07 Zero Knowledge and Applications.
CS151 Complexity Theory Lecture 13 May 11, CS151 Lecture 132 Outline Natural complete problems for PH and PSPACE proof systems interactive proofs.
Sedgewick & Wayne (2004); Chazelle (2005) Sedgewick & Wayne (2004); Chazelle (2005)
Zero Knowledge Proofs. Interactive proof An Interactive Proof System for a language L is a two-party game between a verifier and a prover that interact.
Introduction to Modern Cryptography, Lecture 9 More about Digital Signatures and Identification.
Sedgewick & Wayne (2004); Chazelle (2005) Sedgewick & Wayne (2004); Chazelle (2005)
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
Lecture 12 Commitment Schemes and Zero-Knowledge Protocols Stefan Dziembowski University of Rome La Sapienza critto09.googlepages.com.
Quadratic Residuosity and Two Distinct Prime Factor ZK Protocols By Stephen Hall.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Fall 2004/Lecture 201 Cryptography CS 555 Lecture 20-b Zero-Knowledge Proof.
Introduction to Modern Cryptography Sharif University Spring 2015 Data and Network Security Lab Sharif University of Technology Department of Computer.
CS151 Complexity Theory Lecture 13 May 11, Outline proof systems interactive proofs and their power Arthur-Merlin games.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Alternative Wide Block Encryption For Discussion Only.
Interactive proof systems Section 10.4 Giorgi Japaridze Theory of Computability.
Zero-knowledge proof protocols 1 CHAPTER 12: Zero-knowledge proof protocols One of the most important, and at the same time very counterintuitive, primitives.
CSCI 2670 Introduction to Theory of Computing November 17, 2005.
Honest-Verifier Statistical Zero-Knowledge Equals General Statistical Zero-Knowledge Oded Goldreich (Weizmann) Amit Sahai (MIT) Salil Vadhan (MIT)
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
1 Distributed Vertex Coloring. 2 Vertex Coloring: each vertex is assigned a color.
Zero-Knowledge Proofs Ben Hosp. Classical Proofs A proof is an argument for the truth or correctness of an assertion. A classical proof is an unambiguous.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
IP, (NON)ISOGRAPH and Zero Knowledge Protocol COSC 6111 Advanced Algorithm Design and Analysis Daniel Stübig.
The NP class. NP-completeness
P & NP.
Topic 36: Zero-Knowledge Proofs
Probabilistic Algorithms
On the Size of Pairing-based Non-interactive Arguments
Zero Knowledge Anupam Datta CMU Fall 2017
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
CS21 Decidability and Tractability
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Reductions Complexity ©D.Moshkovitz.
Reductions Complexity ©D.Moshkovitz.
Instructor: Aaron Roth
Jens Groth and Mary Maller University College London
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Presentation transcript:

Zero-Knowledge Proof System Slides by Ouzy Hadad, Yair Gazelle & Gil Ben-Artzi Adapted from Ely Porat course lecture notes.

Background and Motivation  The purpose of a traditional proof is to convince somebody, but typically the details of a proof give the verifier more info about the assertion.  A proof is a zero-knowledge if the verifier does not get from it anything that he can not compute by himself.

Background and Motivation (cont.)  Whatever can be efficiently obtained by interacting with a prover, could also be computed without interaction, just by assuming that the assertion is true and conducting some efficient computation.

 Let (P,V) be an interactive proof system for some language L. We say that (P,V), actually P, is zero-knowledge if for every probabilistic polynomial-time verifier V *, there exists a probabilistic polynomial-time machine M * s.t. for every x  L holds  Machine M * is called the simulator for the interaction of V * with P. Zero Knowledge (Definition)

Perfect Zero Knowledge (Definition) Let (P,V) be an interactive proof system for some language L. We say that (P,V), actually P, is perfect zero-knowledge (PZK) if for every probabilistic polynomial time verifier V *, there exists a probabilistic polynomial-time machine M * s.t. for every x  L the distributions { (x)} x  L and {M * (x)} x  L are identical, i.e.,

The distribution ensembles {A x } x  L and {B x } x  L are statistically close or have negligible variation distance if for every polynomial p() there exits integer N such that for every x  L with holds: Statistically close distributions (Definition)

Statistical zero-knowledge (Definition) Let (P,V) be an interactive proof system for some language L. We say that (P,V), actually P, is statistical zero knowledge (SZK) if for every probabilistic polynomial time verifier V * there exists a probabilistic polynomial-time machine M * s.t. the ensembles { (x)} x  L and {M * (x)} x  L are statistically close.

Computationally indistinguishable (Definition) Two ensembles {A x } x  L and {B x } x  L are computationally indistinguishable if for every probabilistic polynomial time distinguisher D and for every polynomial p() there exists an integer N such that for every x  L with |x|  N holds

Computational zero-knowledge (Definition) Let (P,V) be an interactive proof system for some language L. (P,V), actually P, is computational zero knowledge (CZK) if for every probabilistic polynomial- time verifier V * there exists a probabilistic polynomial- time machine M * s.t. the ensembles { (x)} x  L and {M * (x)} x  L are computationally indistinguishable.

PZK by view  The pair is PZK by view if for every p.p.t V*... (probability polynomial time machine) there exist p.p.t M* such that for every x  L we have: {view(P,V*)(x)={M*(x)} where view(P,V*)(x) is the view of V* after running on the input x, and M*(x) is the output of M* on the input x.

IP is PZK iff PZK by view Lemma: An interactive proof system is perfect zero-knowledge iff it is perfect zero knowledge by view. Proof: Let M * satisfy: { view (x)} x  L  {M * (x)} x  L for every x  L. M * has on its work-tape the final view of V *. Hence, it is able to perform the last step of V * and output the result. And so the modified M * (x) is identical to (x).

Proof of lemma (cont.) Let M * satisfy: { (x)} x  L  {M * (x)} x  L. For a particular V *, let us consider a verifier V ** that behaves exactly like V *, but outputs its whole view (at the end). There is a machine M ** s.t.

Graph-Isomorphism  A pair of two graphs, Where  Lets  be an isomorphism between the input graphs, namely  is 1-1 and onto mapping of the vertex set V1 to the vertex set V2 so that

ZK proof for Graph Isomorphism  Prover’s first step(P1): Select random permutation  over V 1, construct the set, and send to the verifier.  Verifier’s first step gets H from P. select and send it to P. P is supposed to answer with an isomorphism between and.

ZK proof for Graph Isomorphism(cont.) (P2): If  =1, then send  =  to V. Otherwise send  =    -1 to V. (V2): If  is an isomorphism between G  and H then V output 1, otherwise it outputs 0.

Construction (diagram) ProverVerifier  =Random Permotation H   G 1  R {1,2} If  =1, send  =  otherwise  =    -1  Accept iff H =  (G  )  H

An example: G1G1G1G G2G2G2G2 5 4 Common input: two graphs G 1 and G 2.  Only P knows .

An example (cont.) G1G1G1G H  G2G2G2G2  =    -1 Only P knows . P sends H to V. V gets  and accepts. V sends  =2 to P.

Theorem: Graph isomorphism is in Zero-Knowledge Theorem 1: The construction above is a perfect zero-knowledge interactive proof system (with respect to statistical closeness).

Proof of Theorem 1 Completeness: If G 1  G 2, V always accepts. First, G’=  (G 1 ). If  =1 then  = , Hence:  (G  ) =  (G 1 ) =  (G 1 ) = G’. If  =2 then  =    -1, Hence:  (G  ) =    -1 (G 2 ) =  (G 1 ) = G’. And hence V always accepts when G 1  G 2.

Proof of Theorem 1 (cont.) Soundness: Let P * be any prover. If it sends to V a graph not isomorphic neither to G 1 nor to G 2, then there is no isomorphism between G  and G’. If G’  G 1 then P * can convince V with probability at most 1/2 (V selects  {1,2} uniformly). Hence: when G 1 and G 2 are non-isomorphic: If we will run this several times we will get the desire probability.

Zero Knowledge (Construction of a simulator)  Let V * be any polynomial-time verifier, and let q() be a polynomial bounding the running time of V *.  M * selects a string 01100…………011 = r

Construction of a Simulator (cont.)  M * selects  R {1,2}.  M * selects a random permutation over V .  M * constructs G’’=  (G  ) G’’ G2G2G2G2 

Construction of a Simulator (cont.)  M * runs V * with the latter’s strings set as follows:  Denote  as V * ‘s output.  M * halts with output (x,r,G’’,  ). r x G’’ Input Tape Random Tape Message Tape

Proof of Theorem 1 (cont.) Zero-knowledge: Construct a simulator M * as follows:  Let q() be a polynomial bounding the running time of V *. M * selects a string r  R {0,1} q(|x|) as the contents of the random tape of V *.  Simulating (P1): M * randomly selects a “bit”  {1,2} and a permutation  (on the set V  ). Then constructs G’’=  (G  ).

Construction of M * (cont.)  Simulating (V1): M * puts x on V * ’s common input- tape, puts r on V * ’s random-tape and puts G’’ on V * ’s incoming messages-tape. After executing V * (in a polynomial number of steps), M * reads the outgoing message of V *, denote . (assume  {1,2}, otherwise P may ignore  and wait for a valid one).  Simulating (P2): if  =  then M * halts with output (x,r,G’’,  ). Otherwise (failure of the simulation), M * halts with .

Proof of Theorem 1 (cont.) Definition: Let (P,V) be an interactive proof system for L. (P,V) is perfect zero-knowledge by view if for every probabilistic polynomial-time verifier V * there exists a probabilistic polynomial time machine M * s.t. for every x  L holds: { view (x)} x  L  {M * (x)} x  L where view (x) is the final view of V* after running on input x. view = all the data a machine possesses

Proof of Theorem 1 (cont.) Lemma: Then for every string r, graph H and permutation , it holds that: Pr [ view (x) = (x,r,H,  )] = Pr [M * (x) = (x,r,H,  ) | M * (x)   ] Proof: Let m * describe M * conditioned on its not being . Define the 2 random variables: 1. v(x,r) - the last 2 elements of view (P,V*) (x) conditioned on the second element equals r. 2.  (x,r) - the same with m * (x).

Proof of lemma (cont.) Let V * (x,r,H) denote the message sent by V * for a fixed r and an incoming message H. We will show that v (x,r) and  (x,r) are uniformly distributed over the set: While running the simulator we have H=  (G  ), and only the pairs satisfying  = v * (x,r,H) lead to an output. Hence:

Proof of lemma (cont.) Consider v (x,r): For each H (which is isomorphic to G 1 ): Observing that and hence the lemma follows.

Proof of Theorem 1 (cont.) Corollary: view (x) and M * (x) are statistically close. Proof: A failure is output with probability If the simulator returns steps P1-P2 of the construction |x| times and at least once at step P2  = , then output (x,r,G’’,  ). If in all |x| trials , then output rubbish. Hence, we got a statistical difference of and so the corollary follows.

Zero-Knowledge for NP NP Problem: A language L belongs to NP if and only if there exist a two-input polynomial-time algorithm A and constant C such that: there exist a certificate y with We say that algorithm A verifies language L in polynomial time.

IP for NP  Lets L language belong to NP, and x  L, P should prove V that he know the solution for x. (P1): P guess the solution y for the problem x. (V1) V verify in polynomial time that A(x,y)=1.  We will give ZK interactive proof system for NP complete problem (G3C), which implies that for every NP problem, we have ZK proof.

G3C  Common Input: A graph  P can paint the graph in 3 colors.  P must keep the coloring a secret.

G3C is in Zero-Knowledge  P chooses a random color permutation.  He puts all the nodes inside envelopes.  And sends them to the verifier. Construction (ZK IP for G3C):

G3C is in ZK (cont.)  Verifier receives a 3-colored graph, but colors are hidden  He chooses an edge at random.  And asks the prover to open the 2 envelopes.

G3C is in ZK (cont.)  Prover opens the envelopes, revealing the colors  Verifier accepts if the colors are different.

Formally,  G = (V,E) is 3-colorable if there exists a mapping for every.  Let  be a 3-coloring of G, and let  be a permutation over {1,2,3} chosen randomly.  Define a random 3-coloring.  Put each  (v) in a box with v marked on it.  Send all the boxes to the verifier.

Formally, (cont.)  Verifier selects an edge at random asking to inspect the colors.  Prover sends the keys to boxes u and v.  Verifier uses the keys to open the boxes.  If he finds 2 different colors from {1,2,3} - Accept.  Otherwise - Reject.

G3C (diagram)  (1)  (n)  (2) 12n P V P V Key u, key v P V

The construction is in ZK:  Completeness: If G is 3-colorable and both P and V follow the rules, V will accept.  Soundness: Suppose G is not 3-colorable and P* tries to cheat. Then at least one edge (u,v) will be colored badly:  (u) =  (v). V will pick a bad edge with probability which can be increased to by repeating the protocol sufficiently many times.

Zero Knowledge (Construction of a simulator)  Let V * be any polynomial-time verifier, and let q() be a polynomial bounding the running time of V *.  M * selects a string

Construction of a Simulator (cont.)  M * selects e’=(u’,v’)  R E.  M * sends to V * boxes filled with garbage, except for the boxes of u’ and v’, colored as follows: cd u’v’  Otherwise, the simulation fails. C  R {1,2,3} d  R {1,2,3}\{c}  If V * picks (u’,v’), M * sends V * their keys and the simulation is completed.

Analysis of the Simulation For every G  G3C, the distribution of m * ( ) = M * ( ) | (M * ( )   ) is identical to ( ). Since V * can’t tell e’ from other edges by looking at the boxes, he picks e’ with probability 1/|E|, which can be increased to a constant by repeating M * sufficiently many times. So if the boxes are perfectly sealed, G3C  PZK. 

ZK for Finding square modulo n  Input: x 2 modulo n.  output: x modulo n.  The prover need to prove that he know the output.

ZK for Finding square modulo n (cont.) (P1): P find two large prime number p,q, where n=p·q. He also choose randomly r  [ n, n 4 ]. P send n, x 2 mod n and r 2 mod n to V. (V1): V has two possibilities (a) Ask r. check the value of r 2 mod n. (b) Ask for x · r. check the value of x 2 r 2 mod n

Analysis of the Protocol - square modulo n Soundness: If P does not know x, then in probability of 50% V will catch him, if we will run this several times we will get the V will reject in probability larger then 2/3. Completeness: If P know x, V always accept.

Analysis of the Protocol - square modulo n (cont.)  This protocol is computational ZK.  The Protocol give the value x 2 mod n but the verifier can't calculate x from it.  If the verifier ask option 1 from the prover, he get no additional info.  If the verifier ask option 2 from the prover, he get xr which is random.

CO-NP  ZK  In order to prove the above it’s enough to show that CO-NP complete problem is in IP  We will show that CO-SAT belongs to IP.  Than we can show that CO-SAT belongs to ZK.  Reminder: CO-SAT means that there are no truth assignment for an equation.  We can treat it as a specific case of proving that for an equation there are exactly K truth assignments (In this case, K=0)

CO-SAT  IP  Lemma 1.  (x1,x2,x3,…,Xn) has exactly Kn truth assignments   k0,k1 : Kn=k0+k1 2.  (0,x2,x3,…Xn) =  0(x2,x3,…Xn) has exactly k0 truth assignments 3.  (1,x2,x3,…Xn) =  1(x2,x3,…Xn) has exactly k1 truth assignments  Informal explanation  By setting a variable in the original equations we create a new equation with a special relation to the original one.  Each new equation must have a specific number of assignments which can be pre-calculate.

CO-SAT  IP  We can now construct a solution based upon the previous lemma  Prover will send verifier k0,k1 for  (n)  Verifier will check that for  (n-1), condition 1 of lemma is true ( Kn=k0+k1)  Verifier will create randomly a new equation  (n+1), by assigning 1 or 0 to the first variable of  n  If we assign 1, the number of solutions should be K0, otherwise k0  Verifier will send to prover the new equation

CO-SAT  IP  Now prover will send the new k0n,k1n for the new  (n+1)  Verifier remember previous k1 and can check if k1=k0n+k1n, so the prover cannot cheat him  Each stage we reduced one variable from equation by assign a value to it  Now let’s prove completeness & soundness

CO-SAT  IP  Completeness  If prover does not cheat, each new equation will have the appropriate relation to the previous one and verifier will be convinced  Soundness  If prover cheat i.e. send k0 as a false one, the new equation should be based upon assignment of 0 to first element in order to see it (remember that we check only one of k0/k1 – it’s deepened on the assignment). We have a probability of ½ to do this, and we should always peek the right assignment down the road. Total probability (in the worst case) is (½)^n  Huston, we have a problem ! ( no soundness )

CO-SAT  IP, Solution 2  We will expand the range variables of  to a field (F) such that |F| > (2)^n  Each variable can get now not just 0 or 1 but a value from the field  We will construct a new equation  `:  F  0, T  positive integer  ^  *,   +  (p)`  p, (~p)`  1-p`  (p^q)`  p`  q`, (p  q)`  ~(~(~p ^ ~q))’

CO-SAT  IP, Solution 2  We got now  ` that is a polynomial of (x1,…,Xn) over field F.  Prover should now prove that  Note that 1. Number of root for [p1(0)+p1(1)]= p0(  ). 2. Polynomials have the same number of roots for   [p1(  )-p2(  )] = 0

CO-SAT  IP, Solution 2  Prover will send the polynom [P1], and the number of roots (K) for this polynom  Verifier will check that K=p1(0)+p1(1), choose a random value  F and send it to prover  Prover will now construct a new polynom P2 = P1(  ), calculate the number of roots for the new one and send it to verfier  This process continue until all variable has been assign (2n iterations)

CO-SAT  IP, Solution 2  Completeness is clear.  Soundness  In order to lie, the prover should send the verifier a false polynom. This polynom should have the same roots as the correct one. Since we have a field of elements,The probability for this is n/|F|. The probability not found this is (1-n/|F|) > 2/3  We proved that CO-NP is in IP

CO-NP  ZK  It’s enough to show that CO-SAT is in ZK  The problem in the previous solution is that the verifier can see each stage the solution of the previous.  He can use it to get some other information from prover

CO-SAT  ZK  The prover can now send the polynom in an envelops, just like in G3C  The verifier should now check that the prover has not mislead him  We have got now a new problem : How can we open the envelops without gaining any information from the prover

CO-SAT  ZK  The problem of opening an envelops is in NP, since the oracle can guess the keys and we can verify in a polynomial time that indeed we have the appropriate keys  Since NP  ZK, we can now make a reduction and solve the above problem  CO-SAT  ZK  CO-NP  ZK !