Slide 17
Slide 17 text
Zk Snark
Algebraic Circuit
Problem
(Code)
R1CS
QAP (Quadratic Arithmetic Program)
Elliptic Curve Pairings
f(x): y= x³+2x²+x+1.
(x=2, y=19)
Code
Gate1: x*(x+2) = sym1
Gate2: sym1*x = sym2
Gate3: (sym2 + x +1) * 1 = y
(~out)
C= A*B
Circuit
0 1 0 0 0
0 0 1 0 0
1 1 0 1 0
2 1 0 0 0
0 1 0 0 0
1 0 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
A B
C
(A • S) (B • S) - C • S = 0
ࣁೠ zk snark ਗܻח ଵઑ ܐ [2]ܳ ଵઑ೧ࣁਃ !
1 4 -3 1 0
-1.5 -4 4 -1.5 0
0.5 1 -1 0.5 0
A[t]
B[t]
C[t]
7 0 0 0 0
-6.5 1.5 0 0 0
1.5 -0.5 0 0 0
0 0 3 -3 1
0 0 -2.5 4 -1.5
0 0 0.5 -1 0.5
A(t_0) * B(t_0) — C(t_0) = H(t_0) * Z(t_0)
Trusted Party (t_0)
A(t_0), B(t_0), C(t_0), H(t_0)
Discrete Logarithm Problem
e(G,G) A(t_0)*B(t_0)-C(t_0)
= e(G,G) H(t_0)* Z(t_0)
e(π_a, π_b) / e(π_c, G) = e (π_h, Z(t_0) * G)
1) Check QAP divisibility
2)Check validity of knowledge commitments forA,B,C:
3)Check same coefficients were used
π_a, π_b, π_c, π_h
π_a', π_b', π_c', π_s'
Bilinear Pairing
Verifier
Proof
A[t], B[t], C[t], Z(t)
݃ߨ