A brief history of Lookup Arguments

1 Introduction

Mainly refer to the April 2023 article "A Brief History of Lookup Arguments" by the Ingonyama team.

In recent years, the research hot spots of zk-SNARKs include:

  • Make ZKP proof more succinct
  • Reduce Prover time and Verifier time

However, most SNARKs are still limited by arithmetic operations that easily convert to polynomials. Arithmetic operations that are easily converted to polynomials are often called "SNARK-friendly", while other "SNARK-unfriendly" operations remain unsolved.

Until 2018, Jonathan Bootle and others published the paper "BCG+18 Nearly linear-time zero-knowledge proofs for correct program execution" , a lookup protocol was proposed to handle certain SNARK-unfriendly operations. The lookup protocol is used to prove the following statement:

  • 已知table T = { t i } i = 0 , ⋯   , N − 1 T=\{t_i\}_{i=0,\cdots,N-1} T={ ti}i=0,,N1with distinct values ​​("rows")
  • 一组lookups F = { f j } j = 0 , ⋯   , m − 1 F=\{f_j\}_{j=0,\cdots,m-1} F={ fj}j=0,,m1(There may be duplicate values)
  • Proof: All lookups are included in the table, that is, F ⊆ T F\subseteq T FT

table T T T is usually public, while lookups are usually private witnesses.
Can:

  • Treat the table as all legal values ​​​​of a specific variable
  • Lookups are the values ​​of the variables given by the execution of a specific program.
  • Then, the above statement means that the variable maintains the legal status during the entire execution process.
  • Unless explicitly stated, it is assumed m < N m<N m<N, and in most cases m ≪ N m\ll N mN

This article focuses on the evolution of various lookup arguments and their variants, focusing on:

2. Use of lookup argument

2.1 Scope check

When checking numbers x x x { 0 , 1 , ⋯   , N − 1 } \{0,1,\cdots,N-1\} { 0,1,,N1}范围内,其中 N = 2 n N=2^n N=2n.
The corresponding arithmetic constraint method is:

  • set义 n n nNumber b 0 , ⋯ , b n − 1 b_0,\cdots,b_{n-1} b0,,bn1,检查对于每个 i i i,有 b i ∈ { 0 , 1 } b_i\in\{0,1\} bi{ 0,1},且 ∑ i b i 2 i = x \sum_{i}b_i2^i=x ibi2i=x. Common demand n + 1 n+1 n+1Promise.
  • If necessary m m Range check of m numbers requires O ( m n ) = O ( m log ⁡ N ) O(mn)=O (m\log N) O(mn)=O(mlogN)Personal promise.

With the help of lookup argument, only one lookup constraint is needed to check m m mContains digits { 0 , 1 , ⋯ , N − 1 } \{0,1,\cdots,N-1 \} { 0,1,,NWithin the range of 1}. The overhead of such a lookup constraint will be introduced later. And when N N When N is not power of 2, the above arithmetic constraint method will be cumbersome, and the lookup argument does not need to be concerned N N NYes or no power of 2.

2.2 Finite field functions

The lookup argument can be used to implement an arbitrary (finite domain) function by simply defining a table with the complete input and output values ​​of the function. Can be used to implement functions with any number of variables.

as widely used in hash calculations k k k-bit XOR function. Following the logic of Section 2.1 and using arithmetic constraints, it will require 6 k 6k 6k constraints. With the lookup argument, you can directly use table T T Tcome to fruition, inside table T T T的rows为:
t i = ( A , B , C ) t_i=(A,B,C) ti=(A,B,C)
Among them:

  • 对于每个i i i A , B ∈ { 0 , 1 , ⋯   , 2 k − 1 } A,B\in\{0,1,\cdots,2^k-1\} A,B{ 0,1,,2k1}为2个 k k k Different combinations of-bit numbers, and C = A ⊕ B C=A\oplus B C=AB
  • 整个table T T T have 2 2 k 2^{2k} 22k rows, and each row demand exists 3 k 3k 3k bits。
    • hit k = 32 k=32 k=When 32 (a common value for many hash functions), such a table is completely impractical.
    • hit k = 16 k=16 k=When 16, such a table requires 24GB of storage space, which is not practical for most application scenarios.

2.3 Better XOR

The 16-bit table chip for SHA-256 in Halo2 implements a better bit-wise XOR function by using zero-interleaving and lookup argument.
zero-interleaving refers to representing numbers in binary:
A = ∑ l = 0 k − 1 a l 2 l A=\sum_{l=0 }^{k-1}a_l2^l A=l=0k1al2l
Then add a '0' bit between any 2 original bits, so that:
A ′ = ∑ l = 0 k − 1 a l 4 l A'=\sum_{l=0}^{k-1}a_l4^l A=l=0k1al4l
Two XOR imports A , B A,B A,BAfter zero-interleaving, there is A ′ , B ′ A',B' A,B。计算 C ′ ′ = A ′ + B ′ C''=A'+B' C′′=A+B,则 C ′ ′ C'' CThe bit in the even position of ′′ is C = A ⊕ B C=A\oplus B C=AB. C ′ ′ C'' C′′获得 C C C,Customer C ′ ′ C'' C′′ is decomposed into odd bits and even bits:
C ′ ′ = ∑ l = 0 k − 1 c l e v e n 4 l + 2 ∑ l = 0 k − 1 c l o d d 4 l C''=\sum_{l=0}^{k-1}c_l^{even}4^l+2\sum_{l=0}^{ k-1}c_{l}^{odd}4^l C′′=l=0k1cleven4l+2l=0k1clodd4l

thereby:

  • c l e v e n c_l^{even} cleven C = A ⊕ B C=A\oplus B C=ABinary representation of B,
  • Also has by-products: c l o d d c_l^{odd} clodd D = A ∧ B D=A\land B D=ABinary representation of B. ∧ \land 表示bit-wise AND。
  • 借助4次zero-interleaving table: A , B , C , D → A ′ , B ′ , C ′ , D ′ A,B,C,D\rightarrow A',B',C',D' A,B,C,DA,B,C,D, and an arithmetic constraint:
    A ′ + B ′ = C ′ ′ = C ′ + 2 D ′ A' +B'=C''=C'+2D' A+B=C′′=C+2D
    possible time confirmation A , B A,B A,The bit-wise XOR and bit-wise AND results of B.

hit k = 32 k=32 k=When 32, the above implementation is still unrealistically large, and a single table requires 48GB of storage space.
However, for k = 16 k=16 k=In the case of 16, the lookup table corresponding to the above implementation only requires 384kB.
The number of bits can be reduced in a SNARK-friendly way through slicing, that is, the arithmetic gate is introduced - which uses two 16-bit numbers x 0, x 1 x_0,x_1 x0,x1 is the input, and then the 32-bit number is finally obtained x = x 0 ⋅ 1 + x 1 ⋅ 2 16 x=x_0\cdot 1+x_1\cdot 2^{ 16} x=x01+x1216

2.4 Finite state machine

lookup table can be used to implement finite state machines. A state machine contains a set of states and state changes that depend on the inputs. The lookup table that implements the state machine contains all legal combinations of (current state, input, next state). The execution trace of the state machine is usually expressed as:
( s t a t e ( j ) , i n p u t ( j ) , n e x t _ s t a t e ( j ) ) (state(j),input(j),next\_state (j)) (state(j),input(j),next_state(j))

