LegoSNARK Modular Design and Composition of Succinct Zero-Knowledge - - PowerPoint PPT Presentation

legosnark
SMART_READER_LITE
LIVE PREVIEW

LegoSNARK Modular Design and Composition of Succinct Zero-Knowledge - - PowerPoint PPT Presentation

LegoSNARK Modular Design and Composition of Succinct Zero-Knowledge Proofs Matteo Campanelli, Dario Fiore , Anas Querol IMDEA Software Institute, Spain 2nd ZKProof Workshop April 10, 2019 zkSNARKs focus of this work from theoretical


slide-1
SLIDE 1

LegoSNARK

Modular Design and Composition

  • f Succinct Zero-Knowledge Proofs

Matteo Campanelli, Dario Fiore, Anaïs Querol IMDEA Software Institute, Spain

2nd ZKProof Workshop — April 10, 2019

slide-2
SLIDE 2

zkSNARKs ⟵ focus of this work

knowledge soundness: prover must know a valid w zero-knowledge: 𝝆 hides w succinctness: |𝝆|=poly(log|w|), Ver time=poly(|x|+log|w|)

2

Prover x, w Setup R Verifier x, 𝝆

crs

𝛒

x

I know w s.t. 
 R(x, w)=1

from theoretical feasibility 
 to real systems succinct arguments
 [Kilian92, Micali94] … first implemented systems plenty of schemes and software libraries two keys of success succinctness generality (NP stmt)

1992 2013 2019

slide-3
SLIDE 3

zkSNARKs construction paradigm

3

𝚸

R(x, w)=1

NP-complete language

L𝜬

x=SHA256(w)

  • theory. these representations can

capture any NP statement / computation

  • practice. conversions can be a

source of overhead each zkSNARK 𝚸 uses a single representation

Matrix mult. C=A·B

reduction

proof system intermediate representation target statement

𝚸

Pinocchio, Groth16, vSQL, Hyrax, Bulletproofs, Aurora…

Arithmetic Circuit SAT
 (R1CS)

𝚸

ZKBoo, ZKB+ +, QSP , SSP

Boolean Circuit SAT

𝛒

reduction reduction reduction reduction

slide-4
SLIDE 4

computation is often heterogeneous

4

forced to choose a single unifying representation for the whole computation …not necessarily the best for all subroutines

R2(x2, w1, w2) R1(x1, w1)

??

“I have an unspent token
 whose value v complies with
 an arithmetic policy” 𝚸

ZKBoo, ZKB+ +, QSP , SSP

Boolean Circuit SAT

𝚸

Pinocchio, Groth16, vSQL, Hyrax, Bulletproofs, Aurora…

Arithmetic Circuit SAT
 (R1CS) 𝛒 𝛒

can we split the statement and use both systems?

slide-5
SLIDE 5

LegoSNARK vision: alternative bottom-up design

general-purpose zkSNARKs via lightweight linking of specialized zkSNARKs

5

Groth 16

Arith. Circuits
 (R1CS)

𝛒m

Hyrax
 vSQL

low-depth Arith. Circuits

𝚸

Hadam.
 Product

𝚸

Matrix
 Mult.

ZKB++
 SSP

Boolean
 Circuits

𝚸

Range

zkSNARKs portfolio (“proof gadgets”)

MerkleT(rt,u,path)

F⋅u = 0

∀i: ui ∈[min, max]

⋀ ⋀

𝛒r 𝛒b

𝛒

R(x, u, w)

proof
 integration

slide-6
SLIDE 6

how to achieve this approach?

linking must preserve soundness, zero-knowledge, succinctness… and efficiency

6

Groth 16

Arith. Circuits
 (R1CS)

𝛒m

Hyrax
 vSQL

low-depth Arith. Circuits

𝚸

Hadam.
 Product

𝚸

Matrix
 Mult.

ZKB++
 SSP

Boolean
 Circuits

𝚸

Range

