Introduction and History of ZKP

Date: 2024-08-25 03:05:06

Reviewed:

Topic / Chapter: Introduction and History of ZKP

summary

❓Questions

Notes

Introduction
  • classical proofs: Gauss, Euclid, Turing…
    • e.g. Prime number proof
  • ours: interactive proof
    • w/ prover & verifier, as “algorithms”
  • “efficiently” verifiable proofs
    • aka “NP-proofs”
    • msg {prover → verifier} is short
      • of polynomial size in length
        • time taken to proof: not considered
    • and verifiable in a polynomial time
      • i.e. time to compute
  • example claim:
    • : large prime
    • proof 1: provides value of
      • after interaction, knows:
        • value of // revealed!
  • example claim 2:
    • : quadratic residue
    • 👨‍🏫finding such number: hard
    • proof 1: can simply provide
      • verifier: compute
      • after interaction, knows:
        • value of
  • example claim 3: two graphs are isomorphic
    • proof:
    • verification 1:
      • iff
      • such verification: hard
      • after interaction, V knows:
        • being isomorphic to
        • isomorphism
  • general form
    • language set of strings
    • NP language: s.t. in time some verifier can show:
      • completeness: true claims have short proofs
        • if : -long witness
        • allows “honest provers” to convince
      • soundness: false theorems have no proofs
        • if :
        • unable to convince wrong claim
  • can we prove something without revealing information?
    • yes!
    • rather proves: “prove that I could prove it if I felt like it”
    • and : knows nothing more than that claim is right
Paradigm shift
  • interactive and probabilistic proofs
    • interaction: verifier engages in an interaction w/ the prover
      • 👨‍🏫could be mostly removed later
    • randomness: verifier is randomized
      • and tolerant to accept potential error w/ small probability
      • e.g. smaller than Avogadro’s number
  • Again, the idea:
    • only transfers the claim (as knowledge)
    • e.g. page w/ 2 colors
      • flips the page “probabilistically” (e.g. flip if coin’s on head)
      • V: sends the page
      • P: interpret the event happened
        • e.g. the coin was on head
    • accepts the proof if it is right repeatedly
      • provers
        • : probability of accepting wrongly
      • if repeat times:
  • example: quadratic residue
    • proof of existence of a pair
    • prover: choose random s.t.
      • s.t.
    • sends
    • after, by providing and , claim can be proven
      • however: from and , can be computed
      • which are respectively
      • but: reveal of both are undesirable
    • to convince: must be able to answer ANY ONE of two (but not answering both)
      • verifier: chooses randomly
    • verifier: accepts only when the prover’s submission is what he asked
      • technically: when submission’s “square” is what he asked for
      • if and he wanted that: yes
      • or: if and he wanted that: yes
    • all prover need to know: value of
    • repeat: 100 times
  • idea: many possible proofs are available
    • prover: chooses one at random
  • proof: made up of 2 parts
    • which, is only meaningful if both are available
More
  • formal definition
    • is an interactive proof for , if is probabilistic time &
    • completeness: : always accepts
      • notation:
    • soundness: if , for all cheating prover strategy, will not accept except for negligible probability
        • : cheating prober
      • for all polynomials
        • growing very slowly (exponentially)
  • for homework: just make sure:
    • and show:
      • (actually equivalent)
  • Classes
    • class of languages : all w/ interactive proof
      • w/ verifier being in probabilistic polynomial time
what is zero knowledge?
  • true statement: verifier cannot compute anything new
    • for even malicious verifier
  • after interaction, V learned:
    • theorem being true, or
    • a view of interaction
      • i.e. transcript & coins V tossed
      • probability distribution over coins of V and P
  • the view gives V nothing new if:
    • V could have simulated it its own
      • w/ probabilistic distribution
    • and two views are “computationally-indistinguishable”
      • i.e. undistinguishable by external, poly-time distinguisher
      • or: can’t tell if V is lying
    • (aka simulation paradigm)
  • computationally-indistinguishability
    • if no distinguisher can tell apart two probability distributions
    • or:
  • zero knowledge definition:
    • for IP for , exists a PPT algorithm simulator s.t.
      • : “may (very unluckily)” not run in polynomial time
        • “expected” polynomial time
    • (when it’s true), following two are poly-time indistinguishable
        • : technicality
        • only effective for small
    • : a ZK-IP if it is complete, sound, and zero-knowledge
      • for any , even dishonest ones
  • final def:
    • IP is ZK for if PPT , PPT s.t.,
  • Different types of ZK
    • CZK: computationally indistinguishable distribution
    • PZK: perfectly identical distributions
    • SZK: statistically close distribution
example w/ QR
  • example w/ QR
    • (honest verifier) PZK
    • simulator: picks random bit
    • pick a random
    • compute
    • output (view):
  • honest: checks
    • key: not releasing initially
  • dishonest verifier
    • compute based on complex process
    • yet: the view would be the same as simulator.
  • simulator for baddie
    • pick a random bit
    • pick a random
    • compute
    • RUNS BAD Verifier (both are poly-time)
      • if
        • if was to be asked:
        • output (view):
      • else: repeat the whole process (50/50)