You can use the lookup argument to prove the legal execution of the state machine and prove the wiring constraints:
n e x t _ s t a t e ( j ) = s t a t e ( j + 1 ) next\_state(j )=state(j+1) next_state(j)=state(j+1)

The wiring constraint is SNARK-friendly.

3. Plookup

Plookup is one of the early lookup protocols and is a simplified version of the first lookup protocol.
The idea behind Plookup is:

  • 已知向量 t ∈ F N , f ∈ F m , s ∈ F N + m t\in\mathbb{F}^N,f\in\mathbb{F}^m,s\in\mathbb{F}^{N+m} tFN,fFm,sFN+m,和双变量多项式:
    F ( β , γ ) = ( 1 + β ) m ∏ j = 1 m ( γ + f j ) ∏ i = 1 N − 1 ( γ ( 1 + β ) + t i + β t i + 1 ) F(\beta,\gamma)=(1+\beta)^m\prod_{j=1}^{m}(\gamma+f_j)\prod_{i=1}^{N-1}(\gamma(1+\beta)+t_i+\beta t_{i+1}) F(β,γ)=(1+β)mj=1m(γ+fj)i=1N1(γ(1+β)+ti+βti+1)
    G ( β , γ ) = ∏ k = 1 m + N − 1 ( γ ( 1 + β ) + s k + β s k + 1 ) G(\beta ,\gamma)=\prod_{k=1}^{m+N-1}(\gamma(1+\beta)+s_k+\beta s_{k+1}) G(β,γ)=k=1m+N1(γ(1+β)+sk+βsk+1)
  • 则有:
    F ≡ G ⇔ { { f j } ⊆ { t i } , 且 s = ( f , t )  sorted by  t F\equiv G \Leftrightarrow \left\{\begin{matrix} \{f_j\}\subseteq \{t_i\}, & 且 \\ s=(f,t) \text{ sorted by } t & \\ \end{matrix}\right. FG{ { fj}{ ti},s=(f,t) sorted by tand
    in:
    • s = ( f , t )  sorted by  t s=(f,t) \text{ sorted by } t s=(f,t) sorted by t,表示 s s The order of appearance of the values ​​in s is the same as t t The order of occurrence in t is the same, because there are { f j } ⊆ { t i } \{f_j\}\subseteq \{t_i\ } { fj}{ ti}

若有 s = ( f , t )  sorted by  t s=(f,t) \text{ sorted by } t s=(f,t) sorted by t,且, { f j } ⊆ { t i } \{f_j\}\subseteq \{t_i\} { fj}{ ti},则对于每个 i = 1 , ⋯ , N − 1 i=1,\cdots,N-1 i=1,,N1, all are different k ∈ { 1 , ⋯ , m + N − 1 } k\in\{1,\ cdots,m+N-1\} k{ 1,,m+N1},使得:
( γ ( 1 + β ) + t i + β t i + 1 ) = ( γ ( 1 + β ) + s k + β s k + 1 ) (3.4) (\gamma (1+\beta)+t_i+\beta t_{i+1})=(\gamma(1+\beta)+s_k+\beta s_{k+1}) \tag{3.4} (γ(1+β)+ti+βti+1)=(γ(1+β)+sk+βsk+1)(3.4)
对于其它 s k = s k + 1 s_k=s_{k+1} sk=sk+1Index value of k k k,存在 j ∈ { 1 , ⋯   , m } j\in\{1,\cdots,m\} j{ 1,,m}, use f j = s k f_j=s_k fj=sk,且:
( 1 + β ) ( γ + f j ) = ( γ ( 1 + β ) + s k + β s k + 1 ) (3.5) (1+\ beta)(\gamma+f_j)=(\gamma(1+\beta)+s_k+\beta s_{k+1}) \tag{3.5} (1+β)(γ+fj)=(γ(1+β)+sk+βsk+1)(3.5)

General β \beta β is regarded as a coefficient, then F , G F,G F,GWatch it F [ γ ] \mathbb{F}[\gamma] F[γ]polynomial, thus having a unique decomposition factor. By identifying the factors in the above equations 3.4 and 3.5, we can find that the factors are about the variables β \beta β multi-format.

3.1 Plookup definition

Plookup uses the following definition:

  • 1)取 m = N − 1 m=N-1 m=N1,Young insufficiency N = m + 1 N=m+1 N=m+1, then the last element needs to be repeated to fill the corresponding lookups list until it satisfies N = m + 1 N=m+ 1 N=m+1
  • 2) H = { g , ⋯   , g N = 1 } H=\{g,\cdots,g^N=1\} H={ g,,gN=1} F \mathbb{F} FMiddle order N N N的multiplicative subgroup。
  • 3) For vectors p = F N p=\mathbb{F}^N p=FN, define polynomial p ( x ) ∈ F [ X ] < N p(x)\in\mathbb{F} [X]_{<N} p(x)F[X]<N, so that the vector value is the evaluation value of the polynomial, that is, it satisfies p i = p ( g i ) p_i=p(g^i) pi=p(gi)
  • 4)令 L i ( x ) ∈ F [ X ] < N L_i(x)\in\mathbb{F}[X]_{<N} Li(x)F[X]<N为基于 H H H's part i i iThe image of Lagrange city is full of feet L i ( g j ) = δ i j L_i(g^j)=\delta_{ij } Li(gj)=dij(for Kronecker delta).
  • 5) s ∈ F 2 N − 1 s\in \mathbb{F}^{2N-1} sF2N1 ( f , t ) (f,t) (f,t) sorted by t t t

3.2 Plookup protocol

