Upload
others
View
12
Download
0
Embed Size (px)
Citation preview
BIU WINTER SCHOOL | February 2019
ZERO-KNOWLEDGE (INTRO)
ALON ROSEN IDC HERZLIYA
Zero-knowledge proofs
Prover ๐ Verifier ๐
๐ interacts with ๐ convincing him that a proposition is true
Interaction reveals nothing beyond validity of the proposition
If proposition is true, any ๐โ might as well have
generated (simulated) the interaction on his own
Avoids the question โwhat is knowledge?โ altogether!
Example: color non-bl indness
I can distinguish
the balls
Did I
swap?
Example: color non-bl indness
He
swappedโฆ
You
Swapped!
โข ๐โs โviewโ: a random bit that equals his โswap or notโ bit
โข ๐ could simulate view by picking random bit on his own!
Example: color non-bl indness
Damnโฆ
What is zero-knowledge good for?
Can prove that I know a secret without having to reveal it
Identification:
1. Alice publishes ๐ฆ = ๐(๐ฅ)
2. Alice proves to Bob in ZK that she knows ๐ฅโฒ โ ๐โ1(๐ฆ)
Protocol design:
1. Design against parties that follow instructions
2. Use ZK proof to force honest behavior
โtrusted partyโ โ protocol
Why zero-knowledge?
Remarkable definitional framework:
โข At the heart of protocol design and analysis
โข Brings to light key concepts and issues
Right level of abstraction:
โข Simple enough to be studied/realized
โข Feasibility/limitations delineate what is attainable
ZK is just a means to an end
โข Weaker definitions are also useful (WI/WH/NIZK)
โข Tension between modularity and efficiency
Proof Systems
What is a proof?
A method for establishing truth:
1. legal
2. authoritative
3. scientific
4. philosophical
5. mathematical
Axioms โโ โฏ โ Propositions
6. probabilistic, interactive
๐
V๐
Proof Systems
Want to prove: ๐ฅ โ ๐ฟ for some language ๐ฟ โ ฮฃโ
Definition: A proof system for membership in ๐ฟ is an
algorithm ๐ such that โ๐ฅ:
Completeness: If ๐ฅ โ ๐ฟ, then โ๐, V(๐ฅ, ๐) = ACCEPT
Soundness: If ๐ฅ โ ๐ฟ, then โ๐, V(๐ฅ, ๐) = REJECT
๐ฟ = ๐ฅ | โ๐, ๐(๐ฅ,๐) = ACCEPT
NP Proof Systems
efficient verification โบ poly-time verification
Definition: An NP proof system for membership in L is
an algorithm ๐ such that โ๐ฅ:
Completeness: If ๐ฅ โ ๐ฟ, then โ๐, V(๐ฅ, ๐) = ACCEPT
Soundness: If ๐ฅ โ ๐ฟ, then โ๐, V(๐ฅ, ๐) = REJECT
Efficiency: V(๐ฅ, ๐) halts after at most ๐๐๐๐ฆ(|๐ฅ|) steps
โข ๐โฒs running time is measured in terms of ๐ฅ , the length of ๐ฅ
โข poly ๐ฅ = ๐ฅ ๐ for some constant ๐
โข Necessarily, ๐ = ๐๐๐๐ฆ ๐ฅ
Example I : Boolean Satisf iabi l i ty
๐๐ด๐ = ๐|๐ is a satisfiable Boolean formula
๐๐ด๐ = ๐ ๐ค1, โฆ , ๐ค๐ | โ๐ค โ 0,1 ๐ , ๐ ๐ค = 1
๐ โ ๐๐ด๐:
Complete: every ๐ฟ โ ๐๐ reduces to ๐๐ด๐
Unstructured: ๐๐ฅ๐(๐(๐)) time (worst case).
V๐ = ๐ค ๐ ๐ค = 1?
Example I I : Linear Equations
๐ฟ๐ผ๐ = ๐ด, ๐ |๐ด๐ค = ๐ โ๐๐ ๐ ๐ ๐๐๐ข๐ก๐๐๐ ๐๐ฃ๐๐ ๐ฝ
๐ด, ๐ โ ๐ฟ๐ผ๐ :
๐๐ฅ๐ ๐ many ๐คโs
Structured: decidable in time O ๐2.373 = ๐๐๐๐ฆ(๐)
V ๐ด๐ค = ๐?๐ = ๐ค
The class P
poly-time โบ efficient
Definition: ๐ฟ โ P if there is a poly-time algorithm ๐ดsuch that ๐ฟ = ๐ฅ | ๐ด(๐ฅ) = ACCEPT
BPP: ๐ด is probabilistic poly-time (๐๐๐) and errs w.p. โค 1/3
NP complete
๐๐ด๐
๐ฟ๐ผ๐ P
NP
Example I I I : Quadratic Residuosity
๐๐ ๐ = ๐ฅ| ๐ฅ ๐๐ ๐ ๐๐ข๐๐๐๐๐ก๐๐ ๐๐๐ ๐๐๐ข๐ ๐๐๐ ๐
๐ฅ โ ๐๐ ๐ :
Structured: ๐๐ ๐ is a subgroup of โค๐โ
๐ = ๐๐ ๐ = ๐ = ๐ : ๐๐ฅ๐ เทจ๐ ๐1/3 time (avg. case)
V ๐ฅ โก ๐ค2๐๐๐ ๐?๐ = ๐ค
Summary so far
efficient verification โบ poly-time verification
NP complete
๐๐ด๐
๐ฟ๐ผ๐ P
NP
๐๐ ๐
Proving non-membership?
๐ด, ๐ โ ๐ฟ๐ผ๐? decidable in time poly(๐)
๐ โ ๐๐ด๐:
๐ฅ โ ๐๐ ๐ :
Naรฏve proof is exponentially large
[GMRโ85]: allow proof to use
โข Randomness (tolerate โerrorโ)
โข Interaction (add a โproverโ)
V๐ค1, โฆ , ๐คฯ(๐)
โ๐, ๐ฅ โข ๐ค๐2๐๐๐๐
?
V๐ค1, โฆ , ๐ค2๐ โ๐, ๐ ๐ค๐ = 0?
Interactive Proofs
Interactive proof for ๐๐ ๐ [GMRโ85]
Completeness: ๐ฅ โ ๐๐ ๐ โ ๐ฆ2โ ๐๐ ๐ and ๐ฅ๐ฆ2 โ ๐๐ ๐
Soundness: ๐ฅ โ ๐๐ ๐ โ ๐ฆ2โ ๐๐ ๐ and ๐ฅ๐ฆ2 โ ๐๐ ๐
โ๐โ, ๐๐๐ ๐โ ๐ง = ๐ = 1/2
VP๐ง = ๐ฆ2 ๐ = 0
๐โฒ = ๐
๐ฅ โ ๐๐ ๐
๐ โ๐ 0,1๐ฆ โ๐ โค๐
โ
?
๐ง = ๐ฅ๐ฆ2 ๐ = 1
๐โฒ ๐ง = 1 ๐ง โ ๐๐ ๐
๐โฒ ๐ง = 0 ๐ง โ ๐๐ ๐
Interactive Proof
๐ is probabilistic polynomial time (๐๐๐)
For any common input ๐ฅ, let:
๐๐ ๐,๐ accepts ๐ฅ โ ๐๐๐ ๐, ๐ ๐ฅ, ๐ = ACCEPT
VP๐1
๐ฅ โ ๐ฟ
๐2
๐๐ ACCEPT/REJECT
๐ โ๐ 0,1 ๐๐๐๐ฆ( ๐ฅ )
โฎ
Interactive Proof Systems
Definition [GMRโ85]: An interactive proof system for ๐ฟ is a
๐๐๐ algorithm ๐ and a function ๐ such that โ๐ฅ:
Completeness: If ๐ฅ โ ๐ฟ, then ๐๐ ๐, ๐ accepts ๐ฅ โฅ 2/3
Soundness: If ๐ฅ โ ๐ฟ, then โ๐โ, ๐๐ ๐โ, ๐ accepts ๐ฅ โค 1/3
โข Completeness and soundness can be bounded by any ๐: โ โ [0,1]and ๐ :โ โ [0,1] as long as
โข ๐ ๐ฅ โฅ 1/2 + 1/๐๐๐๐ฆ( ๐ฅ )
โข ๐ ๐ฅ โค 1/2 โ 1/๐๐๐๐ฆ( ๐ฅ )
โข ๐๐๐๐ฆ( ๐ฅ ) independent repetitions โ ๐ ๐ฅ โ ๐ ๐ฅ โฅ 1โ 2โ๐๐๐๐ฆ ๐ฅ
โข NP is a special case (๐ ๐ฅ = 1 and ๐ ๐ฅ = 0)
โข BPP is a special case (no interaction)
The Power of IP
Proposition: ๐๐ ๐ โ IP
โข NP proof for ๐๐ ๐ not self-evident
โข This suggests that maybe NP โ IP
โข Turns out that ๐๐ด๐ โ IP (in fact #๐๐ด๐)
Theorem [LFKNโ90]: ๐#P โ IP
Theorem [Shamirโ90]: IP = PSPACE
The power of IP
๐๐ด๐
๐ฟ๐ผ๐
NPc
P
NP
๐๐ ๐
coNP
๐๐ด๐
IP = PSPACE [Sโ90]
coNPc
#๐๐ด๐ [LFKNโ90]
Zero-Knowledge
๐๐ ๐ = ๐ฅ| ๐ฅ ๐๐ ๐ ๐๐ข๐๐๐๐๐ก๐๐ ๐๐๐ ๐๐๐ข๐ ๐๐๐ ๐
๐ฅ โ ๐๐ ๐ :
โข Generating ๐ - ๐๐ฅ๐( เทจ๐ ๐1/3 time
โข Verifying - O ๐2 time
๐ โgot something for freeโ from seeing ๐
๐ may have not been able to find ๐ค on his own!
A Proof that (presumably) Does Leak Info
V ๐ฅ โก ๐ค2๐๐๐ ๐?๐ = ๐ค
Some attempts:
โข ๐ didnโt learn ๐ค (sometimes good enough!)
โข ๐ didnโt learn any symbol of ๐ค
โข ๐ didnโt learn any information about ๐ค
โข ๐ didnโt learn any information at all (beyond ๐ฅ โ ๐ฟ)
When would we say that ๐ did learn something?
If following the interaction ๐ could compute something he
could have not computed without it!
Zero-knowledge: whatever is computed following interaction
could have been computed without it
Defining that โno knowledge leakedโ
Zero-Knowledge (at last)
๐โs view = ๐โs random coins and messages it receives
โ๐ฅ โ ๐ฟ, ๐โs view can be efficiently โsimulatedโ
What does this mean?
Philosophically: ๐ is given the information that ๐ฅ โ ๐ฟ
Modulo this, ๐ might as well have talked to himself
Technically: ๐ view โ ๐ simulation
Whatever ๐ could compute following the interaction,
he could have computed even without talking to ๐,
by running the simulator on his own
๐ might as well talk to himself
VP๐1
๐ฅ โ ๐ฟ
๐2
๐๐
๐ ๐ฅ, ๐,๐1, โฆ ,๐๐
๐ โ๐ 0,1 ๐๐๐๐ฆ( ๐ฅ )
โฎ
Bah. Forget it.
I will just simulate.
โ
๐ sim(๐ฅ)
Honest Veri f ier Zero-Knowledge
๐โs view distribution can be simulated in poly-time
โข We will allow simulator ๐ to be probabilistic (๐๐๐)
โข Efficient โบ Probabilistic poly-time (BPP instead of P)
Definition [GMRโ85]: An interactive proof ๐, ๐ for ๐ฟ is
(honest-verifier) zero-knowledge if โ๐๐๐ ๐ โ๐ฅ โ ๐ฟ
๐ ๐ฅ โ ๐, ๐ ๐ฅ
โข We use ๐, ๐ ๐ฅ to denote ๐โs view
โข Usually ๐, ๐ ๐ฅ = ๐ view denotes ๐โs output
โข Simulator for ๐โs view implies simulator for ๐โs output
Sanity check
๐ฅ โ ๐๐ ๐ :
โข โ๐ฅ โ ๐๐ ๐ , ๐ ๐ฅ 2 โก ๐ฅ ๐๐๐ ๐
โข โ๐ฅ โ ๐๐ ๐ , ๐ ๐ฅ 2 โข ๐ฅ ๐๐๐ ๐
โข ๐๐ ๐ โ ๐ต๐๐ โ ๐ ๐ฅ 2 โข ๐ฅ ๐๐๐๐ for some ๐ฅ โ ๐๐ ๐
๐, ๐ for ๐ฟ is not (honest-verifier) zero-knowledge if
โ ๐๐๐ ๐ โ๐ฅ โ ๐ฟ so that
๐ ๐ฅ โ ๐, ๐ ๐ฅ
V ๐ฅ โก ๐ค2๐๐๐ ๐?๐ = ๐ค
A Zero-Knowledge proof for ๐๐ ๐
โข ๐ is randomized and has auxiliary input ๐ค
โข Distribution of Vโs โviewโ ๐ ๐ค ,๐ ๐ฅ :
uniformly random ๐ฆ, ๐, ๐ง such that ๐ง2 = ๐ฅ๐๐ฆ
VP
๐ = 0: ๐ง = ๐
๐
๐ง2 = ๐ฆ
๐ฅ โ ๐๐ ๐
๐ โ๐ 0,1
?
๐ฆ = ๐2๐ โ๐ โค๐โ
๐ฅ = ๐ค2๐๐๐ ๐
๐ = 1: ๐ง = ๐ค๐ ๐ง2 = ๐ฅ๐ฆ?
A Zero-Knowledge proof for ๐๐ ๐
Claim: ๐, ๐ is an interactive proof for ๐๐ ๐
Soundness:
๐ฅ โ ๐๐ ๐โ
โ๐ฆ, ๐ฆ โ ๐๐ ๐ and ๐ฅ๐ฆ โ ๐๐ ๐
If ๐๐๐ ๐โ, ๐ accepts ๐ฅ > 1/2
then both ๐ง02 = ๐ฆ and ๐ง1
2 = ๐ฅ๐ฆ
VP*
๐ = 0: ๐ง0 = ๐
๐
๐ฆ = ๐2
๐ = 1: ๐ง1 = ๐ค๐
๐ง02 = ๐ฆ
๐ง12 = ๐ฅ๐ฆ
Simulating ๐โs view
VP
random ๐ฆ,๐, ๐ง such that ๐ง2 = ๐ฅ๐๐ฆ
Simulator ๐ ๐ฅ
1. Sample ๐ง โ๐ โค๐โ
2. Sample ๐ โ๐ 0,1
3. Set ๐ฆ = ๐ง2/๐ฅ๐
4. Output ๐ฆ, ๐, ๐ง
random ๐ฆ,๐, ๐ง such that ๐ง2 = ๐ฅ๐๐ฆโ
Proposition: ๐๐ ๐ โ HVZK
๐ง
๐
๐ฆ
Simulating malicious ๐ โ โs view
V*P
๐ง
๐ = ๐โ ๐ฆ
๐ฆ
random ๐ฆ,๐, ๐ง such that
๐ง2 = ๐ฅ๐๐ฆ and ๐ = ๐โ ๐ฆ
Simulator ๐ ๐ฅ
1. Sample ๐ง โ๐ โค๐โ
2. Sample ๐ โ๐ โค๐โ
3. Set ๐ฆ = ๐ง2/๐ฅ๐
4. If ๐โ ๐ฆ = ๐ output ๐ฆ, ๐, ๐ง
5. Otherwise repeat
๐ฅ โ ๐๐ ๐โ
๐ผ #repetitions = 2
random ๐ฆ,๐, ๐ง such that
๐ง2 = ๐ฅ๐๐ฆ and ๐ = ๐โ ๐ฆโ
Perfect Zero-Knowledge
Definition: An interactive proof system ๐, ๐ for ๐ฟ is
perfect zero-knowledge if โ๐๐๐ ๐โ โ๐๐๐ ๐ โ๐ฅ โ ๐ฟ
๐ ๐ฅ โ ๐, ๐โ ๐ฅ
Proposition: ๐๐ ๐ โ PZK
โข Actually showed โblack-boxโ ZK: โ๐๐๐ ๐ โ๐๐๐ ๐โ โ๐ฅ โ ๐ฟ
๐๐โ๐ฅ โ ๐, ๐โ ๐ฅ
โข We allowed ๐ to run in expected polynomial time
โข Can we build ๐ with strict polynomial running time?
Amplifying soundness
Proposition: ๐๐ ๐ โ PZK w/ soundness error 2โ๐๐๐๐ฆ ๐ฅ
VP
โฎACCEPT iff
all repetitions
are accepting
๐๐โ๐ฅ keeps state
of partial view
*
Repeat sequentially
๐ = ๐๐๐๐ฆ ๐ฅ times
๐ผ time ๐ = 2 time ๐โ
Paral lel repetition
๐ผ time ๐๐โ
= 2๐ time ๐โ
Later:
โข Black-box impossibility
โข ๐โ whose view cannot be efficiently simulated
V
โฏ
*
Auxiliary input
and
Composition
I P for ๐๐ ๐ i s not ZK
VP ๐ฅ โ ๐๐ ๐
Proposition: ๐๐ ๐ โ HVZK
Not ZK wrt โauxiliary inputโ
๐โ ๐ง : use ๐ to decide if
๐ง โ ๐๐ ๐
๐ง is ๐โโs auxiliary input
๐ง = ๐ฆ2 ๐ = 0
๐ง = ๐ฅ๐ฆ2 ๐ = 1
๐โฒ = 1 ๐ง โ ๐๐ ๐
๐โฒ = 0 ๐ง โ ๐๐ ๐
Claim: ๐, ๐ is not ๐๐พ (wrt auxiliary input)
ZK wrt auxi l iary input
Definition: An interactive proof ๐,๐ for ๐ฟ is (perfect)
ZK wrt auxiliary input if โ๐๐๐ ๐โ โ๐๐๐ ๐ โ๐ฅ โ ๐ฟ โ๐ง
๐ ๐ฅ, ๐ง โ ๐, ๐โ ๐ง ๐ฅ
โข ๐ง captures โcontextโ in which protocol is executed
โข Other protocol executions (โenvironmentโ)
โข A-priori information (in particular about ๐ค)
โข Simulator is also given the auxiliary input ๐ง
โข Simulator runs in time ๐๐๐๐ฆ ๐ฅ
โข Auxiliary input ๐ง is essential for composition
Sequential composition of ZK
simulating view of each of ๐๐โs โ simulating view of ๐โ
P
โฎ
V*
Compose sequentially
๐ = ๐๐๐๐ฆ ๐ฅ times
๐1โ
๐2โ
๐๐โ
๐
๐
๐
๐๐โ๐ฅ, ๐ง = ๐๐, โฆ , ๐๐
โ๐, ๐๐ โ ๐, ๐๐โ ๐ง, ๐๐,โฆ , ๐๐โ๐ ๐ฅ
Sequential composition of ZK
Theorem: ZK is closed under sequential composition
P
โฎ
V(x,z)*
๐1โ ๐ฅ, ๐ง
๐2โ ๐ฅ, ๐ง, ๐๐
๐๐โ ๐ฅ, ๐ง, ๐๐,โฆ , ๐๐โ๐
๐๐1โ๐ฅ, ๐ง = ๐๐
๐๐2โ๐ฅ, ๐ง, ๐๐ = ๐๐
๐๐๐โ๐ฅ, ๐ง, ๐๐,โฆ , ๐๐โ๐ = ๐๐
Summary
Defined:
โข NP, P, BPP, IP = PSPACE
โข PZK, HVZK
Saw:
โข ๐ฟ๐ผ๐, ๐๐ ๐ , ๐๐ด๐ โ NP
โข ๐๐ ๐ โ HVZK
โข ๐๐ ๐ โ PZK
โข ๐๐ ๐ โ HVZK
โข auxiliary input for ZK protocols
โข sequential composition of ZK protocols
Food for Thought
What i f P=NP?
โข If P = NP then all ๐ฟ โ NP can be proved in PZK
โข ๐ sends nothing to ๐, who decides ๐ฅ โ ๐ฟ on his own
โข But what about ZK within P?
โข For instance against quadratic time verifiers?
Exercise: Suppose ๐ > 2. Construct an interactive proof
for ๐ฟ๐ผ๐ that is PZK for quadratic time verifiers
โข An issue: composition. What about say ๐ executions?
โข In contrast, ๐๐๐๐ฆ(๐) is closed under composition
History
Shafi Goldwasser Silvio Micali Charlie Rackoff
The End
Definition: An interactive proof system for ๐ฟ is a ๐๐๐algorithm ๐ and a function ๐ such that โ๐ฅ:
Completeness: If ๐ฅ โ ๐ฟ, then ๐๐ ๐, ๐ accepts ๐ฅ โฅ 2/3
Soundness: If ๐ฅ โ ๐ฟ, then โ๐โ, ๐๐ ๐โ, ๐ accepts ๐ฅ โค 1/3
Definition: ๐, ๐ for ๐ฟ is (perfect) ZK wrt auxiliary input if
โ๐๐๐ ๐โ โ๐๐๐ ๐ โ๐ฅ โ ๐ฟ โ๐ง
๐ ๐ฅ, ๐ง โ ๐ ๐ค , ๐โ ๐ง ๐ฅ