zkSNARKs portfolio (“proof gadgets”)

MerkleT(rt,u,path)

F⋅u = 0

∀i: ui ∈[min, max]

⋀ ⋀

𝛒r 𝛒b

𝛒

R(x, u, w)

proof
 integration

we build on the commit and prove methodology

slide-7
SLIDE 7

LegoSNARK

7

framework

for commit-and-prove zkSNARKs

proof gadgets

to populate the framework

applications

combining proof gadgets

Interface Building blocks Let’s play!

slide-8
SLIDE 8

LegoSNARK

8

framework

for commit-and-prove zkSNARKs

  • definitions
  • composition recipes

Interface Building blocks Let’s play!

proof gadgets

to populate the framework

applications

combining proof gadgets

slide-9
SLIDE 9

(non-interactive) commitments

Setup(1𝝻)→ck Com(ck, u)→(c, o) VerCom(ck, c, u, o)→0/1

9

slide-10
SLIDE 10

modeling relations

R( x , w )

a more granular model:

R( x , u , ω ) R: Dx × Du × … × Dω

10

statement witness statement committed
 witness free
 witness

slide-11
SLIDE 11

CP-SNARKs

R( x , u , ω )

  • Def. A CP-SNARK for relation R and commitment scheme Com 


is a zkSNARK for the relation Rcom ≔ (ck, R) s.t.

Rcom( x, c, u, o, ω ) ≔ “ R( x, u, ω )=1 ⋀ VerCom(ck, c, u, o)=1 ”

minimal definition. Com scheme as decoupled as possible from proof system

11

CPR

R Com

slide-12
SLIDE 12

composing CP-SNARKs

If you have two appropriate bricks you can combine them

R0: D0

x

× Du × D0

ω R1: D1 x

× Du × D1

ω

R⋀( (x0, x1), u, (ω0, ω1) ) ≔ R0(x0, u, ω0) ⋀ R1(x1, u, ω1)

simple idea. 𝝆⋀=(Comck(u), 𝝆0, 𝝆1), 𝝆0←CP0, 𝝆1←CP1

  • ther compositions. disjunction, sequential composition, >2 relations

main message. focus on constructing proof gadgets, security is proven once for all

12

=

⇒ +

CP0

R0 Com

CP1

R1 Com

CP⋀

R⋀ Com

slide-13
SLIDE 13

Let’s play! Building blocks Interface

LegoSNARK

13

framework

for commit-and-prove zkSNARKs

  • definitions
  • generic composition recipes

proof gadgets

to populate the framework

applications

combining proof gadgets

slide-14
SLIDE 14

how to populate LegoSNARK framework?

  • 1. import existing zkSNARKs in the framework

don’t want to throw away years of research…
 + may want general-purpose systems as fallback option

  • 2. construct new CP-SNARKs


exploit the power of specialization

14

Time to produce bricks…

LegoSNARK
 gadgets

slide-15
SLIDE 15
  • 1. import existing zkSNARKs into the framework

two challenges.

(a) many popular zkSNARKs not commit-and-prove

really a limitation? if 𝚸 general-purpose it can also prove “cck(x) opens to x”… but encoding commitment verification in L𝚸 can be costly (proving 2048-wide Pedersen com. ~7mins)

(b) some others are CP under weaker definitions / have different commitment schemes and keys: how can they speak to each other?

15

zkSNARKs

~CP-SNARKs

[Gro16] [Pinocchio] [DFGK14] [Geppetto] [Lipmaa16] [vSQL] [Bulletp.]

???

[GM17] [Hyrax]

LegoSNARK
 gadgets

slide-16
SLIDE 16

SNARK⟼CP-SNARK compiler

  • 1. formalize the notion of commit-carrying SNARKs (ccSNARKs)

cc𝚸.KeyGen(R)→(ck, crs) cc𝚸.Prove(crs, x, w)→(comck(w), 𝝆)

  • 2. for many existing schemes we prove they are ccSNARKs
  • 3. cc-SNARK-lifting compiler