The final Plookup protocol is:

  • 1) Prover calculates and merges 2 polynomials h 1 , h 2 ∈ F [ x ] < N h_1,h_2\in\mathbb{F}[x]_ {<N} h1,h2F[x]<N commits such that for each i = 1 , ⋯ , N i=1,\cdots,N i=1,,N, Yes: [Shu, General s s sThe vector is divided into half on the left and right, and then interpolated to obtain h 1 , h 2 h_1,h_2 h1,h2Multiple format. ]
    h 1 ( g i ) = s i h_1(g^i)=s_i h1(gi)=si
    h 2 ( g i ) = s N + i − 1 h_2(g^i)=s_{N+i-1} h2(gi)=sN+i1
  • 2) Verifier sends random value to Prover β , γ \beta,\gamma β,γ
  • 3) Prover calculates and corrects the polynomial Z ∈ F [ x ] < N Z\in \mathbb{F}[x]_{<N} WITHF[x]<NPolynomial commitment, Z Z ZDefinition F ( β , γ ) / G ( β , γ ) F(\beta,\gamma)/G( \beta,\gamma) F(β,γ)/G(β,γ),有:
    Z ( g ) = 1 Z(g)=1 Z(g)=1
    对于 i = 2 , ⋯   , N − 1 i=2,\cdots,N-1 i=2,,N1,有 Z ( g i ) = ( 1 + β ) i − 1 ∏ l = 1 i − 1 ( γ + f l ) ( γ ( 1 + β ) + t l + β t l + 1 ) ∏ l = 1 i − 1 ( γ ( 1 + β ) + s l + β s l + 1 ) ( γ ( 1 + β ) + s N + l + β s N + l + 1 ) (3.9) Z(g^i)=\frac{(1+\beta)^{i-1}\prod_{l=1}^{i-1}(\gamma +f_l)(\gamma(1+\beta)+t_l+\beta t_{l+1})}{\prod_{l=1}^{i-1}(\gamma (1+\beta)+s_l+\ beta s_{l+1})(\gamma(1+\beta)+s_{N+l}+\beta s_{N+l+1})}\tag{3.9} Z(gi)=l=1i1(γ(1+β)+sl+βsl+1)(γ(1+β)+sN+l+βsN+l+1)(1+β)i1l=1i1(γ+fl)(γ(1+β)+tl+βtl+1)(3.9)
    Z ( g N ) = 1 Z(g^N)=1 Z(gN)=1
  • 4) Verifier owns x ∈ H x\in H xH、Identities:
    L 1 ( x ) ( Z ( x ) − 1 ) = 0 (3.11) L_1(x )(Z(x)-1)=0\tag{3.11} L1(x)(Z(x)1)=0(3.11)
    L N ( x ) ( Z ( x ) − 1 ) = 0 (3.12) L_N(x)(Z(x)-1)=0\tag{3.12} LN(x)(Z(x)1)=0(3.12)
    L N ( x ) ( h 1 ( x ) − h 2 ( g x ) ) = 0 (3.13) L_N(x)(h_1(x)-h_2(gx))=0\tag{3.13} LN(x)(h1(x)h2(gx))=0(3.13)
    ( x − g N ) Z ( x ) ( 1 + β ) ( γ + f ( x ) ) ( γ ( 1 + β ) + t ( x ) + β t ( g x ) ) = ( x − g N ) Z ( g x ) ( γ ( 1 + β ) + h 1 ( x ) + β h 1 ( g x ) ) ( γ ( 1 + β ) + h 2 ( x ) + β h 2 ( g x ) ) (3.14) (x-g^N)Z(x)(1+\beta)(\gamma+f(x))(\gamma(1+\beta)+t(x)+\beta t(gx))=(x-g^N)Z(gx)(\gamma(1+\beta)+h_1(x)+\beta h_1(gx))(\gamma(1+\beta)+h_2(x)+\beta h_2(gx))\tag{3.14} (xgN)Z(x)(1+β)(γ+f(x))(γ(1+β)+t(x)+βt(gx))=(xgN)Z(gx)(γ(1+β)+h1(x)+βh1(gx))(γ1(+β)+h2(x)+βh2(gx))(3.14)

Note that the constructed Z ( x ) Z(x) Z(x) polynomial, in Eq. 3.9 On the basis of , the numerator and denominator are multiplied by the same multiplier term. That means, the N N Nafter, F , G F,G F,The equivalence of G implies that all terms can be reduced, ultimately obtaining 1. Equations 3.11 and 3.12 check Z ( g ) = Z ( g N ) = 1 Z(g)=Z(g^N)=1 Z(g)=Z(gN)=1, while Equation 3.14 checks that each evaluation value indeed adds the correct multiplier term - the added on both sides of it ( x − g N ) (x-g^N) (xg(g N ) ^N)Z(gN) Z ( g N + 1 ) = Z ( g ) Z(g^{N+1})=Z(g) Z(gN+1)=The system between Z(g).

3.3 Plookup overhead

The Plookup protocol does not rely on any special commitment scheme. usually:

  • Prover runtime为 O ( N log ⁡ N ) O(N\log N) O(NlogN) domain operations (to construct polynomials from evaluations values), and O ( N ) O(N) O(N)Personal group calculation (hereafter Construction multi-format Z Z Z)。
  • When using the KZG commitment scheme, its proof size is 5 group elements and 9 domain elements, and the Verifier runtime is 2 pairing functions.

3.4 Plookup generalization and optimization

The Plookup protocol can be generalized to multiple witness polynomials f 1 , ⋯ , f w ∈ F [ x ] < m f_1,\cdots,f_w\in\mathbb{F }[x]_{<m} f1,,fwF[x]<m和多个tables t 1 , ⋯   , t w ∈ F [ x ] < N t_1,\cdots,t_w\in\mathbb{F}[x]_{<N} t1,,twF[x]<N. Verifier selects a random value α \alpha α, then these polynomials can be aggregated as:
t = ∑ l = 1 w α l t l t=\sum_{l=1}^ {w}\alpha^lt_l t=l=1waltl
f = ∑ l = 1 w α l f l f=\sum_{l=1}^{w}\alpha^lf_l f=l=1walfl

Then process as before f , t f,t f,t

If table is a set of consecutive integers, then there is t l + 1 = t l + 1 t_{l+1}=t_l+1 tl+1=tl+1, then the 3.9 method in the Plookup protocol can be simplified as:
Z ( g i ) = ∏ l = 1 i − 1 ( γ + f l ) ( γ + t l ) ∏ l = 1 i − 1 ( γ + s l ) ( γ + s N + l ) Z(g^i)=\frac{\prod_{l=1}^{i- 1}(\gamma+f_l)(\gamma+t_l)}{\prod_{l=1}^{i-1}(\gamma+s_l)(\gamma+s_{N+l})} Z(gi)=l=1i1(γ+sl)(γ+sN+l)l=1i1(γ+fl)(γ+tl)

The corresponding Verifier checks also need to be adjusted accordingly.

Another generalization of the Plookup protocol is the plonkup protocol, see Luke Pearson et al.'s 2022 paperPlonkup: Reconciling plonk with plookup, plonkup protocol It integrates plonk and plookup, and supports the introduction of efficient lookup tables with general plonk gates.

4. cq protocol

The main problems with the plookup protocol are:

  • 对于 m ≪ N m\ll N mIn the common scenario of N, the plookup protocol is expensive.

Since the advent of the plookup protocol, multiple lookup protocols have been iterated. Compared with the previous protocol, each new lookup protocol is more effective N N The dependence of N has been reduced. The core ideas behind these new lookup protocols are:

  • Move most table calculations to precalculation.

As of April 2023, the best lookup protocol is cq, see Liam Eagen et al.'s 2022 papercq: Cached quotients for fast lookups.

4.1 Logarithmic Derivative

