Professional Documents
Culture Documents
ZKP MOOC
Commercial interest in SNARKs
ZKP MOOC
Why so much commercial interest?
Babai-Fortnow-Levin-Szegedy 1991:
In this setup, a single reliable PC can monitor
the operation of a herd of supercomputers
working with unreliable software.
ZKP MOOC
Why so much commercial interest?
Babai-Fortnow-Levin-Szegedy 1991:
a slow and expensive computer
In this setup, a single reliable PC can monitor
the operation of a herd of supercomputers
GPUs
working with unreliable software.
ZKP MOOC
Why so much commercial interest?
Babai-Fortnow-Levin-Szegedy 1991:
L1 blockchain
In this setup, a single reliable PC can monitor
the operation of a herd of supercomputers
GPUs
working with unreliable software.
ZKP MOOC
Blockchain Applications I
Outsourcing computation: (no need for zero knowledge)
L1 chain quickly verifies the work of an off-chain service
Examples:
▪ Scalability: proof-based Rollups (zkRollup)
off-chain service processes a batch of Tx;
L1 chain verifies a succinct proof that Tx were processed correctly
ZKP MOOC
Blockchain Applications II
Some applications require zero knowledge (privacy):
▪ Private Tx on a public blockchain:
▪ zk proof that a private Tx is valid (Tornado cash, Zcash, IronFish, Aleo)
▪ Compliance:
▪ Proof that a private Tx is compliant with banking laws (Espresso)
▪ Proof that an exchange is solvent in zero-knowledge (Raposa)
ZKP MOOC
Many non-blockchain applications
ZKP MOOC
Using ZK to fight disinformation
ZKP MOOC
C2PA: a standard for content provenance
location
timestamp
embedded certified verify metadata
signing key sk signature by checking sig
C2PA
ZKP MOOC
A problem: post-processing
Newspapers often process the photos before publishing:
▪ Resize (1500×1000), Crop, Grayscale (AP lists allowed ops)
processed ???
photo
ZKP MOOC
A solution using a zk-SNARK (with T. Datta, 2022)
▪
photo
location
timestamp
proof π
ZKP MOOC
Performance
▪
(in browser)
ZKP MOOC
Why are all these applications possible now?
The breakthrough: new fast SNARK provers
▪ Proof generation time is linear (or quasilinear) in computation size
▪ Many beautiful ideas … will cover in lectures
ZKP MOOC
Next segment:
What is a SNARK?
ZKP MOOC
Credit: Faithie/Shutterstock
What is a SNARK?
ZKP MOOC
Credit: Faithie/Shutterstock
Review: arithmetic circuits
▪
ZKP MOOC
Interesting arithmetic circuits
Examples:
▪ CSHA(h, m): outputs 0 if SHA256(m) = h , and ≠0 otherwise
ChSHA(h, m) = (h – SHA256(m)) , |CSHA| ≈ 20K gates
ZKP MOOC
Structured vs. unstructured circuits
An unstructured circuit: a circuit with arbitrary wires
output
A structured circuit:
input
⋯
ZKP MOOC
(preprocessing) NARK: Non-interactive ARgument of Knowledge
ZKP MOOC
(preprocessing) NARK: Non-interactive ARgument of Knowledge
ZKP MOOC
NARK: requirements (informal)
accept or reject
ZKP MOOC
SNARK: a Succinct ARgument of Knowledge
▪
ZKP MOOC
SNARK: a Succinct ARgument of Knowledge
▪
ZKP MOOC
SNARK: a Succinct ARgument of Knowledge
ZKP MOOC
The trivial SNARK is not a SNARK
▪
ZKP MOOC
Types of preprocessing Setup
▪
random bits
better
deterministic algorithm
ZKP MOOC
Significant progress in recent years (partial list)
post-quantu
verifier time setup
m?
trusted per
Groth’16 no
circuit
universal
Plonk / Marlin no
trusted setup
Bulletproofs DLOG no
collision
STARK yes
resistance
ZKP MOOC
Significant progress in recent years (partial list)
post-quantu
verifier time setup
m?
trusted per
Groth’16 (for a circuit with ≈220 gates) no
circuit
universal
Plonk / Marlin no
trusted setup
Bulletproofs transparent no
post-quantu
verifier time setup
m?
trusted per
Groth’16 no
circuit
universal
Plonk / Marlin no
trusted setup
Bulletproofs transparent no
ZKP MOOC
Credit: Faithie/Shutterstock
Definitions: knowledge soundness
▪
ZKP MOOC
Definitions: knowledge soundness
▪
ZKP MOOC
Zero knowledge
Where is
Waldo?
ZKP MOOC
Defining Zero knowledge
ZKP MOOC
Building an efficient SNARK
ZKP MOOC
Credit: Faithie/Shutterstock
Recall: SNARK (Non-interactive ARgument of Knowledge)
ZKP MOOC
General paradigm: two steps
A functional
(1) commitment
scheme
(cryptographic object) SNARK for
general circuits
A compatible
(2) interactive
oracle proof (IOP)
Let’s explain each concept …
(info. theoretic object)
ZKP MOOC
Review: commitments
▪
ZKP MOOC
A standard construction
▪
ZKP MOOC
Committing to a function
Prover Verifier
$ comf
accept or
reject
ZKP MOOC
Committing to a function: syntax
▪
ZKP MOOC
Four important functional commitments
▪
ZKP MOOC
Let’s look at polynomial commitments
▪
ZKP MOOC
Let’s look at polynomial commitments
▪
ZKP MOOC
The trivial commitment scheme is not a
polynomial commitment
▪
ZKP MOOC
A useful observation
▪
$
(∗)
ZKP MOOC
A useful observation
▪
ZKP MOOC
Making it a SNARK (non-interactive)
The Fiat-Shamir transform:
▪ public-coin interactive protocol ⇒ non-interactive protocol
[public coin: all verifier randomness is public]
accept or reject
ZKP MOOC
A SNARK for polynomial equality testing
▪
accept or reject
ZKP MOOC
A SNARK for polynomial equality testing
▪
accept or reject
ZKP MOOC
Back to the paradigm
A functional
(1) commitment
scheme
SNARK for
general circuits
A compatible
(2) interactive
oracle proof (IOP)
ZKP MOOC
Goal: boost functional commitment ⇒ SNARK for general circuits
Poly-IOP
ZKP MOOC
▪
ZKP MOOC
oracle $
oracle
⋮ $
oracle
ZKP MOOC
Properties
▪
ZKP MOOC
An example Poly-IOP (a bit contrived)
ZKP MOOC
The IOP Zoo (⇒ SNARKs for general circuits)
SNARK
ZKP MOOC
SNARKs in practice
DSL SNARK
SNARK heavy
program backend
friendly computation
Circom, format prover
ZoKrates,
circuit,
Leo, compiler
Zinc, R1CS,
Cairo, …
Noir, EVM
… byte code
domain specific
language
ZKP MOOC
END OF LECTURE
Coming up:
(i) SNARK DSLs
(ii) an efficient multilinear IOP
ZKP MOOC
Credit: Faithie/Shutterstock