16

Interesting: no need to be fully binding (see paper)

zkSNARKs

~CP-SNARKs

[Gro16] [Pinocchio] [DFGK14] [Geppetto] [Lipmaa16] [vSQL] [Bulletp.] [GM17] [Hyrax]

ccSNARKs

LegoSNARK
 gadgets

slide-17
SLIDE 17

ccSNARK-lifting compiler

17

zkSNARKs

~CP-SNARKs

[Gro16] [Pinocchio] [DFGK14] [Geppetto] [Lipmaa16] [vSQL] [Bulletp.] [GM17] [Hyrax]

ccSNARKs

CPlink

+

CPR

R Com

CPlink

cc.VerCom Com

cc𝚸

R cc.VerCom

efficiency? this is specialized!

cc.Com(u) Com(u) LegoSNARK
 gadgets

slide-18
SLIDE 18

how to populate LegoSNARK framework?

  • 1. import existing zkSNARKs in the framework

don’t want to throw away years of research…
 + may want general-purpose systems as fallback option

  • 2. construct new CP-SNARKs


exploit the power of specialization

18

LegoSNARK
 gadgets

CPlink

[Gro16] [Geppetto] [Lipmaa16] [vSQL]

Time to produce bricks…

slide-19
SLIDE 19

specialized LegoSNARK gadgets

Pedersen* = any Pedersen-like commitment. PolyCom from [zk-vSQL] AGM=‘Algebraic Group Model’. universal crs (yes, no). updatable crs (yes, to be proven)

19

Relation commit. CP time space

  • assumpt. uni upd

scheme scheme Prove Ver crs 𝝆

Pedersen commitments open to the same vector Pedersen* CPlink

n 1 n 1 AGM Rlink(c’, u, o’)≔ c’≟Ped(u, o’) n=|u|

Linear properties

Pedersen* CPlin n 1 n 1 AGM RF,c(u) ≔ F⋅u ≟ c F m×n PolyCom

CP'lin

|F|+m+n log m⋅n m⋅n log m⋅n q-SDH, KoE, ROM

Matrix multiplication

PolyCom

CPmmul

n2 n2+log n n2 log n q-SDH, KoE, ROM Rmm(X, A, B) ≔ X ≟ A⋅B n x n

Hadamard product

PolyCom

CPhad

n log n n log n q-SDH, KoE, ROM Rhad(a, b, c) ≔ c ≟ a∘b n=|u|

Self permutation

PolyCom

CPsfprm

n log n n log n q-SDH, KoE, ROM R𝜚(u) ≔ ∀i: ui ≟ u𝜚(i) n=|u|

slide-20
SLIDE 20

techniques

Pedersen* = any Pedersen-like commitment. PolyCom from [zk-vSQL] AGM=‘Algebraic Group Model’. universal crs (yes, no). updatable crs (yes, to be proven)

20

Relation commit. CP time space

  • assumpt. uni upd

scheme scheme Prove Ver crs 𝝆

Pedersen commitments open to the same vector Pedersen* CPlink

n 1 n 1 AGM Rlink(c’, u, o’)≔ c’≟Ped(u, o’) n=|u|

Linear properties

Pedersen* CPlin n 1 n 1 AGM RF,c(u) ≔ F⋅u ≟ c F m×n PolyCom

CP'lin

|F|+m+n log m⋅n m⋅n log m⋅n q-SDH, KoE, ROM

Matrix multiplication

PolyCom

CPmmul

n2 n2+log n n2 log n q-SDH, KoE, ROM Rmm(X, A, B) ≔ X ≟ A⋅B n x n

Hadamard product

PolyCom

CPhad

n log n n log n q-SDH, KoE, ROM Rhad(a, b, c) ≔ c ≟ a∘b n=|u|

Self permutation

PolyCom

CPsfprm