The cq protocol is based on the following Logarithmic Derivative trick:

  • 2-piece multi-frame formula p ( x ) = ∏ a ∈ A ( x + a ) p(x)=\prod_{a\in A}(x+a) < /span>p(x)=aA(x+a) q ( x ) = ∏ b ∈ B ( x + b ) q(x)=\prod_{b\in B}(x+b) q(x)=bB(x+b) are equal if and only if the following rational functions are equal:
    p ′ ( x ) p ( x ) = ∑ a ∈ A 1 x + a \frac{p'(x)}{p(x)}=\sum_{a\in A}\frac{1}{x+a} < /span>p(x)p(x)=aAx+a1
    q ′ ( x ) q ( x ) = ∑ b ∈ B 1 x + b \frac{q'(x)}{q(x)}=\sum_{b\in B}\frac{1}{x+b} q(x)q(x)=bBx+b1

Same Yu p ( x ) = q ( x ) p(x)=q(x) p(x)=q(x),Advanced< /span> p ′ ( x ) / p ( x ) = q ′ ( x ) / q ( x ) p'(x)/p(x)=q'(x)/ q(x)p(x)/p(x)=q(x)/q(x)is trivial, and Rebellion, Yu p ′ ( x ) / p ( x ) = q ′ ( x ) / q ( x ) p'(x)/p(x)=q' (x)/q(x) p(x)/p(x)=q(x)/q(x),有:
( p ( x ) q ( x ) ) ′ = p ′ ( x ) q ( x ) − q ′ ( x ) p ( x ) q 2 ( x ) = 0 (\frac{p(x)}{q(x)})'=\frac{p'(x)q(x)-q'(x)p(x)}{q^2(x)}=0 (q(x)p(x))=q2(x)p(x)q(x)q(x)p(x)=0

That means, there p ( x ) / q ( x ) = c p(x)/q(x)=c p(x)/q(x)=c, inside c c c is a constant value. However, since p ( x ) , q ( x ) p(x),q(x) p(x),q(x)'s leading system equality 1, there is c = 1 c=1 c=1 p ( x ) = q ( x ) p(x)=q(x) p(x)=q(x)。从而,lookups f f f包含在table t t t中,当且仅当:
∑ i = 1 N m i x + t i = ∑ j = 1 m 1 x + f j (4.4) \sum_{i=1}^{N}\frac{m_i}{x+t_i}=\sum_{j=1}^{m}\frac{1}{x+f_j}\tag{4.4} i=1Nx+timi=j=1mx+fj1(4.4)
Among them:

  • m i m_i mi为lookup f j f_j fj t i t_i tiThe number of times the value appears. Note that each t i t_i ti is unique, and f j f_j fjvalues ​​support duplication, and for many t i t_i ti可以有 m i m_i miThe value is 0.

The core idea of ​​the cq protocol is to test the 4.4 equation at a random point x = β x=\beta x=The rational function identity of β.

4.2 Adjust cq protocol identity to Sumcheck

determinable multifunction A ( x ) , B ( x ) A(x),B(x) A(x),B(x),使得其evaluations值为:
A i = m i β + t i , i = 1 , ⋯   , N (4.5) A_i=\frac{m_i}{\beta+t_i},i=1,\cdots,N \tag{4.5} Ai=b+timi,i=1,,N(4.5)
B j = 1 β + f j , j = 1 , ⋯   , m B_j=\frac{1}{\beta+f_j},j=1,\cdots,m Bj=β+fj1,j=1,,m

To do the cq protocol identity check of equation 4.4.

Here are:

  • A i = A ( g i ) A_i=A(g^i) Ai=A(gi), inside g g gorder为 N N N的multiplicative subgroup V ⊂ F V\subset \mathbb{F} INF的generator。
  • B j = B ( w j ) B_j=B(w^j) Bj=B(wj), inside w w worder为 m m m的multiplicative subgroup H ⊂ F H\subset \mathbb{F} HF的generator。

Basic point β \beta β, in order to satisfy the relationship in Equation 4.4, A i , B j A_i,B_j Ai,BjDemand sufficiency ∑ i A i = ∑ j B j \sum_i A_i=\sum_j B_j iAi=jBj, and these polynomial evaluations based on multiplicative groups follow:
∑ i = 1 N A i = N ⋅ A ( 0 ) \sum_{i=1}^{N }A_i=N\cdot A(0) i=1NAi=NA(0)
∑ i = j m B j = m ⋅ B ( 0 ) \sum_{i=j}^{m}B_j=m\cdot B(0) i=jmBj=mB(0)

Then, Prover must prove:
N ⋅ A ( 0 ) = m ⋅ B ( 0 ) (4.9) N\cdot A(0)=m\cdot B(0 )\tag{4.9} NA(0)=mB(0)(4.9)

This corresponds to the univariate sumcheck problem.

4.3 quotient polynomial of cq protocol

多项式:
p ( x ) = A ( x ) ( T ( x ) + β ) − m ( x ) p(x)=A(x)(T(x)+\beta)-m(x) p(x)=A(x)(T(x)+β)m(x)
q ( x ) = B ( x ) ( F ( x ) + β ) − 1 q(x)=B(x)(F(x)+\beta)-1 q(x)=B(x)(F(x)+β)1
Inside:

  • T ( x ) , m ( x ) , F ( x ) T(x), m(x), F(x) T(x),m(x),F(x)多项式的evaluation值分别为 t i , m i , f j t_i,m_i,f_j ti,mi,fj
  • 对于 V V V p ( x ) p(x) p(x)'s evaluation list required 0.
  • 对于 H H H q ( x ) q(x) q(x)'s evaluation list required 0.

Thus, quotient polynomials can be defined Q A ( x ) , Q B ( x ) Q_A(x),Q_B(x) QA(x),QB(x)为:
Q A ( x ) = A ( x ) ( T ( x ) + β ) − m ( x ) Z V ( x ) (4.12) Q_A(x)=\frac{A(x)(T(x)+\beta)-m(x)}{Z_V(x)}\tag{4.12} QA(x)=WITHV(x)A(x)(T(x)+β)m(x)(4.12)
Q B ( x ) = B ( x ) ( F ( x ) + β ) − 1 Z H ( x ) (4.13) Q_B(x)=\frac{B(x)(F(x)+\beta)-1}{Z_H(x)}\tag{4.13} QB(x)=WITHH(x)B(x)(F(x)+β)1(4.13)
Among them:

  • Z V ( x ) , Z H ( x ) Z_V(x),Z_H(x) WITHV(x),WITHH(x)Separation V , H V, HV,The vanishing polynomial of H.

Prover needs to prove 2 things:

  • 1)Kichido multi-function A , B , Q A , Q B , F , m A,B,Q_A,Q_B,F,m A,B,QA,QB,F,m
  • 2) These polynomials satisfy the relationships of equations 4.9, 4.12, and 4.13 above.

If the KZG commitment scheme is used, it only needs to use pairing to check these equation relationships. However, these statements will be further divided next.

In the 4.4 cq protocol, prove that it knows polynomials A A Aand its sum

When using KZG commitment value [ ϕ ( x ) ] 1 [\phi(x)]_1 [ϕ(x)]1To prove that it knows polynomials ϕ ( x ) \phi(x) ϕ(x)When, Prover Association Its existence z z z points are evaluated to define a new polynomial:
P ϕ = ϕ ( x ) − ϕ ( z ) x − z P_{ \phi}=\frac{\phi(x)-\phi(z)}{x-z} Pϕ=xzϕ(x)ϕ(z)
and send the promised value [ P ϕ ] 1 [P_{\phi}]_1 [Pϕ]1。Verify the pairing function:
e ( [ ϕ ( x ) ] 1 − [ ϕ ( z ) ] 1 , [ 1 ] 2 ) = e ( [ P ϕ ] 1 , [ x − z ] 2 ) e([\phi(x)]_1-[\phi(z)]_1,[1]_2)=e([P_{\phi}]_1,[x-z] _2) e([ϕ(x)]1[ϕ(z)]1,[1]2)=e([Pϕ]1,[xz]2)

let it be rewritten as:
e ( [ ϕ ( x ) ] 1 − [ ϕ ( z ) ] 1 + z ⋅ [ P ϕ ] 1 , [ 1 ] 2 ) = e ( [ P ϕ ] 1 , [ x ] 2 ) e([\phi(x)]_1-[\phi(z)]_1+z\cdot [P_{\phi}]_1,[1] _2)=e([P_{\phi}]_1,[x]_2) e([ϕ(x)]1[ϕ(z)]1+With[Pϕ]1,[1]2)=e([Pϕ]1,[x]2)

