1 of 113

polynomial commitments

building block for universal SNARKs

2 of 113

part 1—context

part 2—landscape

part 3—mechanics

part 4—gadgets

3 of 113

historical perspective

KZG10 citations per year

4 of 113

historical perspective

KZG10 citations per year

5 of 113

historical perspective

KZG10 citations per year

6 of 113

historical perspective

ATH 🚀

KZG10 citations per year

7 of 113

definitions

polynomial oracle

polynomial f

"encode"

prover

8 of 113

definitions

polynomial oracle

polynomial f

"encode"

evaluation point z

"query"

verifier

prover

9 of 113

definitions

polynomial oracle

polynomial f

"encode"

evaluation point z

evaluation f(z)

"respond"

"query"

verifier

prover

10 of 113

definitions

polynomial oracle

polynomial commitment

polynomial f

"encode"

"commit"

evaluation point z

evaluation f(z)

"respond"

"query"

verifier

prover

11 of 113

definitions

polynomial oracle

polynomial commitment

polynomial f

"encode"

"commit"

evaluation point z

evaluation f(z)

"respond"

"query"

verifier

prover

"open"

12 of 113

definitions

polynomial oracle

polynomial commitment

polynomial f

"encode"

"commit"

evaluation point z

evaluation f(z)

"prove"

"respond"

"query"

verifier

prover

"open"

13 of 113

the fine print

Marlin (Appendix B.1)

pages 54–55 of 75

14 of 113

big picture

computer science

information theory

cryptography

circuit

witness

universal

SNARK

15 of 113

big picture

computer science

information theory

cryptography

circuit

witness

universal

SNARK

polynomial oracles

16 of 113

big picture

computer science

information theory

cryptography

circuit

witness

interactive oracle proof

universal

SNARK

polynomial oracles

17 of 113

big picture

computer science

information theory

cryptography

hash function

circuit

witness

interactive oracle proof

random oracle

universal

SNARK

polynomial oracles

18 of 113

big picture

computer science

information theory

cryptography

hash function

polynomial oracles

circuit

witness

polynomial commitment

interactive oracle proof

random oracle

universal

SNARK

19 of 113

big picture

computer science

information theory

cryptography

hash function

polynomial oracles

circuit

witness

polynomial commitment

interactive oracle proof

random oracle

universal

SNARK

20 of 113

big picture

computer science

information theory

cryptography

hash function

polynomial oracles

circuit

witness

polynomial commitment

interactive oracle proof

random oracle

universal

SNARK

perfect soundness

statistical soundness

computational soundness

21 of 113

tug of war

oracle type

cryptographic primitive

set

accumulator

expressiveness

cost

22 of 113

tug of war

oracle type

cryptographic primitive

set

accumulator

vector

vector commitment

expressiveness

cost

23 of 113

tug of war

oracle type

cryptographic primitive

set

accumulator

vector

vector commitment

low degree

low degree test

expressiveness

cost

FRI

24 of 113

tug of war

oracle type

cryptographic primitive

set

accumulator

vector

vector commitment

low degree

low degree test

polynomial

polynomial commitment

expressiveness

cost

FRI

25 of 113

tug of war

oracle type

cryptographic primitive

set

accumulator

vector

vector commitment

low degree

low degree test

polynomial

polynomial commitment

inner product

inner product argument

expressiveness

cost

FRI

26 of 113

part 1—context

part 2—landscape

part 3—mechanics

part 4—gadgets

27 of 113

setup and commitment

FRI

hash function

setup

H hash function

w in F root of unity

commitment

root(f(w0), ..., f(wkd))

28 of 113

setup and commitment

FRI

KZG

hash function

pairing

group

setup

H hash function

w in F root of unity

G1, G2 groups

g1, g2 generators

e pairing

s in F secret

commitment

root(f(w0), ..., f(wkd))

a0s0g1 + ... + ansdg1

29 of 113

setup and commitment

FRI

KZG

DARK

hash function

pairing

group

unknown order

group

setup

H hash function

w in F root of unity

G1, G2 groups

g1, g2 generators

e pairing

s in F secret

G unknown order

g in G random

q large integer

commitment

root(f(w0), ..., f(wkd))

a0s0g1 + ... + ansdg1

a0q0g + ... + adqdg

30 of 113

setup and commitment

FRI

KZG

DARK

Bulletproof

hash function

pairing

group

unknown order

group

discrete log

group

setup

H hash function

w in F root of unity

G1, G2 groups

g1, g2 generators