n log n n log n q-SDH, KoE, ROM R𝜚(u) ≔ ∀i: ui ≟ u𝜚(i) n=|u|

knowledge version of 
 QA-NIZKs for linear subspaces multivariate polynomial commitments and zero-knowledge sum-check

slide-21
SLIDE 21

applications

combining proof gadgets

  • LegoGro16: CP version of

Groth16, w/5000x faster proofs

  • LegoUAC: CP-SNARK for
  • Arith. Circ. w/universal

linear-size CRS

Let’s play! Building blocks Interface

LegoSNARK

21

framework

for commit-and-prove zkSNARKs

  • definitions
  • generic composition recipes

proof gadgets

to populate the framework

  • import existing SNARKs
  • new specialized CP-SNARKs:

linear, Hadamard, matrix mult, permutation…

slide-22
SLIDE 22

a commit-and-prove version of Groth16 zkSNARK

can prove statements about data committed with a “classical” Pedersen vector commitment

22

⇒ +

  • comparison. vectors of n entries, 256bits each

Prove Ver |crs| |𝝆| n=8 n=2048 n=8 n=2048

LegoGro16

0.003s 0.08s 4.1ms 0.5KB 130KB 191B

CPGroth16

1.2s 428s 3.4ms 3.6MB 935MB 127B 5000× speedup 7000× shorter

ck=random group elms // no trusted setup // a-priori generated

SNARK-friendly R1CS encoding 


  • f Pedersen

CPlink

Gro16.Ped Pedersen*

LegoGro16

QAP Pedersen*

Groth16

QAP Gro16.Ped

a byproduct of our lifting compiler

slide-23
SLIDE 23

arithmetic circuits w/universal linear-size crs

Groth09 encoding of arithmetic circuit satisfiability ua

L

+ ua

R

= ua

O

⋀ um

L

∘ um

R

= um

O

⋀ “wire consistency of (ua

L

,ua

R

, ua

O

, um

L

,um

R

, um

O

)” Radd(ua

L

,ua

R

, ua

O

) ⋀ Rhad(um

L

,um

R

, um

O

) ⋀ Rsfprm,𝜚(ua

L

,ua

R

, ua

O

, um

L

,um

R

, um

O

)

23

⇒ +

+ ×

x1 x2 x3

for free if commitment is additive homomorphic

CPhad

Rhad Com

CPsfprm

Rsfprm Com

LegoUAC

Arith.Circ. Com

slide-24
SLIDE 24

arithmetic circuits w/universal linear-size crs

24

CP time space assumpt. uni upd scheme Prove Ver crs 𝝆

CPhad

n log n n log n

q-SDH, KoE, ROM

CPsfprm

n log n n log n

q-SDH, KoE, ROM

CP time space assumpt. uni upd scheme Prove Ver crs 𝝆

GKMMM18

n log n |x| n2 1

q-MC, KoE

Sonic

n log n |x| n 1

AGM, ROM

LegoUAC

N |x|+log N N log N

q-SDH, KoE, ROM

CPhad

CPsfprm

+

CP-SNARK proof gadgets

Table: zkSNARKs for arithmetic circuits with universal crs and
 log- or constant-size succinctness.
 n = #multgates, N = #gates (including addition gates)

slide-25
SLIDE 25

LegoSNARK summary

25

framework

for commit-and-prove zkSNARKs

  • definitions
  • generic composition recipes
  • implementation. library

will go public soon

proof gadgets

to populate the framework

  • import existing SNARKs
  • new specialized CP-SNARKs
  • ongoing work. CP-SNARKs

for set membership

applications

combining proof gadgets

  • LegoGro16: CP version of

Groth16

  • LegoUAC: Arith. Circ. w/

universal linear-size CRS

  • ongoing work. arith. circuits

universal O(#mulgates)-size CRS

Interface Building blocks Let’s play!

slide-26
SLIDE 26

Thank you for your attention!

Questions?

Check out our Paper ⇾ ePrint 2019/142

thanks to our sponsors: