本文给 PH23-KZG10 协议加上对 Zero-knowledge 的支持。
1. 如何支持 ZK ¶ 为了让 PH23-KZG10 协议支持 ZK,我们需要修改两个部分的协议,一是要在 KZG10 子协议中支持 Hiding,即在任何一次 Evaluation 证明中,都不会泄漏除了求值之外的信息;二是确保在 PH23 协议中,不会泄漏 Witness 向量,即 a ⃗ \vec{a} a 的信息。
首先我们需要一个 Perfect Hiding KZG10 协议,它可以保证多项式在每一次打开后,都不会泄漏多项式除多项式求值之外的其它信息。下面是 [KT23] 中的的 KZG10 协议,其主要思想来源于 [PST13],[ZGKPP17],与 [XZZPS19]。
Hiding KZG10 ¶ S R S = ( [ 1 ] 1 , [ τ ] 1 , [ τ 2 ] 1 , [ τ 3 ] 1 , … , [ τ D ] 1 , [ γ ] 1 , [ 1 ] 2 , [ τ ] 2 , [ γ ] 2 ) SRS = ([1]_1, [\tau]_1, [\tau^2]_1, [\tau^3]_1, \ldots, [\tau^D]_1, {\color{red}[\gamma]_1}, [1]_2, [\tau]_2, {\color{red}[\gamma]_2}) SRS = ([ 1 ] 1 , [ τ ] 1 , [ τ 2 ] 1 , [ τ 3 ] 1 , … , [ τ D ] 1 , [ γ ] 1 , [ 1 ] 2 , [ τ ] 2 , [ γ ] 2 ) 一个多项式 f ( X ) ∈ F [ X ] f(X)\in\mathbb{F}[X] f ( X ) ∈ F [ X ] 的承诺定义为:
C f = K Z G . C o m m i t ( f ( X ) ; ρ f ) = f 0 ⋅ [ 1 ] 1 + f 1 ⋅ [ τ ] 1 + ⋯ + f d ⋅ [ τ d ] 1 + ρ f ⋅ [ γ ] 1 C_f=\mathsf{KZG.Commit}(f(X);\rho_f) = f_0 \cdot [1]_1 + f_1 \cdot [\tau]_1 + \cdots + f_d \cdot [\tau^d]_1 + {\color{blue}\rho_f} \cdot {\color{red}[\gamma]_1} C f = KZG.Commit ( f ( X ) ; ρ f ) = f 0 ⋅ [ 1 ] 1 + f 1 ⋅ [ τ ] 1 + ⋯ + f d ⋅ [ τ d ] 1 + ρ f ⋅ [ γ ] 1 根据多项式环的性质,f ( X ) f(X) f ( X ) 可以分解为:
f ( X ) = q ( X ) ⋅ ( X − z ) + f ( z ) f(X) = q(X)\cdot(X-z) + f(z) f ( X ) = q ( X ) ⋅ ( X − z ) + f ( z ) 那么商多项式的承诺计算如下,同样需要一个 Blinding Factor ρ q {\color{blue}\rho_q} ρ q 来保护 q ( X ) q(X) q ( X ) 的承诺。
Q = K Z G . C o m m i t ( q ( X ) ; ρ q ) = q 0 ⋅ [ 1 ] 1 + q 1 ⋅ [ τ ] 1 + ⋯ + q d ⋅ [ τ d − 1 ] 1 + ρ q ⋅ [ γ ] 1 = [ q ( τ ) ] 1 + ρ q ⋅ [ γ ] 1 \begin{aligned}
Q = \mathsf{KZG.Commit}(q(X); {\color{blue}\rho_q}) & = q_0 \cdot [1]_1 + q_1 \cdot [\tau]_1 + \cdots + q_d \cdot [\tau^{d-1}]_1 + {\color{blue}\rho_q} \cdot {\color{red}[\gamma]_1} \\
& = [q(\tau)]_1 + {\color{blue}\rho_q}\cdot{\color{red}[\gamma}]_1
\end{aligned} Q = KZG.Commit ( q ( X ) ; ρ q ) = q 0 ⋅ [ 1 ] 1 + q 1 ⋅ [ τ ] 1 + ⋯ + q d ⋅ [ τ d − 1 ] 1 + ρ q ⋅ [ γ ] 1 = [ q ( τ ) ] 1 + ρ q ⋅ [ γ ] 1 同时 Prover 还要计算下面一个额外的 G 1 \mathbb{G}_1 G 1 元素,用来配平验证公式:
E = ρ f ⋅ [ 1 ] 1 − ρ q ⋅ [ τ ] 1 + ( ρ q ⋅ z ) ⋅ [ 1 ] 1 \color{blue}E = \rho_f \cdot [1]_1 - \rho_q \cdot [\tau]_1 + (\rho_q\cdot z)\cdot [1]_1 E = ρ f ⋅ [ 1 ] 1 − ρ q ⋅ [ τ ] 1 + ( ρ q ⋅ z ) ⋅ [ 1 ] 1 那么 Evaluation 证明由两个 G 1 \mathbb{G}_1 G 1 元素组成:
π = ( Q , E ) \pi = (Q, {\color{blue}E}) π = ( Q , E ) 于是,Verifier 可以通过下面的公式来验证:
e ( C f − f ( z ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) = e ( Q , [ τ ] 2 − z ⋅ [ 1 ] 2 ) + e ( E , [ γ ] 2 ) e\Big(C_f - f(z)\cdot[1]_1,\ [1]_2\Big) = e\Big(Q,\ [\tau]_2 - z\cdot[1]_2\Big) + {\color{blue}e\Big(E,\ {\color{red}[\gamma]_2}\Big)} e ( C f − f ( z ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) = e ( Q , [ τ ] 2 − z ⋅ [ 1 ] 2 ) + e ( E , [ γ ] 2 ) 求和证明的 ZK ¶ 在 Prover 采用累加多项式 z ( X ) z(X) z ( X ) 来证明求和值的过程中,也会泄漏 z ⃗ \vec{z} z 向量的信息,其中也包括了 Witness a ⃗ \vec{a} a 的信息。因此,我们需要一个 ZK 版本的求和证明协议。
我们有一个阶为 N N N 的乘法子群 H ⊂ F H\subset\mathbb{F} H ⊂ F :
H = ( 1 , ω , ω 2 , … , ω N − 1 ) H=(1, \omega, \omega^2, \ldots, \omega^{N-1}) H = ( 1 , ω , ω 2 , … , ω N − 1 ) 我们记 { L i ( X ) } i = 0 N − 1 \{L_i(X)\}_{i=0}^{N-1} { L i ( X ) } i = 0 N − 1 关于 H H H 的 Lagrange 多项式, v H ( X ) = X N − 1 v_H(X)=X^N-1 v H ( X ) = X N − 1 是 H H H 上的消失多项式。
假设有一个 N N N 个元素的向量 a ⃗ = ( a 0 , a 1 , … , a N − 1 ) \vec{a}=(a_0, a_1, \ldots, a_{N-1}) a = ( a 0 , a 1 , … , a N − 1 ) ,我们希望证明 ∑ i a i = v \sum_i a_i = v ∑ i a i = v 。Prover 实现计算了 a ⃗ \vec{a} a 的承诺,记为 C a C_a C a 。
C a = K Z G 10. C o m m i t ( a ( X ) ; ρ a ) = [ a ( τ ) ] 1 + ρ a ⋅ [ γ ] 1 C_a = \mathsf{KZG10.Commit}(a(X); {\color{blue}\rho_a}) = [a(\tau)]_1 + {\color{blue}\rho_a\cdot[\gamma]_1} C a = KZG10.Commit ( a ( X ) ; ρ a ) = [ a ( τ ) ] 1 + ρ a ⋅ [ γ ] 1 Round 1 ¶ 首先,我们要确定在 z ( X ) z(X) z ( X ) 会被打开几次,比如,z ( X ) z(X) z ( X ) 会被在 ζ \zeta ζ 和 ω − 1 ⋅ ζ \omega^{-1}\cdot\zeta ω − 1 ⋅ ζ 两处打开。那么我们引入一个随机的多项式:r ( X ) r(X) r ( X ) ,
r ( X ) = r 0 ⋅ L 0 ( X ) + r 1 ⋅ L 1 ( X ) + r 2 ⋅ L 2 ( X ) + r 3 ⋅ L 3 ( X ) r(X) = r_0\cdot L_0(X) + r_1\cdot L_1(X) + r_2\cdot L_2(X) + r_3\cdot L_3(X) r ( X ) = r 0 ⋅ L 0 ( X ) + r 1 ⋅ L 1 ( X ) + r 2 ⋅ L 2 ( X ) + r 3 ⋅ L 3 ( X ) 这个多项式包含四个随机因子。为什么是四个?我们后面会看到。
Prover 然后计算 r ( X ) r(X) r ( X ) 的承诺,并引入一个额外的 Blinding Factor ρ r {\color{blue}\rho_r} ρ r :
C r = K Z G 10. C o m m i t ( r ( X ) ; ρ r ) = [ r ( τ ) ] 1 + ρ r ⋅ [ γ ] 1 C_r = \mathsf{KZG10.Commit}(r(X); {\color{blue}\rho_r}) = [r(\tau)]_1 + {\color{blue}\rho_r\cdot[\gamma]_1} C r = KZG10.Commit ( r ( X ) ; ρ r ) = [ r ( τ ) ] 1 + ρ r ⋅ [ γ ] 1 Prover 计算一个新的求和 ∑ i r i \sum_i r_i ∑ i r i :
v r = r 0 + r 1 + r 2 + r 3 v_r = r_0 + r_1 + r_2 + r_3 v r = r 0 + r 1 + r 2 + r 3 Prover 发送 C r C_r C r 与 v r v_r v r 给 Verifier。
Round 2 ¶ Verifier 发送一个随机挑战数 β ← $ F \beta\leftarrow_{\$}\mathbb{F} β ← $ F 给 Prover。
Prover 构造一个新的多项式 a ′ ( X ) a'(X) a ′ ( X ) ,满足
a ′ ( X ) = a ( X ) + β ⋅ r ( X ) {\color{blue}a'(X) = a(X) + \beta\cdot r(X)} a ′ ( X ) = a ( X ) + β ⋅ r ( X ) Prover 发送给 Verifier一个混合的求和值 v ′ v' v ′ :
v ′ = v r + β ⋅ v {\color{blue}v' = v_r + \beta\cdot v} v ′ = v r + β ⋅ v 这时,Prover 和 Verifier 把求和证明的目标 ∑ i a i = v \sum_i a_i=v ∑ i a i = v 转换成 ∑ i ( a i + β ⋅ r i ) = v + β ⋅ v r \sum_i (a_i + \beta\cdot r_i) = v + \beta\cdot v_r ∑ i ( a i + β ⋅ r i ) = v + β ⋅ v r 。
Round 3 ¶ Verifier 再发送一个随机数 α ← $ F \alpha\leftarrow_{\$}\mathbb{F} α ← $ F 给 Prover。
Prover 构造约束多项式 h 0 ( X ) , h 1 ( X ) , h 2 ( X ) h_0(X), h_1(X), h_2(X) h 0 ( X ) , h 1 ( X ) , h 2 ( X ) ,满足
h 0 ( X ) = L 0 ( X ) ⋅ ( z ( X ) − a ( X ) ) h 1 ( X ) = ( X − 1 ) ⋅ ( z ( X ) − z ( ω − 1 ⋅ X ) − a ( X ) ) h 2 ( X ) = L N − 1 ( X ) ⋅ ( z ( X ) − v ) \begin{split}
h_0(X) &= L_0(X)\cdot\big(z(X) - a(X) \big) \\
h_1(X) &= (X-1)\cdot\big(z(X)-z(\omega^{-1}\cdot X)-a(X)\big) \\
h_2(X) & = L_{N-1}(X)\cdot\big( z(X) - v \big) \\
\end{split} h 0 ( X ) h 1 ( X ) h 2 ( X ) = L 0 ( X ) ⋅ ( z ( X ) − a ( X ) ) = ( X − 1 ) ⋅ ( z ( X ) − z ( ω − 1 ⋅ X ) − a ( X ) ) = L N − 1 ( X ) ⋅ ( z ( X ) − v ) Prover 构造多项式 h ( X ) h(X) h ( X ) ,满足
h ( X ) = h 0 ( X ) + α ⋅ h 1 ( X ) + α 2 ⋅ h 2 ( X ) \begin{split}
h(X) &= h_0(X) + \alpha \cdot h_1(X) + \alpha^2 \cdot h_2(X)
\end{split} h ( X ) = h 0 ( X ) + α ⋅ h 1 ( X ) + α 2 ⋅ h 2 ( X ) Prover 计算商多项式 t ( X ) t(X) t ( X ) ,满足
h ( X ) = t ( X ) ⋅ v H ( X ) h(X) =t(X)\cdot v_H(X) h ( X ) = t ( X ) ⋅ v H ( X ) Prover 计算 z ( X ) z(X) z ( X ) 的承诺 C z C_z C z ,并发送 C z C_z C z
C z = K Z G 10. C o m m i t ( z ( X ) ; ρ z ) = [ z ( τ ) ] 1 + ρ z ⋅ [ γ ] 1 C_z = \mathsf{KZG10.Commit}(z(X); \rho_z) = [z(\tau)]_1 + {\color{blue}\rho_z\cdot[\gamma]_1} C z = KZG10.Commit ( z ( X ) ; ρ z ) = [ z ( τ ) ] 1 + ρ z ⋅ [ γ ] 1 Prover 计算 t ( X ) t(X) t ( X ) 的承诺 C t C_t C t ,并发送 C t C_t C t
C t = K Z G 10. C o m m i t ( t ( X ) ; ρ t ) = [ t ( τ ) ] 1 + ρ t ⋅ [ γ ] 1 C_t = \mathsf{KZG10.Commit}(t(X); \rho_t) = [t(\tau)]_1 + {\color{blue}\rho_t\cdot[\gamma]_1} C t = KZG10.Commit ( t ( X ) ; ρ t ) = [ t ( τ ) ] 1 + ρ t ⋅ [ γ ] 1 Round 4 ¶ Verifier 发送随机求值点 ζ ← $ F \zeta\leftarrow_{\$}\mathbb{F} ζ ← $ F
Prover 构造 商多项式 q a ( X ) q_{a}(X) q a ( X ) , q z ( X ) q_z(X) q z ( X ) , q t ( X ) q_t(X) q t ( X ) 与 q z ′ ( X ) q'_z(X) q z ′ ( X ) , 满足
q a ( X ) = a ′ ( X ) − a ′ ( ζ ) X − ζ q_{a}(X) = \frac{a'(X) - a'(\zeta)}{X-\zeta} q a ( X ) = X − ζ a ′ ( X ) − a ′ ( ζ ) q t ( X ) = t ( X ) − t ( ζ ) X − ζ q_t(X) = \frac{t(X) - t(\zeta)}{X-\zeta} q t ( X ) = X − ζ t ( X ) − t ( ζ ) q z ( X ) = z ( X ) − z ( ζ ) X − ζ q_z(X) = \frac{z(X) - z(\zeta)}{X-\zeta} q z ( X ) = X − ζ z ( X ) − z ( ζ ) q z ′ ( X ) = z ( X ) − z ( ω − 1 ⋅ ζ ) X − ω − 1 ⋅ ζ q'_z(X) = \frac{z(X) - z(\omega^{-1}\cdot\zeta)}{X-\omega^{-1}\cdot\zeta} q z ′ ( X ) = X − ω − 1 ⋅ ζ z ( X ) − z ( ω − 1 ⋅ ζ ) Prover 计算四个商多项式的承诺,并引入相应的 Blinding Factor ρ q a , ρ q z , ρ q t , ρ q z ′ {\color{blue}\rho_{q_a}}, {\color{blue}\rho_{q_z}}, {\color{blue}\rho_{q_t}}, {\color{blue}\rho_{q'_z}} ρ q a , ρ q z , ρ q t , ρ q z ′
Q a = K Z G 10. C o m m i t ( q a ( X ) ; ρ q a ) = [ q a ( τ ) ] 1 + ρ q a ⋅ [ γ ] 1 Q z = K Z G 10. C o m m i t ( q z ( X ) ; ρ q z ) = [ q z ( τ ) ] 1 + ρ q z ⋅ [ γ ] 1 Q t = K Z G 10. C o m m i t ( q t ( X ) ; ρ q t ) = [ q t ( τ ) ] 1 + ρ q t ⋅ [ γ ] 1 Q z ′ = K Z G 10. C o m m i t ( q z ′ ( X ) ; ρ q z ′ ) = [ q z ′ ( τ ) ] 1 + ρ q z ′ ⋅ [ γ ] 1 \begin{split}
Q_{a} &= \mathsf{KZG10.Commit}(q_{a}(X); {\color{blue}\rho_{q_{a}}}) = [q_{a}(\tau)]_1 + {\color{blue}\rho_{q_{a}}\cdot[\gamma]_1} \\
Q_z &= \mathsf{KZG10.Commit}(q_z(X); {\color{blue}\rho_{q_z}}) = [q_z(\tau)]_1 + {\color{blue}\rho_{q_z}\cdot[\gamma]_1} \\
Q_t &= \mathsf{KZG10.Commit}(q_t(X); {\color{blue}\rho_{q_t}}) = [q_t(\tau)]_1 + {\color{blue}\rho_{q_t}\cdot[\gamma]_1} \\
Q'_z &= \mathsf{KZG10.Commit}(q'_z(X); {\color{blue}\rho_{q'_z}}) = [q'_z(\tau)]_1 + {\color{blue}\rho_{q'_z}\cdot[\gamma]_1} \\
\end{split} Q a Q z Q t Q z ′ = KZG10.Commit ( q a ( X ) ; ρ q a ) = [ q a ( τ ) ] 1 + ρ q a ⋅ [ γ ] 1 = KZG10.Commit ( q z ( X ) ; ρ q z ) = [ q z ( τ ) ] 1 + ρ q z ⋅ [ γ ] 1 = KZG10.Commit ( q t ( X ) ; ρ q t ) = [ q t ( τ ) ] 1 + ρ q t ⋅ [ γ ] 1 = KZG10.Commit ( q z ′ ( X ) ; ρ q z ′ ) = [ q z ′ ( τ ) ] 1 + ρ q z ′ ⋅ [ γ ] 1 Prover 还要构造四个相应的 Blinding Factor 的承诺,并发送给 Verifier:
E a = ( ρ a + β ⋅ ρ r ) ⋅ [ 1 ] 1 − ρ q a ⋅ [ τ ] 1 + ( ρ q a ⋅ ζ ) ⋅ [ 1 ] 1 E z = ρ z ⋅ [ 1 ] 1 − ρ q z ⋅ [ τ ] 1 + ( ρ q z ⋅ ζ ) ⋅ [ 1 ] 1 E t = ρ t ⋅ [ 1 ] 1 − ρ q t ⋅ [ τ ] 1 + ( ρ q t ⋅ ζ ) ⋅ [ 1 ] 1 E z ′ = ρ z ⋅ [ 1 ] 1 − ρ q z ′ ⋅ [ τ ] 1 + ( ρ q z ′ ⋅ ω − 1 ⋅ ζ ) ⋅ [ 1 ] 1 \begin{split}
E_a &= (\rho_{a} + \beta\cdot\rho_{r})\cdot[1]_1 - \rho_{q_a}\cdot[\tau]_1 + (\rho_{q_a}\cdot\zeta)\cdot[1]_1 \\
E_z &= \rho_{z}\cdot[1]_1 - \rho_{q_z}\cdot[\tau]_1 + (\rho_{q_z}\cdot\zeta)\cdot[1]_1 \\
E_t &= \rho_{t}\cdot[1]_1 - \rho_{q_t}\cdot[\tau]_1 + (\rho_{q_t}\cdot\zeta)\cdot[1]_1 \\
E'_z &= \rho_{z}\cdot[1]_1 - \rho_{q'_z}\cdot[\tau]_1 + (\rho_{q'_z}\cdot\omega^{-1}\cdot\zeta)\cdot[1]_1 \\
\end{split} E a E z E t E z ′ = ( ρ a + β ⋅ ρ r ) ⋅ [ 1 ] 1 − ρ q a ⋅ [ τ ] 1 + ( ρ q a ⋅ ζ ) ⋅ [ 1 ] 1 = ρ z ⋅ [ 1 ] 1 − ρ q z ⋅ [ τ ] 1 + ( ρ q z ⋅ ζ ) ⋅ [ 1 ] 1 = ρ t ⋅ [ 1 ] 1 − ρ q t ⋅ [ τ ] 1 + ( ρ q t ⋅ ζ ) ⋅ [ 1 ] 1 = ρ z ⋅ [ 1 ] 1 − ρ q z ′ ⋅ [ τ ] 1 + ( ρ q z ′ ⋅ ω − 1 ⋅ ζ ) ⋅ [ 1 ] 1 这里可以看到,在证明过程中,Prover 需要在四个多项式上进行求值,并且这四个多项式的求值都会泄漏 a ⃗ \vec{a} a 的信息,因此 Prover 在 Round 1 增加一个包含两个额外随机因子的随机多项式 r ( X ) r(X) r ( X ) 。这样证明过程中的多项式求值都在 a ′ ( X ) a'(X) a ′ ( X ) 上进行,而非直接对 a ( X ) a(X) a ( X ) 运算求值。
Proof ¶ π = ( C r , v r , C z , C t , a ′ ( ζ ) , z ( ζ ) , t ( ζ ) , z ( ω − 1 ⋅ ζ ) , Q a , Q z , Q t , Q z ′ , E a , E z , E t , E z ′ ) \pi = (C_r, v_r, C_z, C_t, a'(\zeta), z(\zeta), t(\zeta), z(\omega^{-1}\cdot\zeta), Q_a, Q_z, Q_t, Q'_z, E_a, E_z, E_t, E'_z) π = ( C r , v r , C z , C t , a ′ ( ζ ) , z ( ζ ) , t ( ζ ) , z ( ω − 1 ⋅ ζ ) , Q a , Q z , Q t , Q z ′ , E a , E z , E t , E z ′ ) Verification ¶ Verifier 首先验证下面的等式:
h ( ζ ) = t ( ζ ) ⋅ v H ( ζ ) h(\zeta) = t(\zeta)\cdot v_H(\zeta) h ( ζ ) = t ( ζ ) ⋅ v H ( ζ ) 其中 v H ( ζ ) v_H(\zeta) v H ( ζ ) 由 Verifier 计算,h ( ζ ) h(\zeta) h ( ζ ) 由下面的等式计算:
h ( ζ ) = L 0 ( ζ ) ⋅ ( z ( ζ ) − a ′ ( ζ ) ) + α ⋅ ( ζ − 1 ) ⋅ ( z ( ζ ) − z ( ω − 1 ⋅ ζ ) − a ′ ( ζ ) ) + α 2 ⋅ L N − 1 ( ζ ) ⋅ ( z ( ζ ) − ( v r + β ⋅ v ) ) \begin{aligned}
h(\zeta) &= L_0(\zeta)\cdot\big(z(\zeta) - a'(\zeta) \big) \\
&+ \alpha\cdot(\zeta-1)\cdot\big(z(\zeta)-z(\omega^{-1}\cdot\zeta)-a'(\zeta)\big) \\
&+ \alpha^2\cdot L_{N-1}(\zeta)\cdot\big( z(\zeta) - (v_r + \beta\cdot v) \big)
\end{aligned} h ( ζ ) = L 0 ( ζ ) ⋅ ( z ( ζ ) − a ′ ( ζ ) ) + α ⋅ ( ζ − 1 ) ⋅ ( z ( ζ ) − z ( ω − 1 ⋅ ζ ) − a ′ ( ζ ) ) + α 2 ⋅ L N − 1 ( ζ ) ⋅ ( z ( ζ ) − ( v r + β ⋅ v ) ) 然后 Verifier 验证 a ′ ( ζ ) , z ( ζ ) , t ( ζ ) , z ( ω − 1 ⋅ ζ ) a'(\zeta), z(\zeta), t(\zeta), z(\omega^{-1}\cdot\zeta) a ′ ( ζ ) , z ( ζ ) , t ( ζ ) , z ( ω − 1 ⋅ ζ ) 正确性:
e ( C a ′ − a ′ ( ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) = e ( Q a , [ τ ] 2 − ζ ⋅ [ 1 ] 2 ) + e ( E a , [ γ ] 2 ) e ( C z − z ( ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) = e ( Q z , [ τ ] 2 − ζ ⋅ [ 1 ] 2 ) + e ( E z , [ γ ] 2 ) e ( C t − t ( ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) = e ( Q t , [ τ ] 2 − ζ ⋅ [ 1 ] 2 ) + e ( E t , [ γ ] 2 ) e ( C z − ( ω − 1 ⋅ ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) = e ( Q z ′ , [ τ ] 2 − ω − 1 ⋅ ζ ⋅ [ 1 ] 2 ) + e ( E z ′ , [ γ ] 2 ) \begin{aligned}
e\Big(C_{a'} - a'(\zeta)\cdot[1]_1,\ [1]_2\Big) &= e\Big(Q_a,\ [\tau]_2 - \zeta\cdot[1]_2\Big) + e\Big(E_a,\ [\gamma]_2\Big) \\
e\Big(C_z - z(\zeta)\cdot[1]_1,\ [1]_2\Big) &= e\Big(Q_z,\ [\tau]_2 - \zeta\cdot[1]_2\Big) + e\Big(E_z,\ [\gamma]_2\Big) \\
e\Big(C_t - t(\zeta)\cdot[1]_1,\ [1]_2\Big) &= e\Big(Q_t,\ [\tau]_2 - \zeta\cdot[1]_2\Big) + e\Big(E_t,\ [\gamma]_2\Big) \\
e\Big(C_z - (\omega^{-1}\cdot\zeta)\cdot[1]_1,\ [1]_2\Big) &= e\Big(Q'_z,\ [\tau]_2 - \omega^{-1}\cdot\zeta\cdot[1]_2\Big) + e\Big(E'_z,\ [\gamma]_2\Big) \\
\end{aligned} e ( C a ′ − a ′ ( ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) e ( C z − z ( ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) e ( C t − t ( ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) e ( C z − ( ω − 1 ⋅ ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) = e ( Q a , [ τ ] 2 − ζ ⋅ [ 1 ] 2 ) + e ( E a , [ γ ] 2 ) = e ( Q z , [ τ ] 2 − ζ ⋅ [ 1 ] 2 ) + e ( E z , [ γ ] 2 ) = e ( Q t , [ τ ] 2 − ζ ⋅ [ 1 ] 2 ) + e ( E t , [ γ ] 2 ) = e ( Q z ′ , [ τ ] 2 − ω − 1 ⋅ ζ ⋅ [ 1 ] 2 ) + e ( E z ′ , [ γ ] 2 ) 2. ZK-PH23-KZG10 协议(优化版) ¶ 下面是完整的支持 Zero-knowledge 的 PH23-KZG10 协议。
Precomputation ¶ 预计算 s 0 ( X ) , … , s n − 1 ( X ) s_0(X),\ldots, s_{n-1}(X) s 0 ( X ) , … , s n − 1 ( X ) and v H ( X ) v_H(X) v H ( X ) v H ( X ) = X N − 1 v_H(X) = X^N -1 v H ( X ) = X N − 1 s i ( X ) = v H ( X ) v H i ( X ) = X N − 1 X 2 i − 1 s_i(X) = \frac{v_H(X)}{v_{H_i}(X)} = \frac{X^N-1}{X^{2^i}-1} s i ( X ) = v H i ( X ) v H ( X ) = X 2 i − 1 X N − 1 预计算 D = ( 1 , ω , ω 2 , … , ω 2 n − 1 ) D=(1, \omega, \omega^2, \ldots, \omega^{2^{n-1}}) D = ( 1 , ω , ω 2 , … , ω 2 n − 1 ) 上的 Bary-Centric Weights { w ^ i } \{\hat{w}_i\} { w ^ i } 。这个可以加速 w ^ j = ∏ l ≠ j 1 ω 2 j − ω 2 l \hat{w}_j = \prod_{l\neq j} \frac{1}{\omega^{2^j} - \omega^{2^l}} w ^ j = l = j ∏ ω 2 j − ω 2 l 1 预计算 Lagrange Basis 的 KZG10 SRS A 0 = [ L 0 ( τ ) ] 1 , A 1 = [ L 1 ( τ ) ] 1 , A 2 = [ L 2 ( τ ) ] 1 , … , A N − 1 = [ L 2 n − 1 ( τ ) ] 1 A_0 =[L_0(\tau)]_1, A_1= [L_1(\tau)]_1, A_2=[L_2(\tau)]_1, \ldots, A_{N-1} = [L_{2^{n-1}}(\tau)]_1 A 0 = [ L 0 ( τ ) ] 1 , A 1 = [ L 1 ( τ ) ] 1 , A 2 = [ L 2 ( τ ) ] 1 , … , A N − 1 = [ L 2 n − 1 ( τ ) ] 1 Commit 计算过程 ¶ Prover 构造一元多项式 a ( X ) a(X) a ( X ) ,使其 Evaluation form 等于 a ⃗ = ( a 0 , a 1 , … , a N − 1 ) \vec{a}=(a_0, a_1, \ldots, a_{N-1}) a = ( a 0 , a 1 , … , a N − 1 ) ,其中 a i = f ~ ( b i t s ( i ) ) a_i = \tilde{f}(\mathsf{bits}(i)) a i = f ~ ( bits ( i )) , 为 f ~ \tilde{f} f ~ 在 Boolean Hypercube { 0 , 1 } n \{0,1\}^n { 0 , 1 } n 上的取值。 a ( X ) = a 0 ⋅ L 0 ( X ) + a 1 ⋅ L 1 ( X ) + a 2 ⋅ L 2 ( X ) + ⋯ + a N − 1 ⋅ L N − 1 ( X ) a(X) = a_0\cdot L_0(X) + a_1\cdot L_1(X) + a_2\cdot L_2(X)
+ \cdots + a_{N-1}\cdot L_{N-1}(X) a ( X ) = a 0 ⋅ L 0 ( X ) + a 1 ⋅ L 1 ( X ) + a 2 ⋅ L 2 ( X ) + ⋯ + a N − 1 ⋅ L N − 1 ( X ) Prover 抽样一个随机数 ρ a ← $ F \rho_a\leftarrow_{\$}\mathbb{F} ρ a ← $ F ,用来保护 a ⃗ \vec{a} a 的承诺。
Prover 计算 f ^ ( X ) \hat{f}(X) f ^ ( X ) 的承诺 C a C_a C a ,并发送 C a C_a C a
C a = a 0 ⋅ A 0 + a 1 ⋅ A 1 + a 2 ⋅ A 2 + ⋯ + a N − 1 ⋅ A N − 1 + ρ a ⋅ [ γ ] 1 = [ f ^ ( τ ) ] 1 + ρ a ⋅ [ γ ] 1 C_{a} = a_0\cdot A_0 + a_1\cdot A_1 + a_2\cdot A_2 + \cdots + a_{N-1}\cdot A_{N-1} + {\color{blue}\rho_a\cdot[\gamma]_1} = [\hat{f}(\tau)]_1 + {\color{blue}\rho_a\cdot[\gamma]_1} C a = a 0 ⋅ A 0 + a 1 ⋅ A 1 + a 2 ⋅ A 2 + ⋯ + a N − 1 ⋅ A N − 1 + ρ a ⋅ [ γ ] 1 = [ f ^ ( τ ) ] 1 + ρ a ⋅ [ γ ] 1 其中 A 0 = [ L 0 ( τ ) ] 1 , A 1 = [ L 1 ( τ ) ] 1 , A 2 = [ L 2 ( τ ) ] 1 , … , A N − 1 = [ L 2 n − 1 ( τ ) ] 1 A_0 =[L_0(\tau)]_1, A_1= [L_1(\tau)]_1, A_2=[L_2(\tau)]_1, \ldots, A_{N-1} = [L_{2^{n-1}}(\tau)]_1 A 0 = [ L 0 ( τ ) ] 1 , A 1 = [ L 1 ( τ ) ] 1 , A 2 = [ L 2 ( τ ) ] 1 , … , A N − 1 = [ L 2 n − 1 ( τ ) ] 1 ,在预计算过程中已经得到。
Evaluation 证明协议 ¶ C a = [ f ^ ( τ ) ] 1 C_a=[\hat{f}(\tau)]_1 C a = [ f ^ ( τ ) ] 1 : the (uni-variate) commitment of f ~ ( X 0 , X 1 , … , X n − 1 ) \tilde{f}(X_0, X_1, \ldots, X_{n-1}) f ~ ( X 0 , X 1 , … , X n − 1 ) u ⃗ = ( u 0 , u 1 , … , u n − 1 ) \vec{u}=(u_0, u_1, \ldots, u_{n-1}) u = ( u 0 , u 1 , … , u n − 1 ) : 求值点v = f ~ ( u 0 , u 1 , … , u n − 1 ) v=\tilde{f}(u_0,u_1,\ldots, u_{n-1}) v = f ~ ( u 0 , u 1 , … , u n − 1 ) : MLE 多项式 f ~ \tilde{f} f ~ 在 X ⃗ = u ⃗ \vec{X}=\vec{u} X = u 处的运算值。回忆下证明的多项式运算的约束:
f ~ ( u 0 , u 1 , u 2 , … , u n − 1 ) = v \tilde{f}(u_0, u_1, u_2, \ldots, u_{n-1}) = v f ~ ( u 0 , u 1 , u 2 , … , u n − 1 ) = v 这里 u ⃗ = ( u 0 , u 1 , u 2 , … , u n − 1 ) \vec{u}=(u_0, u_1, u_2, \ldots, u_{n-1}) u = ( u 0 , u 1 , u 2 , … , u n − 1 ) 是一个公开的挑战点。
Round 1. ¶ Prover:
计算向量 c ⃗ \vec{c} c ,其中每个元素 c i = e q ∼ ( b i t s ( i ) , u ⃗ ) c_i=\overset{\sim}{eq}(\mathsf{bits}(i), \vec{u}) c i = e q ∼ ( bits ( i ) , u )
构造多项式 c ( X ) c(X) c ( X ) ,其在 H H H 上的运算结果恰好是 c ⃗ \vec{c} c 。
c ( X ) = ∑ i = 0 N − 1 c i ⋅ L i ( X ) c(X) = \sum_{i=0}^{N-1} c_i \cdot L_i(X) c ( X ) = i = 0 ∑ N − 1 c i ⋅ L i ( X ) 计算 c ( X ) c(X) c ( X ) 的承诺 C c = [ c ( τ ) ] 1 C_c= [c(\tau)]_1 C c = [ c ( τ ) ] 1 ,并发送 C c C_c C c C c = K Z G 10. C o m m i t ( c ⃗ ) = [ c ( τ ) ] 1 C_c = \mathsf{KZG10.Commit}(\vec{c}) = [c(\tau)]_1 C c = KZG10.Commit ( c ) = [ c ( τ ) ] 1 构造一个 Blinding 多项式 r ( X ) = r 0 ⋅ L 0 ( X ) + r 1 ⋅ L 1 ( X ) \color{blue}r(X) = r_0\cdot L_0(X) + r_1\cdot L_{1}(X) r ( X ) = r 0 ⋅ L 0 ( X ) + r 1 ⋅ L 1 ( X ) ,其中 { r 0 , r 1 } ← $ F 2 \{r_0, r_1\}\leftarrow_{\$}\mathbb{F}^2 { r 0 , r 1 } ← $ F 2 是随机抽样的 Blinding Factor。
计算 r ( X ) \color{blue}r(X) r ( X ) 的承诺 C r = [ r ( τ ) ] 1 C_r = [\color{blue}r(\tau)]_1 C r = [ r ( τ ) ] 1 ,并发送 C r C_r C r
C r = K Z G 10. C o m m i t ( r ( X ) ; ρ r ) = [ r ( τ ) ] 1 + ρ r ⋅ [ γ ] 1 C_r = \mathsf{KZG10.Commit}({\color{blue}r(X)}; \rho_r) = [\color{blue}r(\tau)]_1 + \rho_r\cdot[\gamma]_1 C r = KZG10.Commit ( r ( X ) ; ρ r ) = [ r ( τ ) ] 1 + ρ r ⋅ [ γ ] 1 计算 v r = ⟨ r ⃗ , c ⃗ ⟩ \color{blue} v_r = \langle \vec{r}, \vec{c}\rangle v r = ⟨ r , c ⟩ ,并发送 v r v_r v r ,其中 r ⃗ \vec{r} r 定义如下: r ⃗ ∈ F N = ( r 0 , r 1 , 0 , ⋯ , 0 ) \vec{r}\in\mathbb{F}^{N} = (r_0, r_1, 0, \cdots, 0) r ∈ F N = ( r 0 , r 1 , 0 , ⋯ , 0 ) Round 2. ¶ Verifier: 发送挑战数 α , β ← $ F p 2 \alpha, {\color{blue}\beta}\leftarrow_{\$}\mathbb{F}^2_p α , β ← $ F p 2
Prover:
构造关于 c ⃗ \vec{c} c 的约束多项式 p 0 ( X ) , … , p n ( X ) p_0(X),\ldots, p_{n}(X) p 0 ( X ) , … , p n ( X ) p 0 ( X ) = s 0 ( X ) ⋅ ( c ( X ) − ( 1 − u 0 ) ( 1 − u 1 ) . . . ( 1 − u n − 1 ) ) p k ( X ) = s k − 1 ( X ) ⋅ ( u n − k ⋅ c ( X ) − ( 1 − u n − k ) ⋅ c ( ω 2 n − k ⋅ X ) ) , k = 1 … n \begin{split}
p_0(X) &= s_0(X) \cdot \Big( c(X) - (1-u_0)(1-u_1)...(1-u_{n-1}) \Big) \\
p_k(X) &= s_{k-1}(X) \cdot \Big( u_{n-k}\cdot c(X) - (1-u_{n-k})\cdot c(\omega^{2^{n-k}}\cdot X)\Big) , \quad k=1\ldots n
\end{split} p 0 ( X ) p k ( X ) = s 0 ( X ) ⋅ ( c ( X ) − ( 1 − u 0 ) ( 1 − u 1 ) ... ( 1 − u n − 1 ) ) = s k − 1 ( X ) ⋅ ( u n − k ⋅ c ( X ) − ( 1 − u n − k ) ⋅ c ( ω 2 n − k ⋅ X ) ) , k = 1 … n 把 { p i ( X ) } \{p_i(X)\} { p i ( X )} 聚合为一个多项式 p ( X ) p(X) p ( X ) p ( X ) = p 0 ( X ) + α ⋅ p 1 ( X ) + α 2 ⋅ p 2 ( X ) + ⋯ + α n ⋅ p n ( X ) p(X) = p_0(X) + \alpha\cdot p_1(X) + \alpha^2\cdot p_2(X) + \cdots + \alpha^{n}\cdot p_{n}(X) p ( X ) = p 0 ( X ) + α ⋅ p 1 ( X ) + α 2 ⋅ p 2 ( X ) + ⋯ + α n ⋅ p n ( X ) 构造 a ′ ( X ) \color{blue}a'(X) a ′ ( X ) ,并计算 ⟨ a ⃗ ′ , c ⃗ ⟩ = v ′ \color{blue}\langle \vec{a}', \vec{c}\rangle=v' ⟨ a ′ , c ⟩ = v ′ a ′ ( X ) = a ( X ) + β ⋅ r ( X ) \color{blue}a'(X) = a(X) + \beta\cdot r(X) a ′ ( X ) = a ( X ) + β ⋅ r ( X ) 构造累加多项式 z ( X ) z(X) z ( X ) ,满足 z ( 1 ) = a 0 ′ ⋅ c 0 z ( ω i ) − z ( ω i − 1 ) = a ′ ( ω i ) ⋅ c ( ω i ) , i = 1 , … , N − 1 z ( ω N − 1 ) = v ′ \begin{split}
z(1) &= {\color{blue}a'_0}\cdot c_0 \\
z(\omega_{i}) - z(\omega_{i-1}) &= {\color{blue}a'(\omega_{i})}\cdot c(\omega_{i}), \quad i=1,\ldots, N-1 \\
z(\omega^{N-1}) &= {\color{blue}v'} \\
\end{split} z ( 1 ) z ( ω i ) − z ( ω i − 1 ) z ( ω N − 1 ) = a 0 ′ ⋅ c 0 = a ′ ( ω i ) ⋅ c ( ω i ) , i = 1 , … , N − 1 = v ′ 构造约束多项式 h 0 ( X ) , h 1 ( X ) , h 2 ( X ) h_0(X), h_1(X), h_2(X) h 0 ( X ) , h 1 ( X ) , h 2 ( X ) ,满足 h 0 ( X ) = L 0 ( X ) ⋅ ( z ( X ) − c 0 ⋅ a ′ ( X ) ) h 1 ( X ) = ( X − 1 ) ⋅ ( z ( X ) − z ( ω − 1 ⋅ X ) − a ′ ( X ) ⋅ c ( X ) ) h 2 ( X ) = L N − 1 ( X ) ⋅ ( z ( X ) − v ′ ) \begin{split}
h_0(X) &= L_0(X)\cdot\big(z(X) - c_0\cdot {\color{blue}a'(X)} \big) \\
h_1(X) &= (X-1)\cdot\big(z(X)-z(\omega^{-1}\cdot X)- {\color{blue}a'(X)}\cdot c(X)) \\
h_2(X) & = L_{N-1}(X)\cdot\big( z(X) - {\color{blue}v'} \big) \\
\end{split} h 0 ( X ) h 1 ( X ) h 2 ( X ) = L 0 ( X ) ⋅ ( z ( X ) − c 0 ⋅ a ′ ( X ) ) = ( X − 1 ) ⋅ ( z ( X ) − z ( ω − 1 ⋅ X ) − a ′ ( X ) ⋅ c ( X )) = L N − 1 ( X ) ⋅ ( z ( X ) − v ′ ) 把 p ( X ) p(X) p ( X ) 和 h 0 ( X ) , h 1 ( X ) , h 2 ( X ) h_0(X), h_1(X), h_2(X) h 0 ( X ) , h 1 ( X ) , h 2 ( X ) 聚合为一个多项式 h ( X ) h(X) h ( X ) ,满足 h ( X ) = p ( X ) + α n + 1 ⋅ h 0 ( X ) + α n + 2 ⋅ h 1 ( X ) + α n + 3 ⋅ h 2 ( X ) \begin{split}
h(X) &= p(X) + \alpha^{n+1} \cdot h_0(X) + \alpha^{n+2} \cdot h_1(X) + \alpha^{n+3} \cdot h_2(X)
\end{split} h ( X ) = p ( X ) + α n + 1 ⋅ h 0 ( X ) + α n + 2 ⋅ h 1 ( X ) + α n + 3 ⋅ h 2 ( X ) 计算 Quotient 多项式 t ( X ) t(X) t ( X ) ,满足 h ( X ) = t ( X ) ⋅ v H ( X ) h(X) =t(X)\cdot v_H(X) h ( X ) = t ( X ) ⋅ v H ( X ) 抽样 ρ t , ρ z ← $ F p 2 \rho_t, \rho_z\leftarrow_{\$}\mathbb{F}^2_p ρ t , ρ z ← $ F p 2 ,计算 C t = [ t ( τ ) ] 1 + ρ t ⋅ [ γ ] 1 C_t=[t(\tau)]_1+{\color{blue}\rho_t\cdot[\gamma]_1} C t = [ t ( τ ) ] 1 + ρ t ⋅ [ γ ] 1 , C z = [ z ( τ ) ] 1 + ρ z ⋅ [ γ ] 1 C_z=[z(\tau)]_1+{\color{blue}\rho_z\cdot[\gamma]_1} C z = [ z ( τ ) ] 1 + ρ z ⋅ [ γ ] 1 ,并发送 C t C_t C t 和 C z C_z C z C t = K Z G 10. C o m m i t ( t ( X ) ; ρ t ) = [ t ( τ ) ] 1 + ρ t ⋅ [ γ ] 1 C z = K Z G 10. C o m m i t ( z ( X ) ; ρ z ) = [ z ( τ ) ] 1 + ρ z ⋅ [ γ ] 1 \begin{split}
C_t &= \mathsf{KZG10.Commit}(t(X); {\color{blue}\rho_t}) = [t(\tau)]_1 + {\color{blue}\rho_t\cdot[\gamma]_1} \\
C_z &= \mathsf{KZG10.Commit}(z(X); {\color{blue}\rho_z}) = [z(\tau)]_1 + {\color{blue}\rho_z\cdot[\gamma]_1}
\end{split} C t C z = KZG10.Commit ( t ( X ) ; ρ t ) = [ t ( τ ) ] 1 + ρ t ⋅ [ γ ] 1 = KZG10.Commit ( z ( X ) ; ρ z ) = [ z ( τ ) ] 1 + ρ z ⋅ [ γ ] 1 Round 3. ¶ Verifier: 发送随机求值点 ζ ← $ F \zeta\leftarrow_{\$}\mathbb{F} ζ ← $ F
Prover:
计算 s i ( X ) s_i(X) s i ( X ) 在 ζ \zeta ζ 处的取值: s 0 ( ζ ) , s 1 ( ζ ) , … , s n − 1 ( ζ ) s_0(\zeta), s_1(\zeta), \ldots, s_{n-1}(\zeta) s 0 ( ζ ) , s 1 ( ζ ) , … , s n − 1 ( ζ ) 这里 Prover 可以快速计算 s i ( ζ ) s_i(\zeta) s i ( ζ ) ,由 s i ( X ) s_i(X) s i ( X ) 的公式得
s i ( ζ ) = ζ N − 1 ζ 2 i − 1 = ( ζ N − 1 ) ( ζ 2 i + 1 ) ( ζ 2 i − 1 ) ( ζ 2 i + 1 ) = ζ N − 1 ζ 2 i + 1 − 1 ⋅ ( ζ 2 i + 1 ) = s i + 1 ( ζ ) ⋅ ( ζ 2 i + 1 ) \begin{aligned}
s_i(\zeta) & = \frac{\zeta^N - 1}{\zeta^{2^i} - 1} \\
& = \frac{(\zeta^N - 1)(\zeta^{2^i} +1)}{(\zeta^{2^i} - 1)(\zeta^{2^i} +1)} \\
& = \frac{\zeta^N - 1}{\zeta^{2^{i + 1}} - 1} \cdot (\zeta^{2^i} +1) \\
& = s_{i + 1}(\zeta) \cdot (\zeta^{2^i} +1)
\end{aligned} s i ( ζ ) = ζ 2 i − 1 ζ N − 1 = ( ζ 2 i − 1 ) ( ζ 2 i + 1 ) ( ζ N − 1 ) ( ζ 2 i + 1 ) = ζ 2 i + 1 − 1 ζ N − 1 ⋅ ( ζ 2 i + 1 ) = s i + 1 ( ζ ) ⋅ ( ζ 2 i + 1 ) 因此 s i ( ζ ) s_i(\zeta) s i ( ζ ) 的值可以通过 s i + 1 ( ζ ) s_{i + 1}(\zeta) s i + 1 ( ζ ) 计算得到,而
s n − 1 ( ζ ) = ζ N − 1 ζ 2 n − 1 − 1 = ζ 2 n − 1 + 1 s_{n-1}(\zeta) = \frac{\zeta^N - 1}{\zeta^{2^{n-1}} - 1} = \zeta^{2^{n-1}} + 1 s n − 1 ( ζ ) = ζ 2 n − 1 − 1 ζ N − 1 = ζ 2 n − 1 + 1 因此可以得到一个 O ( n ) O(n) O ( n ) 的算法来计算 s i ( ζ ) s_i(\zeta) s i ( ζ ) ,并且这里不含除法运算。计算过程是:s n − 1 ( ζ ) → s n − 2 ( ζ ) → ⋯ → s 0 ( ζ ) s_{n-1}(\zeta) \rightarrow s_{n-2}(\zeta) \rightarrow \cdots \rightarrow s_0(\zeta) s n − 1 ( ζ ) → s n − 2 ( ζ ) → ⋯ → s 0 ( ζ ) 。
定义求值 Domain D ′ D' D ′ , 包含 n + 1 n+1 n + 1 个元素: D ′ = D ζ = { ζ , ω ζ , ω 2 ζ , ω 4 ζ , … , ω 2 n − 1 ζ } D'=D\zeta = \{\zeta, \omega\zeta, \omega^2\zeta,\omega^4\zeta, \ldots, \omega^{2^{n-1}}\zeta\} D ′ = D ζ = { ζ , ω ζ , ω 2 ζ , ω 4 ζ , … , ω 2 n − 1 ζ } 计算并发送 c ( X ) c(X) c ( X ) 在 D ′ D' D ′ 上的取值 c ( ζ ) , c ( ζ ⋅ ω ) , c ( ζ ⋅ ω 2 ) , c ( ζ ⋅ ω 4 ) , … , c ( ζ ⋅ ω 2 n − 1 ) c(\zeta), c(\zeta\cdot\omega), c(\zeta\cdot\omega^2), c(\zeta\cdot\omega^4), \ldots, c(\zeta\cdot\omega^{2^{n-1}}) c ( ζ ) , c ( ζ ⋅ ω ) , c ( ζ ⋅ ω 2 ) , c ( ζ ⋅ ω 4 ) , … , c ( ζ ⋅ ω 2 n − 1 ) 计算并发送 z ( ω − 1 ⋅ ζ ) z(\omega^{-1}\cdot\zeta) z ( ω − 1 ⋅ ζ )
计算 Linearized Polynomial l ζ ( X ) l_\zeta(X) l ζ ( X )
l ζ ( X ) = ( s 0 ( ζ ) ⋅ ( c ( ζ ) − c 0 ) + α ⋅ s 0 ( ζ ) ⋅ ( u n − 1 ⋅ c ( ζ ) − ( 1 − u n − 1 ) ⋅ c ( ω 2 n − 1 ⋅ ζ ) ) + α 2 ⋅ s 1 ( ζ ) ⋅ ( u n − 2 ⋅ c ( ζ ) − ( 1 − u n − 2 ) ⋅ c ( ω 2 n − 2 ⋅ ζ ) ) + ⋯ + α n − 1 ⋅ s n − 2 ( ζ ) ⋅ ( u 1 ⋅ c ( ζ ) − ( 1 − u 1 ) ⋅ c ( ω 2 ⋅ ζ ) ) + α n ⋅ s n − 1 ( ζ ) ⋅ ( u 0 ⋅ c ( ζ ) − ( 1 − u 0 ) ⋅ c ( ω ⋅ ζ ) ) + α n + 1 ⋅ ( L 0 ( ζ ) ⋅ ( z ( X ) − c 0 ⋅ a ′ ( X ) ) + α n + 2 ⋅ ( ζ − 1 ) ⋅ ( z ( X ) − z ( ω − 1 ⋅ ζ ) − c ( ζ ) ⋅ a ′ ( X ) ) + α n + 3 ⋅ L N − 1 ( ζ ) ⋅ ( z ( X ) − v ′ ) − v H ( ζ ) ⋅ t ( X ) ) \begin{split}
l_\zeta(X) =& \Big(s_0(\zeta) \cdot (c(\zeta) - c_0) \\
& + \alpha\cdot s_0(\zeta) \cdot (u_{n-1}\cdot c(\zeta) - (1-u_{n-1})\cdot c(\omega^{2^{n-1}}\cdot\zeta))\\
& + \alpha^2\cdot s_1(\zeta) \cdot (u_{n-2}\cdot c(\zeta) - (1-u_{n-2})\cdot c(\omega^{2^{n-2}}\cdot\zeta)) \\
& + \cdots \\
& + \alpha^{n-1}\cdot s_{n-2}(\zeta)\cdot (u_{1}\cdot c(\zeta) - (1-u_{1})\cdot c(\omega^2\cdot\zeta))\\
& + \alpha^n\cdot s_{n-1}(\zeta)\cdot (u_{0}\cdot c(\zeta) - (1-u_{0})\cdot c(\omega\cdot\zeta)) \\
& + \alpha^{n+1}\cdot (L_0(\zeta)\cdot\big(z(X) - c_0\cdot {\color{blue}a'(X)})\\
& + \alpha^{n+2}\cdot (\zeta - 1)\cdot\big(z(X)-z(\omega^{-1}\cdot\zeta)-c(\zeta)\cdot {\color{blue}a'(X)} ) \\
& + \alpha^{n+3}\cdot L_{N-1}(\zeta)\cdot(z(X) - {\color{blue}v'}) \\
& - v_H(\zeta)\cdot t(X)\ \Big)
\end{split} l ζ ( X ) = ( s 0 ( ζ ) ⋅ ( c ( ζ ) − c 0 ) + α ⋅ s 0 ( ζ ) ⋅ ( u n − 1 ⋅ c ( ζ ) − ( 1 − u n − 1 ) ⋅ c ( ω 2 n − 1 ⋅ ζ )) + α 2 ⋅ s 1 ( ζ ) ⋅ ( u n − 2 ⋅ c ( ζ ) − ( 1 − u n − 2 ) ⋅ c ( ω 2 n − 2 ⋅ ζ )) + ⋯ + α n − 1 ⋅ s n − 2 ( ζ ) ⋅ ( u 1 ⋅ c ( ζ ) − ( 1 − u 1 ) ⋅ c ( ω 2 ⋅ ζ )) + α n ⋅ s n − 1 ( ζ ) ⋅ ( u 0 ⋅ c ( ζ ) − ( 1 − u 0 ) ⋅ c ( ω ⋅ ζ )) + α n + 1 ⋅ ( L 0 ( ζ ) ⋅ ( z ( X ) − c 0 ⋅ a ′ ( X ) ) + α n + 2 ⋅ ( ζ − 1 ) ⋅ ( z ( X ) − z ( ω − 1 ⋅ ζ ) − c ( ζ ) ⋅ a ′ ( X ) ) + α n + 3 ⋅ L N − 1 ( ζ ) ⋅ ( z ( X ) − v ′ ) − v H ( ζ ) ⋅ t ( X ) ) 显然,r ζ ( ζ ) = 0 r_\zeta(\zeta)= 0 r ζ ( ζ ) = 0 ,因此这个运算值不需要发给 Verifier,并且 [ r ζ ( τ ) ] 1 [r_\zeta(\tau)]_1 [ r ζ ( τ ) ] 1 可以由 Verifier 自行构造。
构造多项式 c ∗ ( X ) c^*(X) c ∗ ( X ) ,它是下面向量在 D ζ D\zeta D ζ 上的插值多项式 α n + 1 L 0 ( ζ ) ( ρ z − c 0 ⋅ ρ a ) + α n + 2 ( ζ − 1 ) ( ρ z − c ( ζ ) ⋅ ρ a ) + α n + 3 L N − 1 ( ζ ) ⋅ ρ z − v H ( ζ ) ⋅ ρ t \alpha^{n+1}L_0(\zeta)(\rho_z - c_0\cdot\rho_a) \\
+\alpha^{n+2}(\zeta-1)(\rho_z - c(\zeta)\cdot\rho_a) \\
+ \alpha^{n+3}L_{N-1}(\zeta)\cdot \rho_z \\
- v_H(\zeta)\cdot\rho_t α n + 1 L 0 ( ζ ) ( ρ z − c 0 ⋅ ρ a ) + α n + 2 ( ζ − 1 ) ( ρ z − c ( ζ ) ⋅ ρ a ) + α n + 3 L N − 1 ( ζ ) ⋅ ρ z − v H ( ζ ) ⋅ ρ t c ∗ ⃗ = ( c ( ω ⋅ ζ ) , c ( ω 2 ⋅ ζ ) , c ( ω 4 ⋅ ζ ) , … , c ( ω 2 n − 1 ⋅ ζ ) , c ( ζ ) ) \vec{c^*}= \Big(c(\omega\cdot\zeta), c(\omega^2\cdot\zeta), c(\omega^4\cdot\zeta), \ldots, c(\omega^{2^{n-1}}\cdot\zeta), c(\zeta)\Big) c ∗ = ( c ( ω ⋅ ζ ) , c ( ω 2 ⋅ ζ ) , c ( ω 4 ⋅ ζ ) , … , c ( ω 2 n − 1 ⋅ ζ ) , c ( ζ ) ) Prover 可以利用事先预计算的 D D D 上的Bary-Centric Weights { w ^ i } \{\hat{w}_i\} { w ^ i } 来快速计算 c ∗ ( X ) c^*(X) c ∗ ( X ) ,
c ∗ ( X ) = c 0 ∗ ⋅ w ^ 0 X − ω ζ + c 1 ∗ ⋅ w ^ 1 X − ω 2 ζ + ⋯ + c n ∗ ⋅ w ^ n X − ω 2 n ζ w ^ 0 X − ω ζ + w ^ 1 X − ω 2 ζ + ⋯ + w ^ n X − ω 2 n ζ c^*(X) = \frac{c^*_0 \cdot \frac{\hat{w}_0}{X-\omega\zeta} + c^*_1 \cdot \frac{\hat{w}_1}{X-\omega^{2}\zeta} + \cdots + c^*_n \cdot \frac{\hat{w}_n}{X-\omega^{2^n}\zeta}}{
\frac{\hat{w}_0}{X-\omega\zeta} + \frac{\hat{w}_1}{X-\omega^2\zeta} + \cdots + \frac{\hat{w}_n}{X-\omega^{2^n}\zeta}
} c ∗ ( X ) = X − ω ζ w ^ 0 + X − ω 2 ζ w ^ 1 + ⋯ + X − ω 2 n ζ w ^ n c 0 ∗ ⋅ X − ω ζ w ^ 0 + c 1 ∗ ⋅ X − ω 2 ζ w ^ 1 + ⋯ + c n ∗ ⋅ X − ω 2 n ζ w ^ n 这里 w ^ j \hat{w}_j w ^ j 为预计算的值:
w ^ j = ∏ l ≠ j 1 ω 2 j − ω 2 l \hat{w}_j = \prod_{l\neq j} \frac{1}{\omega^{2^j} - \omega^{2^l}} w ^ j = l = j ∏ ω 2 j − ω 2 l 1 因为 l ζ ( ζ ) = 0 l_\zeta(\zeta)= 0 l ζ ( ζ ) = 0 ,所以存在 Quotient 多项式 q ζ ( X ) q_\zeta(X) q ζ ( X ) 满足 q ζ ( X ) = 1 X − ζ ⋅ l ζ ( X ) q_\zeta(X) = \frac{1}{X-\zeta}\cdot l_\zeta(X) q ζ ( X ) = X − ζ 1 ⋅ l ζ ( X ) 计算 q ζ ( X ) q_\zeta(X) q ζ ( X ) 的承诺 Q ζ Q_\zeta Q ζ ,并同时抽样一个随机数 ρ q ← $ F {\color{blue}\rho_q}\leftarrow_{\$}\mathbb{F} ρ q ← $ F 作为承诺的 Blinding Factor: Q ζ = K Z G 10. C o m m i t ( q ζ ( X ) ; ρ q ) = [ q ζ ( τ ) ] 1 + ρ q ⋅ [ γ ] 1 Q_\zeta = \mathsf{KZG10.Commit}(q_\zeta(X); {\color{blue}\rho_q}) = [q_\zeta(\tau)]_1 + {\color{blue}\rho_q\cdot[\gamma]_1} Q ζ = KZG10.Commit ( q ζ ( X ) ; ρ q ) = [ q ζ ( τ ) ] 1 + ρ q ⋅ [ γ ] 1 E ζ = ( α n + 1 L 0 ( ζ ) ( ρ z − c 0 ⋅ ( ρ a + β ⋅ ρ r ) ) + α n + 2 ( ζ − 1 ) ( ρ z − c ( ζ ) ⋅ ( ρ a + β ⋅ ρ r ) ) + α n + 3 L N − 1 ( ζ ) ⋅ ρ z − v H ( ζ ) ⋅ ρ t ) ⋅ [ 1 ] 1 − ρ q ⋅ [ τ ] 1 + ( ζ ⋅ ρ q ) ⋅ [ 1 ] 1 {\color{blue}
\begin{split}
E_\zeta &= \big(\alpha^{n+1}L_0(\zeta)(\rho_z - c_0\cdot(\rho_a + \beta\cdot\rho_r)) \\
& \quad +\alpha^{n+2}(\zeta-1)(\rho_z - c(\zeta)\cdot(\rho_a + \beta\cdot\rho_r)) \\
& \quad + \alpha^{n+3}L_{N-1}(\zeta)\cdot \rho_z - v_H(\zeta)\cdot\rho_t\big)\cdot [1]_1 \\
&- \rho_q\cdot[\tau]_1 + (\zeta\cdot\rho_q)\cdot[1]_1 \\
\end{split}} E ζ = ( α n + 1 L 0 ( ζ ) ( ρ z − c 0 ⋅ ( ρ a + β ⋅ ρ r )) + α n + 2 ( ζ − 1 ) ( ρ z − c ( ζ ) ⋅ ( ρ a + β ⋅ ρ r )) + α n + 3 L N − 1 ( ζ ) ⋅ ρ z − v H ( ζ ) ⋅ ρ t ) ⋅ [ 1 ] 1 − ρ q ⋅ [ τ ] 1 + ( ζ ⋅ ρ q ) ⋅ [ 1 ] 1 构造 D ζ D\zeta D ζ 上的消失多项式 z D ζ ( X ) z_{D_{\zeta}}(X) z D ζ ( X ) z D ζ ( X ) = ( X − ζ ω ) ⋯ ( X − ζ ω 2 n − 1 ) ( X − ζ ) z_{D_{\zeta}}(X) = (X-\zeta\omega)\cdots (X-\zeta\omega^{2^{n-1}})(X-\zeta) z D ζ ( X ) = ( X − ζ ω ) ⋯ ( X − ζ ω 2 n − 1 ) ( X − ζ ) 构造 Quotient 多项式 q c ( X ) q_c(X) q c ( X ) : q c ( X ) = ( c ( X ) − c ∗ ( X ) ) ( X − ζ ) ( X − ω ζ ) ( X − ω 2 ζ ) ⋯ ( X − ω 2 n − 1 ζ ) q_c(X) = \frac{(c(X) - c^*(X))}{(X-\zeta)(X-\omega\zeta)(X-\omega^2\zeta)\cdots(X-\omega^{2^{n-1}}\zeta)} q c ( X ) = ( X − ζ ) ( X − ω ζ ) ( X − ω 2 ζ ) ⋯ ( X − ω 2 n − 1 ζ ) ( c ( X ) − c ∗ ( X )) 计算 q c ( X ) q_c(X) q c ( X ) 的承诺 Q c Q_c Q c 与 E c E_c E c ,由于 c ( X ) c(X) c ( X ) 中不含有任何私有信息,所以不需要添加 Blinding Factor: Q c = K Z G 10. C o m m i t ( q c ( X ) ) = [ q c ( τ ) ] 1 Q_c = \mathsf{KZG10.Commit}(q_c(X)) = [q_c(\tau)]_1 Q c = KZG10.Commit ( q c ( X )) = [ q c ( τ ) ] 1 构造 Quotient 多项式 q ω ζ ( X ) q_{\omega\zeta}(X) q ω ζ ( X ) ,用来证明 z ( X ) z(X) z ( X ) 在 ω − 1 ⋅ ζ \omega^{-1}\cdot\zeta ω − 1 ⋅ ζ 处的取值: q ω ζ ( X ) = z ( X ) − z ( ω − 1 ⋅ ζ ) X − ω − 1 ⋅ ζ q_{\omega\zeta}(X) = \frac{z(X) - z(\omega^{-1}\cdot\zeta)}{X - \omega^{-1}\cdot\zeta} q ω ζ ( X ) = X − ω − 1 ⋅ ζ z ( X ) − z ( ω − 1 ⋅ ζ ) 计算 q ω ζ ( X ) q_{\omega\zeta}(X) q ω ζ ( X ) 的承诺 Q ω ζ Q_{\omega\zeta} Q ω ζ ,并同时抽样一个随机数 ρ q ′ ← $ F {\color{blue}\rho_{q}'}\leftarrow_{\$}\mathbb{F} ρ q ′ ← $ F 作为承诺的 Blinding Factor: Q ω ζ = K Z G 10. C o m m i t ( q ω ζ ( X ) ; ρ q ′ ) = [ q ω ζ ( τ ) ] 1 + ρ q ′ ⋅ [ γ ] 1 Q_{\omega\zeta} = \mathsf{KZG10.Commit}(q_{\omega\zeta}(X); {\color{blue}\rho_{q}'}) = [q_{\omega\zeta}(\tau)]_1 + {\color{blue}\rho_{q}'\cdot[\gamma]_1} Q ω ζ = KZG10.Commit ( q ω ζ ( X ) ; ρ q ′ ) = [ q ω ζ ( τ ) ] 1 + ρ q ′ ⋅ [ γ ] 1 E ω ζ = ρ z ⋅ [ 1 ] 1 − ρ q ′ ⋅ [ τ ] 1 + ( ω − 1 ⋅ ζ ⋅ ρ q ′ ) ⋅ [ 1 ] 1 {\color{blue}E_{\omega\zeta} = \rho_z\cdot[1]_1 - \rho_{q}'\cdot[\tau]_1 + (\omega^{-1}\cdot\zeta\cdot\rho_{q}')\cdot[1]_1} E ω ζ = ρ z ⋅ [ 1 ] 1 − ρ q ′ ⋅ [ τ ] 1 + ( ω − 1 ⋅ ζ ⋅ ρ q ′ ) ⋅ [ 1 ] 1 发送 ( Q c , Q ζ , E ζ , Q ω ζ , E ω ζ ) \big(Q_c, Q_\zeta, {\color{blue}E_\zeta}, Q_{\omega\zeta}, {\color{blue}E_{\omega\zeta}} \big) ( Q c , Q ζ , E ζ , Q ω ζ , E ω ζ ) Round 4. ¶ Verifier 发送第二个随机挑战点 ξ ← $ F \xi\leftarrow_{\$}\mathbb{F} ξ ← $ F
Prover 构造第三个 Quotient 多项式 q ξ ( X ) q_\xi(X) q ξ ( X )
q ξ ( X ) = c ( X ) − c ∗ ( ξ ) − z D ζ ( ξ ) ⋅ q c ( X ) X − ξ q_\xi(X) = \frac{c(X) - c^*(\xi) - z_{D_\zeta}(\xi)\cdot q_c(X)}{X-\xi} q ξ ( X ) = X − ξ c ( X ) − c ∗ ( ξ ) − z D ζ ( ξ ) ⋅ q c ( X ) Prover 计算并发送 q ξ ( X ) q_\xi(X) q ξ ( X ) 的承诺 Q ξ Q_\xi Q ξ
Q ξ = K Z G 10. C o m m i t ( q ξ ( X ) ) = [ q ξ ( τ ) ] 1 Q_\xi = \mathsf{KZG10.Commit}(q_\xi(X)) = [q_\xi(\tau)]_1 Q ξ = KZG10.Commit ( q ξ ( X )) = [ q ξ ( τ ) ] 1 证明表示 ¶ 9 ⋅ G 1 9\cdot\mathbb{G}_1 9 ⋅ G 1 , ( n + 1 ) ⋅ F (n+1)\cdot\mathbb{F} ( n + 1 ) ⋅ F
π e v a l = ( z ( ω − 1 ⋅ ζ ) , c ( ζ ) , c ( ω ⋅ ζ ) , c ( ω 2 ⋅ ζ ) , c ( ω 4 ⋅ ζ ) , … , c ( ω 2 n − 1 ⋅ ζ ) , C c , C t , C z , Q c , Q ζ , E ζ , Q ξ , Q ω ζ , E ω ζ ) \begin{split}
\pi_{eval} &= \big(z(\omega^{-1}\cdot\zeta), c(\zeta), c(\omega\cdot\zeta), c(\omega^2\cdot\zeta), c(\omega^4\cdot\zeta), \ldots, c(\omega^{2^{n-1}}\cdot\zeta), \\
& C_{c}, C_{t}, C_{z}, Q_c, Q_\zeta, {\color{blue}E_\zeta}, Q_\xi, Q_{\omega\zeta}, {\color{blue}E_{\omega\zeta}}\big)
\end{split} π e v a l = ( z ( ω − 1 ⋅ ζ ) , c ( ζ ) , c ( ω ⋅ ζ ) , c ( ω 2 ⋅ ζ ) , c ( ω 4 ⋅ ζ ) , … , c ( ω 2 n − 1 ⋅ ζ ) , C c , C t , C z , Q c , Q ζ , E ζ , Q ξ , Q ω ζ , E ω ζ ) 验证过程 ¶ Verifier 计算 C a ′ \color{blue}C'_a C a ′ 与 v ′ \color{blue} v' v ′
C a ′ = C a + β ⋅ C b \color{blue}C'_a = C_a + \beta \cdot C_b C a ′ = C a + β ⋅ C b v ′ = v + β ⋅ v b \color{blue} v' = v + \beta \cdot v_b v ′ = v + β ⋅ v b Verifier 计算 c ∗ ( ξ ) c^*(\xi) c ∗ ( ξ ) 使用预计算的 Barycentric Weights { w ^ i } \{\hat{w}_i\} { w ^ i }
c ∗ ( ξ ) = ∑ i c i w i ξ − x i ∑ i w i ξ − x i c^*(\xi)=\frac{\sum_i c_i\frac{w_i}{\xi-x_i}}{\sum_i \frac{w_i}{\xi-x_i}} c ∗ ( ξ ) = ∑ i ξ − x i w i ∑ i c i ξ − x i w i Verifier 计算 v H ( ζ ) , L 0 ( ζ ) , L N − 1 ( ζ ) v_H(\zeta), L_0(\zeta), L_{N-1}(\zeta) v H ( ζ ) , L 0 ( ζ ) , L N − 1 ( ζ )
v H ( ζ ) = ζ N − 1 v_H(\zeta) = \zeta^N - 1 v H ( ζ ) = ζ N − 1 L 0 ( ζ ) = 1 N ⋅ z H ( ζ ) ζ − 1 L_0(\zeta) = \frac{1}{N}\cdot \frac{z_{H}(\zeta)}{\zeta-1} L 0 ( ζ ) = N 1 ⋅ ζ − 1 z H ( ζ ) L N − 1 ( ζ ) = ω N − 1 N ⋅ z H ( ζ ) ζ − ω N − 1 L_{N-1}(\zeta) = \frac{\omega^{N-1}}{N}\cdot \frac{z_{H}(\zeta)}{\zeta-\omega^{N-1}} L N − 1 ( ζ ) = N ω N − 1 ⋅ ζ − ω N − 1 z H ( ζ ) Verifier 计算 s 0 ( ζ ) , … , s n − 1 ( ζ ) s_0(\zeta), \ldots, s_{n-1}(\zeta) s 0 ( ζ ) , … , s n − 1 ( ζ ) ,其计算方法可以采用前文提到的递推方式进行计算。
Verifier 计算线性化多项式的承诺 C l C_l C l
C l = ( ( c ( ζ ) − c 0 ) s 0 ( ζ ) + α ⋅ ( u n − 1 ⋅ c ( ζ ) − ( 1 − u n − 1 ) ⋅ c ( ω 2 n − 1 ⋅ ζ ) ) ⋅ s 0 ( ζ ) + α 2 ⋅ ( u n − 2 ⋅ c ( ζ ) − ( 1 − u n − 2 ) ⋅ c ( ω 2 n − 2 ⋅ ζ ) ) ⋅ s 1 ( ζ ) + ⋯ + α n − 1 ⋅ ( u 1 ⋅ c ( ζ ) − ( 1 − u 1 ) ⋅ c ( ω 2 ⋅ ζ ) ) ⋅ s n − 2 ( ζ ) + α n ⋅ ( u 0 ⋅ c ( ζ ) − ( 1 − u 0 ) ⋅ c ( ω ⋅ ζ ) ) ⋅ s n − 1 ( ζ ) + α n + 1 ⋅ L 0 ( ζ ) ⋅ ( C z − c 0 ⋅ C a ) + α n + 2 ⋅ ( ζ − 1 ) ⋅ ( C z − z ( ω − 1 ⋅ ζ ) − c ( ζ ) ⋅ C a ) + α n + 3 ⋅ L N − 1 ( ζ ) ⋅ ( C z − v ′ ) − v H ( ζ ) ⋅ C t ) \begin{split}
C_l & =
\Big( (c(\zeta) - c_0)s_0(\zeta) \\
& + \alpha \cdot (u_{n-1}\cdot c(\zeta) - (1-u_{n-1})\cdot c(\omega^{2^{n-1}}\cdot\zeta))\cdot s_0(\zeta)\\
& + \alpha^2\cdot (u_{n-2}\cdot c(\zeta) - (1-u_{n-2})\cdot c(\omega^{2^{n-2}}\cdot\zeta))\cdot s_1(\zeta) \\
& + \cdots \\
& + \alpha^{n-1}\cdot (u_{1}\cdot c(\zeta) - (1-u_{1})\cdot c(\omega^2\cdot\zeta))\cdot s_{n-2}(\zeta)\\
& + \alpha^n\cdot (u_{0}\cdot c(\zeta) - (1-u_{0})\cdot c(\omega\cdot\zeta))\cdot s_{n-1}(\zeta) \\
& + \alpha^{n+1}\cdot L_0(\zeta)\cdot(C_z - c_0\cdot C_a)\\
& + \alpha^{n+2}\cdot (\zeta-1)\cdot\big(C_z - z(\omega^{-1}\cdot \zeta)-c(\zeta)\cdot C_{a} ) \\
& + \alpha^{n+3}\cdot L_{N-1}(\zeta)\cdot(C_z - {\color{blue}v'}) \\
& - v_H(\zeta)\cdot C_t \Big)
\end{split} C l = ( ( c ( ζ ) − c 0 ) s 0 ( ζ ) + α ⋅ ( u n − 1 ⋅ c ( ζ ) − ( 1 − u n − 1 ) ⋅ c ( ω 2 n − 1 ⋅ ζ )) ⋅ s 0 ( ζ ) + α 2 ⋅ ( u n − 2 ⋅ c ( ζ ) − ( 1 − u n − 2 ) ⋅ c ( ω 2 n − 2 ⋅ ζ )) ⋅ s 1 ( ζ ) + ⋯ + α n − 1 ⋅ ( u 1 ⋅ c ( ζ ) − ( 1 − u 1 ) ⋅ c ( ω 2 ⋅ ζ )) ⋅ s n − 2 ( ζ ) + α n ⋅ ( u 0 ⋅ c ( ζ ) − ( 1 − u 0 ) ⋅ c ( ω ⋅ ζ )) ⋅ s n − 1 ( ζ ) + α n + 1 ⋅ L 0 ( ζ ) ⋅ ( C z − c 0 ⋅ C a ) + α n + 2 ⋅ ( ζ − 1 ) ⋅ ( C z − z ( ω − 1 ⋅ ζ ) − c ( ζ ) ⋅ C a ) + α n + 3 ⋅ L N − 1 ( ζ ) ⋅ ( C z − v ′ ) − v H ( ζ ) ⋅ C t ) Verifier 产生随机数 η \eta η 来合并下面的 Pairing 验证:
e ( C l + ζ ⋅ Q ζ , [ 1 ] 2 ) = ? e ( Q ζ , [ τ ] 2 ) + e ( E ζ , [ γ ] 2 ) e ( C − C ∗ ( ξ ) − z D ζ ( ξ ) ⋅ Q c + ξ ⋅ Q ξ , [ 1 ] 2 ) = ? e ( Q ξ , [ τ ] 2 ) e ( Z + ζ ⋅ Q ω ζ − z ( ω − 1 ⋅ ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) = ? e ( Q ω ζ , [ τ ] 2 ) + e ( E ω ζ , [ γ ] 2 ) \begin{aligned}
e(C_l + \zeta\cdot Q_\zeta, [1]_2) & \overset{?}{=} e(Q_\zeta, [\tau]_2) + {\color{blue}e(E_\zeta, [\gamma]_2)}\\
e(C - C^*(\xi) - z_{D_\zeta}(\xi)\cdot Q_c + \xi\cdot Q_\xi, [1]_2) & \overset{?}{=} e(Q_\xi, [\tau]_2)\\
e(Z + \zeta\cdot Q_{\omega\zeta} - z(\omega^{-1}\cdot\zeta)\cdot[1]_1, [1]_2) &\overset{?}{=} e(Q_{\omega\zeta}, [\tau]_2) + {\color{blue}e(E_{\omega\zeta}, [\gamma]_2)}\\
\end{aligned} e ( C l + ζ ⋅ Q ζ , [ 1 ] 2 ) e ( C − C ∗ ( ξ ) − z D ζ ( ξ ) ⋅ Q c + ξ ⋅ Q ξ , [ 1 ] 2 ) e ( Z + ζ ⋅ Q ω ζ − z ( ω − 1 ⋅ ζ ) ⋅ [ 1 ] 1 , [ 1 ] 2 ) = ? e ( Q ζ , [ τ ] 2 ) + e ( E ζ , [ γ ] 2 ) = ? e ( Q ξ , [ τ ] 2 ) = ? e ( Q ω ζ , [ τ ] 2 ) + e ( E ω ζ , [ γ ] 2 ) 合并后的验证只需要两个 Pairing 运算:
P = ( C l + ζ ⋅ Q ζ ) + η ⋅ ( C − C ∗ − z D ζ ( ξ ) ⋅ Q c + ξ ⋅ Q ξ ) + η 2 ⋅ ( C z + ζ ⋅ Q ω ζ − z ( ω − 1 ⋅ ζ ) ⋅ [ 1 ] 1 ) \begin{aligned}
P &= \Big(C_l + \zeta\cdot Q_\zeta\Big) \\
&+ \eta\cdot \Big(C - C^* - z_{D_\zeta}(\xi)\cdot Q_c + \xi\cdot Q_\xi\Big) \\
&+ \eta^2\cdot\Big(C_z + \zeta\cdot Q_{\omega\zeta} - z(\omega^{-1}\cdot\zeta)\cdot[1]_1\Big)
\end{aligned} P = ( C l + ζ ⋅ Q ζ ) + η ⋅ ( C − C ∗ − z D ζ ( ξ ) ⋅ Q c + ξ ⋅ Q ξ ) + η 2 ⋅ ( C z + ζ ⋅ Q ω ζ − z ( ω − 1 ⋅ ζ ) ⋅ [ 1 ] 1 ) e ( P , [ 1 ] 2 ) = ? e ( Q ζ + η ⋅ Q ξ + η 2 ⋅ Q ω ζ , [ τ ] 2 ) + e ( E ζ + η 2 ⋅ E ω ζ , [ γ ] 2 ) e\Big(P, [1]_2\Big) \overset{?}{=} e\Big(Q_\zeta + \eta\cdot Q_\xi + \eta^2\cdot Q_{\omega\zeta}, [\tau]_2\Big) + {\color{blue}e\Big(E_\zeta + \eta^2\cdot E_{\omega\zeta}, [\gamma]_2\Big)} e ( P , [ 1 ] 2 ) = ? e ( Q ζ + η ⋅ Q ξ + η 2 ⋅ Q ω ζ , [ τ ] 2 ) + e ( E ζ + η 2 ⋅ E ω ζ , [ γ ] 2 ) 3. 优化性能分析 ¶ Proof size: 9 G 1 + ( n + 1 ) F 9~\mathbb{G}_1 + (n+1)~\mathbb{F} 9 G 1 + ( n + 1 ) F
Verifier: 4 F + O ( n ) F + 3 G 1 + 2 P 4~\mathbb{F} + O(n)~\mathbb{F}+ 3~\mathbb{G}_1 + 2~P 4 F + O ( n ) F + 3 G 1 + 2 P
References ¶ [BDFG20] Dan Boneh, Justin Drake, Ben Fisch, and Ariel Gabizon. “Efficient polynomial commitment schemes for multiple points and polynomials”. Cryptology {ePrint} Archive, Paper 2020/081. https:// eprint .iacr .org /2020 /081 . [KZG10] Kate, Aniket, Gregory M. Zaverucha, and Ian Goldberg. “Constant-size commitments to polynomials and their applications.” Advances in Cryptology-ASIACRYPT 2010: 16th International Conference on the Theory and Application of Cryptology and Information Security, Singapore, December 5-9, 2010. Proceedings 16. Springer Berlin Heidelberg, 2010. [KT23] Kohrita, Tohru, and Patrick Towa. “Zeromorph: Zero-knowledge multilinear-evaluation proofs from homomorphic univariate commitments.” Cryptology ePrint Archive (2023). https:// eprint .iacr .org /2023 /917 [PST13] Papamanthou, Charalampos, Elaine Shi, and Roberto Tamassia. “Signatures of correct computation.” Theory of Cryptography Conference. Berlin, Heidelberg: Springer Berlin Heidelberg, 2013. https:// eprint .iacr .org /2011 /587 [ZGKPP17] “A Zero-Knowledge Version of vSQL.” Cryptology ePrint Archive (2023). https:// eprint .iacr .org /2017 /1146 [XZZPS19] Tiancheng Xie, Jiaheng Zhang, Yupeng Zhang, Charalampos Papamanthou, and Dawn Song. “Libra: Succinct Zero-Knowledge Proofs with Optimal Prover Computation.” https:// eprint .iacr .org /2019 /317 [CHMMVW19] Alessandro Chiesa, Yuncong Hu, Mary Maller, Pratyush Mishra, Psi Vesely, and Nicholas Ward. “Marlin: Preprocessing zkSNARKs with Universal and Updatable SRS.” https:// eprint .iacr .org /2019 /1047