e pairing

s in F secret

G unknown order

g in G random

q large integer

G elliptic curve

gi in G independent

commitment

root(f(w0), ..., f(wkd))

a0s0g1 + ... + ansdg1

a0q0g + ... + adqdg

a0g0 + ... + adgd

algebraic

(with linear homomorphism)

31 of 113

comparing setups

FRI

hash function

transparent

succinct

unbounded

updatable

post-quantum

32 of 113

comparing setups

FRI

KZG

hash function

pairing

group

transparent

succinct

unbounded

updatable

post-quantum

33 of 113

comparing setups

FRI

KZG

DARK

hash function

pairing

group

RSA

group

class

group

Jacobian

group

transparent

succinct

unbounded

updatable

post-quantum

34 of 113

comparing setups

FRI

KZG

DARK

Bulletproof

hash function

pairing

group

RSA

group

class

group

Jacobian

group

discrete log

group

transparent

succinct

unbounded

updatable

post-quantum

35 of 113

asymptotic performance

FRI

hash

function

size

O(log2(d))

verifier time

O(log2(d))

prover time

O(d*log(d))

max(commitment time, opening time)

max(commitment size, opening proof size)

36 of 113

asymptotic performance

FRI

KZG

hash

function

pairing

group

size

O(log2(d))

O(1)

verifier time

O(log2(d))

O(1)

prover time

O(d*log(d))

O(d)

max(commitment time, opening time)

max(commitment size, opening proof size)

37 of 113

asymptotic performance

FRI

KZG

DARK

hash

function

pairing

group

unknown order

group

size

O(log2(d))

O(1)

O(log(d))

verifier time

O(log2(d))

O(1)

O(log(d))

prover time

O(d*log(d))

O(d)

O(d)

max(commitment time, opening time)

max(commitment size, opening proof size)

38 of 113

asymptotic performance

FRI

KZG

DARK

Bulletproof

hash

function

pairing

group

unknown order

group

discrete log

group

size

O(log2(d))

O(1)

O(log(d))

O(log(d))

verifier time

O(log2(d))

O(1)

O(log(d))

O(d)

prover time

O(d*log(d))

O(d)

O(d)

O(d)

max(commitment time, opening time)

max(commitment size, opening proof size)

39 of 113

commitment size (with security parameter λ and d ≪ λ)

FRI

KZG

DARK

Bulletproof

hash function

pairing group

RSA

group

class

group

Jacobian group

discrete log

group

O(1) * O(λ)

O(1) * O(λ3)

O(1) * O(λ3)

O(1) * O(λ2)

???

O(1) * O(λ)

subexponential attacks

(sieve based)

polynomial attack

40 of 113

commitment size (with security parameter λ and d ≪ λ)

FRI

KZG

DARK

Bulletproof

hash function

pairing group

RSA

group

class

group

Jacobian group

discrete log

group

O(1) * O(λ)

O(1) * O(λ3)

O(1) * O(λ3)

O(1) * O(λ2)

???

O(1) * O(λ)

secp256k1

256 bits

(32 bytes)

SHA256

256 bits

(32 bytes)

BLS12-381

381 bits

(48 bytes)

subexponential attacks

(sieve based)

RSA

4,096 bits

(512 bytes)

class group

1,827 bits

(229 bytes)

target

128 bits

security

polynomial attack

Jacobian group

303 bits

(38 bytes)

41 of 113

part 1—context

part 2—landscape

part 3—mechanics

part 4—gadgets

42 of 113

commit-reduce low degree test

prover

verifier

...

43 of 113

commit-reduce low degree test

prover

verifier

r0

...

rlog(d)-1

44 of 113

commit-reduce low degree test

prover

verifier

commit(f0)

r0

commit(f1)

...

rlog(d)-1

commit(flog(d)), aux

fi+1 = reduce(fi, ri)

45 of 113

commit-reduce low degree test

prover

verifier

commit(f0)

r0

commit(f1)

...

rlog(d)-1

commit(flog(d)), aux

consistency checks

constant polynomial

check

fi+1 = reduce(fi, ri)

46 of 113

even-odd and left-right decomposition

f(X) = even(f)(X2) + X*odd(f)(X2)

even-odd decomposition

f(X) = left(f)(X) + Xd/2*right(f)(X)

left-right decomposition

47 of 113

decompose-reduce

f(X) = even(f)(X2) + X*odd(f)(X2)

even-odd decomposition

hash function

(FRI)

UO group

(DARK)

discrete log group

(Bulletproof)