makes the second parameter of the pairing function always [ 1 ] 2 [1]_2 [1]2or [ x ] 2 [x]_2 [x]2

踺证明其道多项style A A A,对 A A Aexisting x = 0 x=0 x=0点进行evaluate,有:
P A ( x ) = A ( x ) − A ( 0 ) x P_A(x)=\frac{A(x)-A(0)}{x} PA(x)=xA(x)A(0)
并受诺 [ P A ] 1 [P_A]_1 [PA]1, then use:
e ( [ A ( x ) ] 1 − [ A ( 0 ) ] 1 , [ 1 ] 2 ) = e ( [ P A ( x ) ] 1 , [ x ] 2 ) e([A(x)]_1-[A(0)]_1,[1]_2)=e([P_A(x)]_1,[x]_2) e([A(x)]1[A(0)]1,[1]2)=e([PA(x)]1,[x]2)
Come here.

4.5 cq协议中, B B Bpolynomial low degree testing

Know polynomials for proof B B B

  • First prove the polynomial B B B的degree确实 < m <m <m

Attention, no demand A ( x ) A(x) A(x)'s degree、inherited The maximum degree of support for SRS.

In the KZG commitment scheme, to prove the polynomial B B B的degree确实 < m <m <m, can be determined:
P B ( x ) = B ( x ) − B ( 0 ) x P_B(x)=\frac {B(x)-B(0)}{x} PB(x)=xB(x)B(0)
Then commit [ P B ( x ) ⋅ x N − m + 1 ] 1 [P_B(x)\cdot x^{N-m+1}]_1 [PB(x)xNm+1]1,最后测试:
e ( [ P B ( x ) ] 1 , [ x N − m + 1 ] 2 ) = e ( [ P B ( x ) ⋅ x N − m + 1 ] 1 , [ 1 ] 2 ) e([P_B(x)]_1,[x^{N-m+1}]_2)=e([P_B(x)\cdot x^{N-m+1}]_1,[1]_2) e([PB(x)]1,[xNm+1]2)=e([PB(x)xNm+1]1,[1]2)

Attention, young B ( x ) B(x) B(x)中有degree ≥ m \geq m The items of m will be included in the commitment value [ P B ( x ) ⋅ x N − m + 1 ] 1 [P_B( x)\cdot x^{N-m+1}]_1 [PB(x)xNm+1]1, while SRS does not support degree ≥ N \geq N Commit to items N.

4.6 In the cq protocol, Cached Quotients are used to prove the equation relationship in 4.12)

可通过如下testing:
e ( [ A ( x ) ] 1 , [ T ( x ) ] 2 ) = e ( [ Q A ( x ) ] 1 , [ Z V ( x ) ] 2 ) ⋅ e ( [ m ( x ) ] 1 − β [ A ( x ) ] 1 , [ 1 ] 2 ) e([A(x)]_1,[T(x)]_2)=e([Q_A(x)]_1,[Z_V(x)]_2)\cdot e([m(x)]_1-\beta [A(x)]_1,[1]_2) e([A(x)]1,[T(x)]2)=e([QA(x)]1,[ZV(x)]2)e([m(x)]1β[A(x)]1,[1]2)

To check the relationship of equation 4.12).

in:

  • [ T ] 2 , [ Z V ] 2 , [ 1 ] 2 , [ x ] 2 [T]_2,[Z_V]_2,[1]_2,[x]_2 [T]2,[ZV]2,[1]2,[x]2All are independent of lookups and can be precalculated.
  • Prover需计算: [ A ( x ) ] 1 , [ Q A ( x ) ] 1 , [ m ( x ) ] 1 , A ( 0 ) , [ A ( x ) − A ( 0 ) x ] 1 [A(x)]_1,[Q_A(x)]_1,[m(x)]_1,A(0),[\frac{A(x)-A(0)}{x}]_1 [A(x)]1,[QA(x)]1,[m(x)]1,A(0),[xA(x)A(0)]1
    • The computational complexity of these is O ( m ) O(m) O(m),Because of demand Accounting lookups. Waka t i t_i ti does not exist in lookups, then there are m i = 0 , A i = 0 m_i=0,A_i=0 mi=0,Ai=0
    • Just exists [ Q A ( x ) ] 1 [Q_A(x)]_1 [QA(x)]1计许为 O ( N ) O(N) O(N). Basic solution plan:
      • 预计算cached quotients:
        Q i ( x ) = L i ( x ) ( T ( x ) − t i ) Z V ( x ) = T ( x ) − t i k i ( x − g i ) (4.22) Q_i(x)=\frac{L_i(x)(T(x)-t_i)}{Z_V(x)}=\frac{T(x)-t_i}{k^i(x-g^i)}\tag{4.22} Qi(x)=WITHV(x)Li(x)(T(x)ti)=ki(xgi)T(x)ti(4.22)
        Among them:
        • L i ( x ) L_i(x) Li(x)Lagrange multi-format
        • L i ( x ) = Z V ( x ) k i ( x − g i ) L_i(x)=\frac{Z_V(x)}{k^i(x-g^i)} Li(x)=ki(xgi)WITHV(x)
        • k i = Z V ′ ( g i ) = ( x N − 1 ) ′ ∣ x = g i = N ⋅ g i N − 1 = N g i k^i=Z_V'(g^i)=(x^N-1)'|_{x=g^i}=N\cdot g_i^{N-1}=\frac{N}{g^i} ki=WITHIN(gi)=(xN1)x=gi=NgiN1=giN
        • 使用NTT, Q i ( x ) Q_i(x) Qi(x)'s calculation amount O ( N log ⁡ N ) O(N\log N) O(NlogN)
        • 使用 Q i ( x ) Q_i(x) Qi(x) [ Q A ] 1 [Q_A]_1 [QA]1The calculation amount of is O ( m ) O(m) O(m),有:
          [ Q A ( x ) ] 1 = ∑ A i ≠ 0 A i ⋅ [ Q i ( x ) ] 1 [Q_A(x)]_1=\sum_{A_i\neq 0}A_i\cdot [Q_i(x)]_1 [QA(x)]1=Ai=0Ai[Qi(x)]1
          Inside A i A_i Ai is 4.5) Polynomial in the equation A ( x ) A(x) A(x)的evaluation值。

In 4.7 cq protocol, prove the equation relationship of 4.9) 4.13)