POK
  • prover: actually also proved
    • “I can solve it (but won’t do it for you)”
    • “knowledge”: can also be defined
    • consider for poly-time relation
    • if the knowledge can be gained by running program w/ multiple inputs:
      • the algorithm has “knowledge”
  • proof of knowledge (POK) for
    • if PPT extractor algorithm s.t. , PPT outputs s.t.
    • : may run repeatedly on the same randomness
      • but may also run different questions each executions
      • aka: rewinding technique
        • as: one can “rewind” the algorithm to start from the same point
  • ZKPOK on QR
    • on input
    • run prover & receive
    • set verifier message to head (1), store
    • rewind (to value), and runs tail
      • gets
    • output:
  • ZKPOK on graph isomorphism
    • produce random graph s.t. either one is available
      • isomorphism from to
      • isomorphism from to
    • thus, isomorphism from
    • verifier: randomly choose between two isomorphism
    • proof:
      • set
    • claim:
      • statement true: can correctly answer for either
      • false: P(mistake)≥1/2
        • and make it 1-1/2^k by repetition
      • prove that it is a perfect ZK
    • ZKPOK
      • store
      • rewind & get
      • then output:
  • first application: identity theft
    • Alice: wants to prove her identity over the net (insecure)
      • to Bob: or Amazon
    • password shouldn’t be stored: even as a an encryption
  • solution: let’s say: password = hard theorem
    • one who knows the answer: Alice
      • ~= one who can pick up Excalibur: the Brave
    • but Alice’s proof: must be ZKP
  • do all NP languages have ZK-IP?
    • Yes
    • if one-way functions exist, every L in NP has computational ZK-IP
    • idea:
      • show an NP-complete problem has a ZK-IP
        • if a language is NP-complete: every string s can be reduced to a graph
      • one way function → hiding & binding bit commitment protocol
  • Properties of bit commitment scheme
    • hiding: the view (of ) is computationally indistinguishable
      • key: must be randomized in order to keep it secure
    • binding: probability of accepting different values are negligible
G3-colorable theorem
  • common input graph:
    • prover input coloring
  • procedure
    1. prover: pic random permutation on colors and apply it on graph
      1. and commit for each
      2. permutation: prevents accumulation of knowledge
    2. verifier: select a random edge , and send it to prover
    3. prover: decommit colors
    4. decision: rejects if
      1. and accepts after iterations
  • ZK testing
    • completeness
      • honest prover: can always prove it & accepted
    • soundness
      • if is not 3-colorable, then
      • for
    • zk-ness
      • easy to see informally
      • messy to prove formally
  • honest verifier computational ZK
    • choose challenge at random in advance
      • for honest
    • choose random edge in
    • choose colors in s.t. at random
      • and for all other , set
    • simulated-view: commitments to edges
      • and decommitting the challenge
    • however: all except the challenge: the same color
      • although computationally indistinguishable
  • simulation for any verifier
    • simulator on input and verifier for
    • choose random edge
    • generate commitments to colors as in honest simulation
    • run on to obtain challenge
    • ⇒ then output simulation as honest case
    • if “all” iterations fail: output
  • now: we haze many CZK examples as NP-languages
Protocol design applications
  • can prover properties on without revealing
    • only of
    • as well as on relationship
  • generally: a tool to enforce honest behavior in protocols w/o revealing any information
  • idea: protocol players sends along w/ each next-msg, a ZK proof that *next-msg* = Protocol(history h, randomness r) on history h & c=commit(r)
    • possible since s.t. *next-msg* = Protocol(h,r) & c=commit(r) in NP
  • used in
    • preventing identity theft
    • computation delegation
    • ??? nuclear disarmament, forensics
    • ⭐Zcash: Bit Coin w/ privacy and anonymity
    • ZK and verification dilemmas in the law
  • interactive proof: also used in complexity theory
    • can we do something in IP that traditional proof can’t?
      • 🧑‍🏫 yes
    • classical verification on proving non-isomorphic
      • e.g. checking edge-by-edge
      • takes time → efficient verification is impossible
  • in IP
    • input:
    • V: flip coin , pick random
    • P: if is isomorphic to : then , else 1
    • V: reject if
      • accept after repetitions
      • : learns whether graph of his choice is isomorphic to or
        • to fix: V must prove to P in ZK that he knows isomorphism
    • however: it’s not zero-knowledge for any (unless it’s honest)
  • Fiat-Shamir: removal of interaction?
    • given ideal hash
    • can be replaced by
Highlights
  • before IP: notion of proof was NP
  • NP verification: sending solution (solution)
  • Co-NP verification: impossible (0 solutions)
  • number of solutions for a statement
    • cannot be verified
  • PSPACE: not known
    • i.e. alternation of quantifier
  • w/ IP: all can be done!
    • PSPACE = IP
  • arriver of the second prover: MIP (2020)
    • can get unconditional ZK for all NP
    • lead to PCP theorem
    • and combined w/ quantum computing: and.. smth crazy