coefficients

even(f) + r*odd(f)

even(f) + r*odd(f)

r*left(f) + r-1*right(f)

basis

N/A

g

r-1*left(g) + r*right(g)

f(X) = left(f)(X) + Xd/2*right(f)(X)

left-right decomposition

48 of 113

consistency checks

FRI (hash function)

DARK (UO group)

Bulletproof (discrete log)

2zfi+1(z2)

?=

z(fi(z) + fi(-z))

+

ri(fi(z) - fi(-z))

49 of 113

consistency checks

FRI (hash function)

DARK (UO group)

Bulletproof (discrete log)

2zfi+1(z2)

?=

z(fi(z) + fi(-z))

+

ri(fi(z) - fi(-z))

commit(fi+1)

?=

commit(even(fi))

+

ri*q*commit(odd(fi))

50 of 113

consistency checks

FRI (hash function)

DARK (UO group)

Bulletproof (discrete log)

2zfi+1(z2)

?=

z(fi(z) + fi(-z))

+

ri(fi(z) - fi(-z))

commit(fi+1)

?=

commit(even(fi))

+

ri*q*commit(odd(fi))

commit(fi+1)

?=

commit(fi)

+

(ri)2L + (ri)-2R

51 of 113

quotient argument openings

f(X) - f(z) = q(X)(X - z)

FRI (hash function)

KZG10 (pairing group)

(f(X) - f(z))/(X - z) low degree proof

(within unique decoding radius)

52 of 113

quotient argument openings

f(X) - f(z) = q(X)(X - z)

FRI (hash function)

KZG10 (pairing group)

e(commit(f) - f(z), g2)

?=

e(commit(q), (s - z)g2)

(f(X) - f(z))/(X - z) low degree proof

(within unique decoding radius)

53 of 113

other openings

DARK (UO group)

Bulletproof (discrete log)

even(fi)(z), odd(fi)(z)

<coeff(f), powers(x)>

54 of 113

recent developments

novel constructions

  • lattice-based polynomial commitment
  • Jacobian groups with unknown order
  • sparse polynomial commitments

55 of 113

part 1—context

part 2—landscape

part 3—mechanics

part 4—gadgets

56 of 113

modularity

information theory

cryptography

polynomial commitment

interactive oracle proof

57 of 113

modularity

information theory

cryptography

polynomial commitment

interactive oracle proof

polynomial

gadgets

58 of 113

modularity

information theory

cryptography

polynomial commitment

interactive oracle proof

polynomial

gadgets

59 of 113

testing polynomial identities

f1, f2 low-degree polynomials

f1 = f2 with high probability

f1(z) = f2(z) at random point z

f1(X), ..., fk(X) low-degree polynomials

G(X1, ..., XK, Y) low-degree

G(f1, ..., fn, Y) = 0 with high probability

G(f1, ..., fn, Y)|X=z at random point z

fundamental theorem of algebra

Schwartz–Zippel lemma

60 of 113

basic tricks

trick

range