Introduce another random value x = γ x=\gamma x=γ

  • First for the polynomial:
    P F ( x ) = F ( x ) − F ( γ ) x − γ P_F(x)=\frac{F(x)-F( \gamma)}{x-\gamma} PF(x)=xγF(x)F(γ)
    P B , γ ( x ) = P B ( x ) − P B ( γ ) x − γ P_{B,\gamma}(x)=\frac{P_B(x)-P_B(\gamma)}{x-\gamma}PB,γ(x)=xγPB(x)PB(γ)
    Commitment to prove knowledge F ( γ ) , P B ( γ ) F(\gamma),P_B(\gamma) F(γ),PB(γ)
    可通过验证:
    e ( [ F ( x ) ] 1 − [ F ( γ ) ] 1 + γ [ P F ( x ) ] 1 , [ 1 ] 2 ) = e ( [ P F ( x ) ] 1 , [ x ] 2 ) (4.28) e([F(x)]_1-[F(\gamma)]_1+\gamma [P_F(x)]_1,[1]_2)=e([P_F(x)]_1,[x]_2)\tag{4.28} e([F(x)]1[F(γ)]1+γ[PF(x)]1,[1]2)=e([PF(x)]1,[x]2)(4.28)
    e ( [ P B ( x ) ] 1 − [ P B ( γ ) ] 1 + γ [ P B , γ ( x ) ] 1 , [ 1 ] 2 ) = e ( [ P B , γ ( x ) ] 1 , [ x ] 2 ) (4.29) e([P_B(x)]_1-[P_B(\gamma)]_1+\gamma [P_{B,\gamma}(x)]_1,[1]_2)=e([P_{B,\gamma}(x)]_1,[x]_2)\tag{4.29} e([PB(x)]1[PB(γ)]1+γ[PB,γ(x)]1,[1]2)=e([PB,γ(x)]1,[x]2)(4.29)
    come B ( x ) , F ( x ) B(x),F(x) B(x),F(x)确实evaluate到 B ( γ ) , F ( γ ) B(\gamma),F(\gamma) B(γ),F(γ), so you can use these evaluations values ​​to prove the required relationships.
  • Identify:
    Q b , γ = ( B ( γ ) − B ( 0 ) + A ( 0 ) ⋅ N / m ) ( F ( γ ) + β ) − 1 Z H ( γ ) (4.30) Q_{b,\gamma}=\frac{(B(\gamma)-B(0)+A(0)\cdot N/m)(F(\gamma)+\beta )-1}{Z_H(\gamma)}\tag{4.30} Qb,γ=WITHH(γ)(B(γ)B(0)+A(0)N/m)(F(γ)+β)1(4.30)
    P Q B ( x ) = Q B ( x ) − Q b , γ x − γ P_{Q_B}(x)=\frac{Q_B(x)-Q_{b,\gamma}}{x-\gamma} PQB(x)=xγQB(x)Qb,γ
    Then send the commitment value [ Q b , γ ] 1 , [ P Q B ( x ) ] 1 [Q_{b,\gamma}]_1,[P_{Q_B}( x)]_1 [Qb,γ]1,[PQB(x)]1, which can be verified by the following pairing equation:
    e ( [ Q B ( x ) ] 1 − [ Q b , γ ] 1 + γ [ P Q B ( x ) ] 1 , [ 1 ] 2 ) = e ( [ P Q B ( x ) ] 1 , [ x ] 2 ) (4.32) e([Q_B(x)]_1-[Q_{b,\gamma}]_1+\gamma [P_{ Q_B}(x)]_1,[1]_2)=e([P_{Q_B}(x)]_1,[x]_2)\tag{4.32} e([QB(x)]1[Qb,γ]1+γ[PQB(x)]1,[1]2)=e([PQB(x)]1,[x]2)(4.32)
    Note that this construction can simultaneously prove the following statements:
    QB(γ)=WITHH(x)(B(γ))(F(γ)+β)1
    B ( 0 ) ⋅ m = A ( 0 ) ⋅ N B(0)\cdot m=A(0)\cdot N B(0)m=A(0)N
    This ends the entire proof.

4.8 Proof batching of cq protocol

The last three proofs have similar structures, and the cq protocol can batch them into a single protocol - by introducing new random variables η \eta η,and define:
c ( x ) = P B ( x ) + η F ( x ) + η 2 Q B ( x ) c(x)=P_B(x)+\eta F(x)+\eta^2 Q_B(x) c(x)=PB(x)+ηF(x)+the2QB(x)
v = P B ( γ ) + η F ( γ ) + η Q b , γ v=P_B(\gamma)+\eta F(\gamma)+\eta^2 Q_{b,\gamma} in=PB(γ)+ηF(γ)+the2Qb,γ
P γ ( x ) = P B , γ ( x ) + η P F ( x ) + η 2 P Q B ( x ) P_{\gamma}(x)=P_{B,\gamma}(x)+\eta P_F(x )+\eta^2 P_{Q_B}(x)Pγ(x)=PB,γ(x)+ηPF(x)+the2PQB(x)

Then, aggregate 4.28), 4.29), and 4.32) into a single check:
e ( [ c ( x ) ] 1 − [ v ] 1 + γ [ P γ ( x ) ] 1 , [ 1 ] 2 ) = e ( [ P γ ( x ) ] 1 , [ x ] 2 ) e([c(x)]_1-[v]_1+\gamma[P_{\gamma}( x)]_1,[1]_2)=e([P_{\gamma}(x)]_1,[x]_2) e([c(x)]1[v]1+γ[Pγ(x)]1,[1]2)=e([Pγ(x)]1,[x]2)

4.9 cq complete agreement

4.9.1 Setup phase

Both Prover and Verifier have public input t i t_i ti i = 1 , ⋯   , N i=1,\cdots,N i=1,,N. The following process is performed by a trusted party:

  • 1) Select a random value x ∈ F x\in \mathbb{F} xF,输出 { [ x i ] 1 } i = 0 N − 1 \{[x^i]_1\}_{i=0}^{N-1} {[xi]1}i=0N1sum { [ x i ] 2 } i = 0 N \{[x^i]_2\}_{i=0}^{N} {[xi]2}i=0N。数字 x x xrequired.
  • 2) Calculate and output [ Z V ( x ) ] 2 [Z_V(x)]_2 [ZV(x)]2
  • 3)电影 T ( x ) = ∑ i t i L i ( x ) T(x)=\sum_i t_iL_i(x) T(x)=itiLi(x). Calculation out [ T ( x ) ] 2 [T(x)]_2 [T(x)]2
  • 4)对于每个 i = 1 , ⋯ , N i=1,\cdots,N i=1,,N, accounting for export:
    • According to equation 4.22), calculate and output [ Q i ( x ) ] 1 [Q_i(x)]_1 [Qi(x)]1
    • [ L i ( x ) ] 1 [L_i(x)]_1 [Li(x)]1
    • [ L i ( x ) − L i ( 0 ) x ] 1 [\frac{L_i(x)-L_i(0)}{x}]_1 [xLi(x)Li(0)]1

The output of the setup phase forms SRS and is sent to both Prover and Verifier.

4.9.2 Proving stage

Prover obtains private witness value f j f_j fj j = 1 , ⋯   , m j=1,\cdots,m j=1,,m, and what Verifier obtains is the commitment value of these inputs [ F ( x ) ] 1 [F(x)]_1 < /span>[F(x)]1. These inputs need to originate from the same trusted party to reach consensus on the issues to be proven.

The process of the cq protocol proof phase is:
Insert image description here
Note that Verifier is calculated according to the equation 4.30) Q b , γ Q_{b,\gamma} < /span>Qb,γ, its demand B ( γ ) , B ( 0 ) B(\gamma),B(0) B(γ),B(0)Prover . However, Prover has sent it P B ( γ ) = ( B ( γ ) − B ( 0 ) ) / γ P_{B}(\gamma)=(B(\gamma)-B(0 ))/\gamma PB(γ)=(B(γ)B(0))/ Q b , γ = ( P B ( γ ) ⋅ γ + A ( 0 ) ⋅ N / m ) ( F ( γ ) + β ) − 1 Z H ( γ ) Q_{b,\gamma}=\frac{(P_B(\gamma)\cdot \gamma+A(0)\cdot N/m); (F(\gamma)+\beta)-1}{Z_H(\gamma)} ,And then,Verify the solution:γ
Qb,γ=WITHH(γ)(PB(γ)γ+A(0)N/m)(F(γ)+β)1

