polynomial commitments
building block for universal SNARKs
part 1—context
part 2—landscape
part 3—mechanics
part 4—gadgets
historical perspective
KZG10 citations per year
historical perspective
ATH 🚀
KZG10 citations per year
definitions
polynomial oracle
polynomial f
"encode"
prover
definitions
polynomial oracle
polynomial f
"encode"
evaluation point z
"query"
verifier
prover
definitions
polynomial oracle
polynomial f
"encode"
evaluation point z
evaluation f(z)
"respond"
"query"
verifier
prover
definitions
polynomial oracle
polynomial commitment
polynomial f
"encode"
"commit"
evaluation point z
evaluation f(z)
"respond"
"query"
verifier
prover
definitions
polynomial oracle
polynomial commitment
polynomial f
"encode"
"commit"
evaluation point z
evaluation f(z)
"respond"
"query"
verifier
prover
"open"
definitions
polynomial oracle
polynomial commitment
polynomial f
"encode"
"commit"
evaluation point z
evaluation f(z)
"prove"
"respond"
"query"
verifier
prover
"open"
the fine print
Marlin (Appendix B.1)
pages 54–55 of 75
big picture
computer science
information theory
cryptography
circuit
witness
universal
SNARK
big picture
computer science
information theory
cryptography
circuit
witness
universal
SNARK
polynomial oracles
big picture
computer science
information theory
cryptography
circuit
witness
interactive oracle proof
universal
SNARK
polynomial oracles
big picture
computer science
information theory
cryptography
hash function
circuit
witness
interactive oracle proof
random oracle
universal
SNARK
polynomial oracles
big picture
computer science
information theory
cryptography
hash function
polynomial oracles
circuit
witness
polynomial commitment
interactive oracle proof
random oracle
universal
SNARK
big picture
computer science
information theory
cryptography
hash function
polynomial oracles
circuit
witness
polynomial commitment
interactive oracle proof
random oracle
universal
SNARK
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
tug of war
oracle type
cryptographic primitive
set
accumulator
expressiveness
cost
tug of war
oracle type
cryptographic primitive
set
accumulator
vector
vector commitment
expressiveness
cost
tug of war
oracle type
cryptographic primitive
set
accumulator
vector
vector commitment
low degree
low degree test
expressiveness
cost
FRI
tug of war
oracle type
cryptographic primitive
set
accumulator
vector
vector commitment
low degree
low degree test
polynomial
polynomial commitment
expressiveness
cost
FRI
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
part 1—context
part 2—landscape
part 3—mechanics
part 4—gadgets
setup and commitment
| FRI | |
| hash function | |
setup | H hash function w in F root of unity | |
commitment | root(f(w0), ..., f(wkd)) | |
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 |
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 |
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)
comparing setups
| FRI |
| hash function |
transparent | |
succinct | |
unbounded | |
updatable | |
post-quantum | |
comparing setups
| FRI | KZG |
| hash function | pairing group |
transparent | | |
succinct | | |
unbounded | | |
updatable | | |
post-quantum | | |
comparing setups
| FRI | KZG | DARK | ||
| hash function | pairing group | RSA group | class group | Jacobian group |
transparent | | | | | |
succinct | | | | | |
unbounded | | | | | |
updatable | | | | | |
post-quantum | | | | | |
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 | | | | | | |
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)
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)
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)
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)
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
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)
part 1—context
part 2—landscape
part 3—mechanics
part 4—gadgets
commit-reduce low degree test
prover
verifier
...
commit-reduce low degree test
prover
verifier
r0
...
rlog(d)-1
commit-reduce low degree test
prover
verifier
commit(f0)
r0
commit(f1)
...
rlog(d)-1
commit(flog(d)), aux
fi+1 = reduce(fi, ri)
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)
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
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
consistency checks
FRI (hash function)
DARK (UO group)
Bulletproof (discrete log)
2zfi+1(z2)
?=
z(fi(z) + fi(-z))
+
ri(fi(z) - fi(-z))
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))
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
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)
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)
other openings
DARK (UO group)
Bulletproof (discrete log)
even(fi)(z), odd(fi)(z)
<coeff(f), powers(x)>
recent developments
novel constructions
part 1—context
part 2—landscape
part 3—mechanics
part 4—gadgets
modularity
information theory
cryptography
polynomial commitment
interactive oracle proof
modularity
information theory
cryptography
polynomial commitment
interactive oracle proof
polynomial
gadgets
modularity
information theory
cryptography
polynomial commitment
interactive oracle proof
polynomial
gadgets
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
basic tricks
| trick |
range | (f // ZS)*ZS |
range check
commitments to f, f // ZS
range check
commitments to f, f // ZS
z
range check
commitments to f, f // ZS
z
openings of f, f // ZS at z
range check
commitments to f, f // ZS
z
openings of f, f // ZS at z
check that f(z) = (f // ZS)(z)*ZS(z)
basic tricks
| trick |
range | (f // ZS)*ZS |
multi-point opening | (f // ZS)*ZS + f % ZS |
multi-point opening
commitments to f, f // ZS plus f % ZS
in the Lagrange basis
(evaluations of f on S)
multi-point opening
commitments to f, f // ZS plus f % ZS
z
in the Lagrange basis
(evaluations of f on S)
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)
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)
basic tricks
| trick |
range | (f // ZS)*ZS |
multi-point opening | (f // ZS)*ZS + f % ZS |
multi-polynomial opening | Y0f0 + ... + Ykfk |
multi-point opening
f0(z), ..., fk(z)
commitments to f0, ..., fk
z
multi-point opening
f0(z), ..., fk(z)
r
opening of r0f0 + ... + rkfk at z
commitments to f0, ..., fk
z
commitment
linearity
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
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) |
side note—Lagrange basis
monomial and Lagrange bases
(a0, ..., ad)
vector
monomial and Lagrange bases
(a0, ..., ad)
vector
a0X0 + ... + adXd
monomial basis
monomial and Lagrange bases
(a0, ..., ad)
vector
a0L0(X) + ... + adLd(X)
Lagrange basis
a0X0 + ... + adXd
monomial basis
monomial and Lagrange bases
(a0, ..., ad)
vector
a0L0(X) + ... + adLd(X)
Lagrange basis
a0X0 + ... + adXd
monomial basis
FFT
inverse FFT
barycentric formula
evaluation on i'th root of unity
Montgomery batch inversion
a0
a1
a2
a3
a4
a5
Montgomery batch inversion
a0
a1
a2
a3
a4
a5
a0
a0a1
a0a1a2
a0a1a2a3
a0a1a2a3a4
a0a1a2a3a4a5
Montgomery batch inversion
a0
a1
a2
a3
a4
a5
a0
a0a1
a0a1a2
a0a1a2a3
a0a1a2a3a4
a0a1a2a3a4a5
(a0a1a2a3a4a5)-1
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
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
/side note—Lagrange basis
more tricks
| Lagrange basis | monomial basis |
encode | a0L0(X) + ... + adLd(X) | a0X0 + ... + adXd |
more tricks
| Lagrange basis | monomial basis |
encode | a0L0(X) + ... + adLd(X) | a0X0 + ... + adXd |
query | f(wi) | fL(X) + aiXi + Xi+1fR(X) |
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) |
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 argument
commitments to f, g, q
q = (shift(g) - g - f) // ZS
sum argument
commitments to f, g, q
z
q = (shift(g) - g - f) // ZS
sum argument
commitments to f, g, q
z
openings of f, g, shift(g), q at z
q = (shift(g) - g - f) // ZS
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)
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
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 |
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 |
permutation argument
σ: (ai) → (aj) is a permutation
permutation argument
σ: (ai) → (aj) is a permutation
⟺
ai = aj whenever i = σ(j)
permutation argument
σ: (ai) → (aj) is a permutation
⟺
ai = aj whenever i = σ(j)
⟺
ai + i*X = aj + σ(j)*X whenever i = σ(j)
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
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
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
even more tricks
| Lagrange basis trick |
Hadamard product | f1(X)f2(X) |
Lagrange superpower
even more tricks
| Lagrange basis trick |
Hadamard product | f1(X)f2(X) |
inner product | sum over f1(X)f2(X) |
Lagrange superpower
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
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
PLONK constraint system
arithmetic circuit
addition
gates
multiplication gates
wires
public
inputs
PLONK constraint system
arithmetic circuit
addition
gates
multiplication gates
wires
public
inputs
i
PLONK constraint system
arithmetic circuit
addition
gates
multiplication gates
wires
aL + aR = aO
public
inputs
i
PLONK constraint system
arithmetic circuit
addition
gates
multiplication gates
wires
aL + aR = aO
mLmR = mO
public
inputs
i
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
thank you :)