(f // ZS)*ZS

61 of 113

range check

commitments to f, f // ZS

62 of 113

range check

commitments to f, f // ZS

z

63 of 113

range check

commitments to f, f // ZS

z

openings of f, f // ZS at z

64 of 113

range check

commitments to f, f // ZS

z

openings of f, f // ZS at z

check that f(z) = (f // ZS)(z)*ZS(z)

65 of 113

basic tricks

trick

range

(f // ZS)*ZS

multi-point opening

(f // ZS)*ZS + f % ZS

66 of 113

multi-point opening

commitments to f, f // ZS plus f % ZS

in the Lagrange basis

(evaluations of f on S)

67 of 113

multi-point opening

commitments to f, f // ZS plus f % ZS

z

in the Lagrange basis

(evaluations of f on S)

68 of 113

multi-point opening

commitments to f, f // ZS plus f % ZS

z

openings of f, f // ZS at z

in the Lagrange basis

(evaluations of f on S)

69 of 113

multi-point opening

commitments to f, f // ZS plus f % ZS

z

openings of f, f // ZS at z

check that f(z) = (f // ZS)(z)*ZS(z) + (f % ZS)(z)

in the Lagrange basis

(evaluations of f on S)

70 of 113

basic tricks

trick

range

(f // ZS)*ZS

multi-point opening

(f // ZS)*ZS + f % ZS

multi-polynomial opening

Y0f0 + ... + Ykfk

71 of 113

multi-point opening

f0(z), ..., fk(z)

commitments to f0, ..., fk

z

72 of 113

multi-point opening

f0(z), ..., fk(z)

r

opening of r0f0 + ... + rkfk at z

commitments to f0, ..., fk

z

commitment

linearity

73 of 113

multi-point opening

f0(z), ..., fk(z)

r

opening of r0f0 + ... + rkfk at z

check that (r0f0 + ... + rkfk)(z) = r0f0(z) + ... + rkfk(z)

commitments to f0, ..., fk

z

commitment

linearity

74 of 113

basic tricks

trick

range

(f // ZS)*ZS

multi-point opening

(f // ZS)*ZS + f % ZS

multi-polynomial opening

Y0f0 + ... + Ykfk

multi-{point, polynomial}

see here

degree bound

XN-df(X)

75 of 113

side note—Lagrange basis

76 of 113

monomial and Lagrange bases

(a0, ..., ad)

vector

77 of 113

monomial and Lagrange bases

(a0, ..., ad)

vector

a0X0 + ... + adXd

monomial basis

78 of 113

monomial and Lagrange bases

(a0, ..., ad)

vector

a0L0(X) + ... + adLd(X)

Lagrange basis

a0X0 + ... + adXd

monomial basis

79 of 113

monomial and Lagrange bases

(a0, ..., ad)

vector

a0L0(X) + ... + adLd(X)

Lagrange basis

a0X0 + ... + adXd

monomial basis

FFT

inverse FFT

80 of 113

barycentric formula

evaluation on i'th root of unity

81 of 113

Montgomery batch inversion

a0

a1

a2

a3

a4

a5

82 of 113

Montgomery batch inversion

a0

a1

a2

a3

a4

a5

a0

a0a1

a0a1a2

a0a1a2a3

a0a1a2a3a4

a0a1a2a3a4a5

83 of 113

Montgomery batch inversion

a0

a1

a2

a3

a4

a5

a0

a0a1

a0a1a2

a0a1a2a3

a0a1a2a3a4

a0a1a2a3a4a5

(a0a1a2a3a4a5)-1

84 of 113

Montgomery batch inversion

a0

a1

a2

a3

a4

a5

a0

a0a1

a0a1a2

a0a1a2a3

a0a1a2a3a4

a0a1a2a3a4a5

(a0)-1

(a0a1)-1

(a0a1a2)-1

(a0a1a2a3)-1

(a0a1a2a3a4)-1

(a0a1a2a3a4a5)-1

85 of 113

Montgomery batch inversion

a0

a1

a2

a3

a4

a5

a0

a0a1

a0a1a2

a0a1a2a3

a0a1a2a3a4

a0a1a2a3a4a5

(a0)-1

(a0a1)-1

(a0a1a2)-1

(a0a1a2a3)-1

(a0a1a2a3a4)-1

(a0a1a2a3a4a5)-1

(a0)-1

(a1)-1

(a2)-1

(a3)-1

(a4)-1

(a5)-1

86 of 113

/side note—Lagrange basis

87 of 113

more tricks

Lagrange basis

monomial basis

encode

a0L0(X) + ... + adLd(X)

a0X0 + ... + adXd

88 of 113

more tricks

Lagrange basis

monomial basis

encode

a0L0(X) + ... + adLd(X)

a0X0 + ... + adXd

query

f(wi)

fL(X) + aiXi + Xi+1fR(X)

89 of 113

more tricks

Lagrange basis

monomial basis

encode

a0L0(X) + ... + adLd(X)

a0X0 + ... + adXd

query

f(wi)

fL(X) + aiXi + Xi+1fR(X)

shift

f(wiX)

Xif(X)

90 of 113

more tricks

Lagrange basis

monomial basis

encode

a0L0(X) + ... + adLd(X)

a0X0 + ... + adXd

query

f(wi)

fL(X) + aiXi + Xi+1fR(X)

shift

f(wiX)

Xif(X)

sum

g(wX) = f(X) + g(X)

f(1)

91 of 113

sum argument

commitments to f, g, q

q = (shift(g) - g - f) // ZS

92 of 113

sum argument

commitments to f, g, q

z

q = (shift(g) - g - f) // ZS

93 of 113

sum argument

commitments to f, g, q

z

openings of f, g, shift(g), q at z

q = (shift(g) - g - f) // ZS

94 of 113

sum argument

commitments to f, g, q

z

openings of f, g, shift(g), q at z

check g(wz) - g(z) - f(z) = q(z)ZS(z)

q = (shift(g) - g - f) // ZS

shift(g)(z)

95 of 113

more tricks

Lagrange basis

monomial basis

encode

a0L0(X) + ... + adLd(X)

a0X0 + ... + adXd

query

f(wi)

fL(X) + aiXi + Xi+1fR(X)

shift

f(wiX)

Xif(X)

sum

g(wX) = f(X) + g(X)

f(1)

sum check alternative

|S|-1(f(X) % ZS(X))|X=0

96 of 113

more tricks

Lagrange basis

monomial basis

encode

a0L0(X) + ... + adLd(X)

a0X0 + ... + adXd

query

f(wi)

fL(X) + aiXi + Xi+1fR(X)

shift

f(wiX)

Xif(X)

sum

g(wX) = f(X) + g(X)

f(1)

grand product

g(wX) = f(X)g(X)

see Sonic appendix B

97 of 113

more tricks

Lagrange basis

monomial basis

encode

a0L0(X) + ... + adLd(X)

a0X0 + ... + adXd

query

f(wi)

fL(X) + aiXi + Xi+1fR(X)

shift

f(wiX)

Xif(X)

sum

g(wX) = f(X) + g(X)

f(1)

grand product

g(wX) = f(X)g(X)

see Sonic appendix B

permutation

f(X) + Yσ(X) + Z

and

f(X) + YX + Z

grand products

see Sonic appendix A

98 of 113

permutation argument

σ: (ai) → (aj) is a permutation

99 of 113

permutation argument

σ: (ai) → (aj) is a permutation

ai = aj whenever i = σ(j)

100 of 113

permutation argument

σ: (ai) → (aj) is a permutation

ai = aj whenever i = σ(j)

ai + i*X = aj + σ(j)*X whenever i = σ(j)

101 of 113

permutation argument

σ: (ai) → (aj) is a permutation

ai = aj whenever i = σ(j)

ai + i*X = aj + σ(j)*X whenever i = σ(j)

{ai + i*X} = {aj + σ(j)*X} as multisets

102 of 113

permutation argument

σ: (ai) → (aj) is a permutation

ai = aj whenever i = σ(j)

ai + i*X = aj + σ(j)*X whenever i = σ(j)

{ai + i*X} = {aj + σ(j)*X} as multisets

producti(ai + i*X + Y) = productj(aj + σ(j)*X + Y) as polynomials in X, Y

103 of 113

permutation argument

σ: (ai) → (aj) is a permutation

ai = aj whenever i = σ(j)

ai + i*X = aj + σ(j)*X whenever i = σ(j)

{ai + i*X} = {aj + σ(j)*X} as multisets

producti(ai + i*X + Y) = productj(aj + σ(j)*X + Y) as polynomials in X, Y

producti(ai + i*r1 + r2) = productj(aj + σ(j)*r1 + r2) for random challenges r1, r2

104 of 113

even more tricks

Lagrange basis trick

Hadamard product

f1(X)f2(X)

Lagrange superpower

105 of 113

even more tricks

Lagrange basis trick

Hadamard product

f1(X)f2(X)

inner product

sum over f1(X)f2(X)

Lagrange superpower

106 of 113

even more tricks

Lagrange basis trick

Hadamard product

f1(X)f2(X)

inner product

sum over f1(X)f2(X)

sparse matrix multiplication

two sum cheks; see here

Lagrange superpower

107 of 113

even more tricks

Lagrange basis trick

Hadamard product

f1(X)f2(X)

inner product

sum over f1(X)f2(X)

sparse matrix multiplication

two sum cheks; see here

range checks

see Aztec research

RAM read and write

see Aztec research

Lagrange superpower

108 of 113

PLONK constraint system

arithmetic circuit

addition

gates

multiplication gates

wires

public

inputs

109 of 113

PLONK constraint system

arithmetic circuit

addition

gates

multiplication gates

wires

public

inputs

i

110 of 113

PLONK constraint system

arithmetic circuit

addition

gates

multiplication gates

wires

aL + aR = aO

public

inputs

i

111 of 113

PLONK constraint system

arithmetic circuit

addition

gates

multiplication gates

wires

aL + aR = aO

mLmR = mO

public

inputs

i

112 of 113

PLONK constraint system

arithmetic circuit

addition

gates

multiplication gates

wires

w = concat(

i, # input wires

aL, aR, aO, # ADD wires

mL, mR, mO, # MUL wires

)

w = permute(w, σ)

aL + aR = aO

mLmR = mO

public

inputs

i

113 of 113

thank you :)