4.10 cq protocol, further batching and aggregation

Fiat-Shamir transformation can be used to convert the above protocol to non-interactive. At this time, the proof content is:
π c q = { [ m ] 1 , [ A ] 1 , [ Q A ] 1 , [ Q B ] 1 , [ P A ] 1 , [ P B ] 1 , [ P B x N − m + 1 ] 1 , [ P γ ] 1 , P B ( γ ) , F ( γ ) , A ( 0 ) } \pi_{cq}=\{[m]_1,[A]_1, [Q_A]_1,[Q_B]_1,[P_A]_1,[P_B]_1,[P_Bx^{N-m+1}]_1,[P_{\gamma}]_1,P_B(\gamma),F( \gamma),A(0)\} Picq={[m]1,[A]1,[QA]1,[QB]1,[PA]1,[PB]1,[PBxNm+1]1,[Pγ]1,PB(γ),F(γ),A(0)}
Among them:

  • The first 8 are group elements
  • The last three are field elements

The corresponding pairing equation is:
e ( [ P B ( x ) ] 1 , [ x N − m + 1 ] 2 ) = e ( [ P B ( x ) ⋅ x N − m + 1 ] 1 , [ 1 ] 2 ) e([P_B(x)]_1,[x^{N-m+1}]_2)=e([P_B(x)\cdot x^{ N-m+1}]_1,[1]_2) e([PB(x)]1,[xNm+1]2)=e([PB(x)xNm+1]1,[1]2)
e ( [ A ( x ) ] 1 , [ T ( x ) ] 2 ) = e ( [ Q A ( x ) ] 1 , [ Z V ( x ) ] 2 ) ⋅ e ( [ m ( x ) ] 1 − β [ A ( x ) ] 1 , [ 1 ] 2 ) e([A(x)]_1, [T(x)]_2)=e([Q_A(x)]_1,[Z_V(x)]_2)\cdot e([m(x)]_1-\beta[A(x)]_1,[1]_2) e([A(x)]1,[T(x)]2)=e([QA(x)]1,[ZV(x)]2)e([m(x)]1β[A(x)]1,[1]2)
e ( [ A ( x ) ] 1 − [ A ( 0 ) ] 1 , [ 1 ] 2 ) = e ( [ P A ( x ) ] 1 , [ x ] 2 ) e([A(x)]_1-[A(0)]_1,[1]_2)=e([P_A(x)]_1,[x]_2) e([A(x)]1[A(0)]1,[1]2)=e([PA(x)]1,[x]2)
e ( [ c ( x ) ] 1 − [ v ] 1 + γ [ P γ ( x ) ] 1 , [ 1 ] 2 ) = e ( [ P γ ( x ) ] 1 , [ x ] 2 ) e([c(x)]_1-[v]_1+\gamma [P_{\gamma}(x)]_1,[1]_2)=e([P_{\gamma}(x)]_1,[x]_2) e([c(x)]1[v]1+γ[Pγ(x)]1,[1]2)=e([Pγ(x)]1,[x]2)

Introduce new random values μ ∈ F \mu\in \mathbb{F} mF, it is easy to batch the last two pairing equations above as:
e ( [ c ( x ) ] 1 − [ v ] 1 + γ [ P γ ( x ) ] 1 + μ ( [ A ( x ) ] 1 − [ A ( 0 ) ] 1 ) , [ 1 ] 2 ) = e ( [ P γ ( x ) ] 1 + μ [ P A ( x ) ] 1 , [ x ] 2 ) e([c(x)]_1-[v]_1+\gamma [P_{\gamma}(x)]_1+\mu ([A(x)]_1 -[A(0)]_1), [1]_2)=e([P_{\gamma}(x)]_1+\mu [P_A(x)]_1,[x]_2) e([c(x)]1[v]1+γ[Pγ(x)]1+μ([A(x)]1[A(0)]1),[1]2)=e([Pγ(x)]1+μ[PA(x)]1,[x]2)
再引入 ρ ∈ F \rho\in \mathbb{F} rF, in each pairing function batch, is:
e ( [ P γ ( x ) ] 1 + µ [PA(x)]1, [x]2) ⋅ e(ρ[PB(x)]1, [xN − m + 1]2) = e([c(x)]1 − [v] + γ [ P γ ( x ) ] 1 + μ ( [ A ( x ) ] 1 − [ A ( 0 ) ] 1 ) + ρ [ P B ( x ) ⋅ x N − m + 1 ] 1 , ) e([P_{\gamma}(x)]_1+\mu [P_A(x)]_1,[x]_2)\cdot e(\rho[P_B(x)]_1,[x^{N-m +1}]_2)=e([c(x)]_1-[v]_1+\gamma [P_{\gamma}(x)]_1+\mu ([A(x)]_1-[A(0) ]_1)+\rho [P_B(x)\cdot x^{N-m+1}]_1,[1]_2) e([Pγ(x)]1+μ[PA(x)]1,[x]2)e(ρ[PB(x)]1,[xNm+1]2)=e([c(x)]1[v]1+γ[Pγ(x)]1+μ([A(x)]1[A(0)]1)+ρ[PB(x)xNm+1]1,[1]2)

再引入 σ ∈ F \sigma\in\mathbb{F} pF, batch it with the second pairing equation into a single pairing equation. Definition:
L a = [ P γ ( x ) ] 1 + μ [ P A ( x ) ] 1 L_a=[P_{\gamma}(x)]_1+\mu [P_A(x )]_1 La=[Pγ(x)]1+μ[PA(x)]1
L b = ρ [ P B ( x ) ] 1 L_b=\rho [P_B(x)]_1Lb=ρ[PB(x)]1
L c = σ [ A ( x ) ] 1 L_c=\sigma [A(x)]_1 Lc=σ[A(x)]1
L d = − σ [ Q A ( x ) ] 1 L_d=-\sigma [Q_A(x)]_1 Ld=σ[QA(x)]1
R = [c(x)] 1 − [v] 1 + γ [P γ(x)] 1 + μ ([A(x)] 1 − [A(0)] 1) + ρ [PB(x)] ⋅ x N − m + 1 ] 1 + σ ( [ m ( x ) ] 1 − β [ A ( x ) ] 1 ) R=[c(x)]_1-[v]_1+\gamma [P_{\gamma }(x)]_1+\mu([A(x)]_1-[A(0)]_1)+\rho [P_B(x)\cdot x^{N-m+1}]_1+\sigma([ m(x)]_1-\beta[A(x)]_1)R=[c(x)]1[v]1+γ[Pγ(x)]1+μ([A(x)]1[A(0)]1)+ρ[PB(x)xNm+1]1+σ([m(x)]1β[A(x)]1)

The single pairing equation of the final batch is:
e ( L a , [ x ] 2 ) ⋅ e ( L b , [ x N − m + 1 ] 2 ) ⋅ e ( L c , [ T ( x ) ] 2 ) ⋅ e ( L d , [ Z V ( x ) ] 2 ) = e ( R , [ 1 ] 2 ) e(L_a,[x]_2)\cdot e( L_b, [x^{N-m+1}]_2)\cdot e(L_c,[T(x)]_2)\cdot e(L_d,[Z_V(x)]_2)=e(R,[1 ]_2) e(La,[x]2)e(Lb,[xNm+1]2)e(Lc,[T(x)]2)e(Ld,[ZV(x)]2)=e(R,[1]2)

Since the second parameter in each pairing function above only depends on the setup, different proofs with the same setup are introduced by introducing new random parameters χ ∈ F \chi \in\mathbb{F} hF, independent proof:
e ( ∑ k χ k L a , k , [ x ] 2 ) ⋅ e ( ∑ k χ k L b , k , [ x N − m + 1 ] 2 ) ⋅ e ( ∑ k χ k L c , k , [ T ( x ) ] 2 ) ⋅ e ( ∑ k χ k L d , k , [ Z V ( x ) ] 2 ) = e ( ∑ k χ k R k , [ 1 ] 2 ) e(\sum_k\chi ^kL_{a,k},[x]_2)\cdot e(\sum_k\ chi^kL_{b,k},[x^{N-m+1}]_2)\cdot e(\sum_k\chi^kL_{c,k},[T(x)]_2)\cdot e( \sum_kL_{d,k},[Z_V(x)]_2)=e(\sum_kR_k,[1]_2) e(khkLa,k,[x]2)e(khkLb,k,[xNm+1]2)e(khkLc,k,[T(x)]2)e(khkLd,k,[ZV(x)]2)=e(khkRk,[1]2)

4.11 cq protocol overhead

Different from the plookup protocol, the cq protocol is highly dependent on the KZG commitment scheme.

The overhead of the cq protocol is:

  • cq protocol will be plookup protocol O ( N log ⁡ N ) O(N\log N) O(NlogN)The complexity is moved to the setup stage, so that these calculations only need to be done once for the same table.
  • The calculation of the cq protocol proof phase completely relies on m m m, and it can be assumed that m ≪ N m\ll N mN. [In other words, if m ≪ N m\ll N mIf the N condition is not met, there is no reason to use the cq protocol, and the performance of the plookup protocol will be better. 】
  • The workload of cq protocol Prover is O ( m log ⁡ m ) O(m\log m) O(mlogm)
  • The cq protocol proof size and Verifier workload are both constants.

5. Lookup protocol evolution

This section will briefly introduce the improvements from plookup to cq, and review other lookup protocols between the two. Note that these lookup protocols explicitly rely on the KZG commitment scheme.
Insert image description here

5.1 Caulk

Arantxa Zapico et al.’s 2022 paper " Caulk: Lookup arguments in sublinear time" proposed the Caulk protocol.
The core idea behind the Caulk protocol is:

  • (here O ( N log ⁡ N ) O(N\log N) O(NlogN)) 袄计衡表 encoding,用该table searchable in O ( log ⁡ N ) O(\log N) O(logN)
  • lookups also do similar encoding, so that the search complexity is O ( m log ⁡ N ) O(m\log N) O(mlogN), prove that the additional complexity of this encoding is O ( m 2 ) O( m^2) O(m2)

Caulk protocol:

  • Precompute table as vanishing polynomial:
    Z T ( x ) = ∏ i = 1 N ( x − t i ) Z_T(x)=\prod_{i=1}^ {N}(x-t_i) WITHT(x)=i=1N(xti)
  • Calculate lookups similarly as:
    f ( x ) = ∏ j = 1 m ( x − f j ) f(x)=\prod_{j=1}^{m }(x-f_j) f(x)=j=1m(xfj)
  • Prover发送 Z T , f Z_T,f WITHT,The commitment value of f.
  • will prove: for S ⊆ T S\subseteq T ST,有 f = Z S f=Z_S f=WITHS
    Convert to proof: Z T ∖ S ( x ) = Z T ( x ) / Z S ( x ) Z_{T\setminus S}(x)=Z_T(x)/ Z_S(x) WITHTS(x)=WITHT(x)/ZS(x)One piece multi-format.
  • 对于每个 i = 1 , ⋯ N i=1,\cdots N i=1,N,caulk会预计算多项式:
    g i ( x ) = Z T ∖ t i ( x ) g_i(x)=Z_{T\setminus t_i}(x) gi(x)=WITHTti(x)
    In fact, these are cached quotients in the cq protocol.
  • S ⊆ T S\subseteq T ST, then there are certain numbers c j ∈ F c_j\in\mathbb{F} cjF,使得 Z T ∖ S ( x ) Z_{T\setminus S}(x) WITHTS(x)可分解表示为:
    Z T ∖ S ( x ) = ∑ j = 1 m c j g i ( j ) ( x ) Z_{T\setminus S}(x)=\sum_{j=1}^{m}c_jg_{i(j)}(x) WITHTS(x)=j=1mcjgi(j)(x)
    Prover仅需要计算 Z T ∖ S ( x ) Z_{T\setminus S}(x) WITHTS(x)The committed value of the polynomial, and Verifier only needs to use pairing check:
    e ( [ f ] , [ Z T ∖ S ] ) = e ( [ Z T ] , [ 1 ] ) e([f], [Z_{T\setminus S}])=e([ Z_T],[1]) e([f],[ZTS])=e([ZT],[1])

5.2 Caulk+ Protocol

Jim Posen et al. proposed the Caulk+ protocol in the 2022 paper "Caulk+: Table-independent lookup arguments":

  • The main shortcoming of the Caulk protocol is that it treats the table as a universal collection instead of encoding it as a group.
  • Caulk+ protocol: By precomputing the table, the shortcomings in the Caulk protocol are improved.
    • Caulk+ treats the table as a multiplicative group, whose initial value is group generator powers.
    • Thus eliminating the pair N N Ndependent, prove time仅为 O ( m 2 ) O(m^2) O(m2)

5.3 Flookup protocol

Ariel Gabizon et al.’s 2022 paper "flookup: Fractional decompositionbased lookups in quasi-linear time independent of table size" proposed the flookup protocol :

  • increases preprocessing overhead to O ( N log ⁡ 2 N ) O(N\log ^2 N) O(Nlog2N)
  • Reduced Prover runtime to O ( m log ⁡ 2 m ) O(m\log^2 m) O(mlog2m)
  • At the same time, the homomorphic properties of the commitment scheme are sacrificed, so that merging multiple lookups and tables is not supported.

5.4 Baloo Protocol

Arantxa Zapico et al.’s 2022 paper "Baloo: Nearly optimal lookup arguments" proposed the Baloo protocol, which is an optimization of the Caulk+ protocol Edition:

  • Replace lookups with a linear variant.
  • Then use univariate sumcheck to prove the polynomial it promises.
  • The preprocessing overhead is the same as Caulk+, which is O ( N log ⁡ N ) O(N\log N) O(NlogN)
  • The Prover overhead is the same as that of flookup, which is O ( m log ⁡ 2 m ) O(m\log^2 m) O(mlog2m)
  • Since the constants in the Baloo protocol are larger, the actual overhead of the Baloo protocol is slightly higher than that of flipup. However, it retains the homomorphic properties of the commitment scheme, thereby supporting the merging of multiple lookups and tables.

lookup series blog

Guess you like

Origin blog.csdn.net/mutourend/article/details/134793756