Compressed sigma-Protocol Theory and Practical Application to Plug & Play Secure Algorithmics学习笔记

1. 引言

Thomas Attema等人2020年论文《Compressed sigma-Protocol Theory and Practical Application to Plug & Play Secure Algorithmics》发表于CRYPTO 2020。


要点:
1)其实就是inner product argument,针对的场景为 < a ⃗ , b ⃗ > = c <\vec{a},\vec{b}>=c <a ,b >=c,其中 a ⃗ \vec{a} a 为private info, b ⃗ , c \vec{b},c b ,c为public info。只是将 b ⃗ \vec{b} b 表述为了linear form L L L
2)借助了 ∑ \sum -protocol思想来实现inner product argument,其中:
(a) Π 0 \Pi_0 Π0为zero knowledge basic 版本;
(b) Π 0 A m \Pi_0^{Am} Π0Am 为same linear form different commitments(即相同的 b ⃗ \vec{b} b ,不同的 a ⃗ \vec{a} a )的batch 版本,相比于 Π 0 \Pi_0 Π0 communication cost一样;
(c)基于discrete logarithmic assumption,借鉴Bulletproof思想构建的压缩版 Π c \Pi_c Πc
(d) Π N U L L I T Y \Pi_{NULLITY} ΠNULLITY为different linear forms same commitment(即相同的 a ⃗ \vec{a} a ,不同的 b ⃗ \vec{b} b ,均满足 L i ( a ⃗ ) = 0 L_i(\vec{a})=0 Li(a )=0)的batch版本;
(e)Opening Affine maps 针对的是different linear forms different commitments(即不同的 a ⃗ \vec{a} a b ⃗ \vec{b} b )的batch 版本;
(f)当Prover没有commit to all input and auxiliary data at once时,分为两种极端场景:一种是将所有的input commit为一个commitment,基于此种情形构建的协议为 Π s h e l l \Pi_{shell} Πshell;一种是将每个input commit为一个commitment,基于此种情形构建的协议为 Π P \Pi_{P} ΠP。其中的auxiliary data为blinding factor;
(g)不同于quadratic span programs等思想,本文基于双重linear form构建了circuit ZK protocol Π c s \Pi_{cs} Πcs
(h)基于 Π N U L L I T Y \Pi_{NULLITY} ΠNULLITY实现了range proof和aggregated range proof。
(i)安全假设:所有协议可由DL assumption 迁移至Strong-RSA assumption或KEA等。
3)注意,amortized Π 0 A m \Pi_0^{Am} Π0Am允许Prover open one linear form on many compact commitments efficiently;而amortized nullity check Π N U L L I T Y \Pi_{NULLITY} ΠNULLITY 允许Prover open many linear forms on one compact commitments efficiently。
Π 0 A m \Pi_0^{Am} Π0Am Π N U L L I T Y \Pi_{NULLITY} ΠNULLITY协议结合基本就足够了。除非要求Prover open linear forms “intended” for one particular commitment on other commitments,这将导致cross-terms泄露,为了避免这种隐私泄露,需要mask these cross-terms appropriately。
4)使用Pedersen vector commitment scheme的一个主要缺陷是所需generators的数量与vector dimension成正比。如需commit to an n n n-dimensional vector,则需要 n + 1 n+1 n+1 generators of the group G \mathbb{G} G。同时,对于compressed ∑ \sum -protocol Π c \Pi_c Πc,其verification time与dimension n n n呈正比。【因此设计了5.3.1和5.3.2场景,可减少generator数量的需求。】
而基于RSA assumption的integer commitment scheme,其仅需要2个generator g , h g,h g,h 即可实现vector commitment。


主要关注3种类型的assumption:

  • Discrete Logarithm assumption:Bulletproofs中是基于Discrete Logarithm assumption构建的。
  • Strong-RSA assumption:《Transparent snarks from DARK compilers》可看成是基于Strong-RSA assumption下对Bulletproofs进行改进实现的polynomial commitment。
  • Knowledge-of-Exponent assumption,known to be unfalsifiable,目前仍有争议的安全假设。KEA假设的主要优势是可将communication complexity由logarithmic reduce为constant,即与committed vector的dimension无关。

本文主要介绍基于Discrete Logarithm assumption的 ∑ \sum -protocol,Strong-RSA assumption可采用类似方式构建。

根据Bootle等人2020年论文《 A non-pcp approach to succinct quantum-safe zero-knowledge》中的思想,本文的压缩版 ∑ \sum -protocol可基于lattice assumption来实例化。而在该论文中指出,基于lattice构建的零知识证明算法通常存在soundness slack that is further increased by the compression。

1.1 核心的 ∑ \sum -Protocol

basic ∑ \sum -Protocol Π 0 \Pi_0 Π0

  • public info: commitment P P P,arbitrary public linear form L L L y y y
  • private info:secret vector x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn
  • relation: P = C o m ( x ⃗ ) ∧ y = L ( x ⃗ ) P=Com(\vec{x})\wedge y=L(\vec{x}) P=Com(x )y=L(x )

basic ∑ \sum -Protocol Π 0 \Pi_0 Π0 证明过程为:

  • Prover:选择secret random vector r ⃗ \vec{r} r ,计算commitment A = C o m ( r ⃗ ) A=Com(\vec{r}) A=Com(r ) y ′ = L ( r ⃗ ) y'=L(\vec{r}) y=L(r )
    A , y ′ A,y' A,y发送给Verifier。
  • Verifier:发送random challenge c ∈ Z q c\in\mathbb{Z}_q cZq 给Prover。
  • Prover:计算 z ⃗ = c x ⃗ + r ⃗ \vec{z}=c\vec{x}+\vec{r} z =cx +r
    将vector z ⃗ \vec{z} z 发送给Verifier。
  • Verifier:验证 C o m ( z ⃗ ) = A P c Com(\vec{z})=AP^c Com(z )=APc以及 L ( z ⃗ ) = c y + y ′ L(\vec{z})=cy+y' L(z )=cy+y是否成立即可。

以上basic ∑ \sum -Protocol Π 0 \Pi_0 Π0的communication cost主要为 z ⃗ \vec{z} z ——the opening of A P c AP^c APc,其communication complexity为 O ( n ) O(n) O(n),其中 n n n为vector length。

本文在basic ∑ \sum -Protocol Π 0 \Pi_0 Π0 的基础上实现了amortized版本 Π 0 A m \Pi_0^{Am} Π0Am,针对的场景为:

  • public info: commitments P 1 , ⋯   , P s P_1,\cdots, P_s P1,,Ps,arbitrary public linear form L L L y 1 , ⋯   , y s y_1,\cdots,y_s y1,,ys
  • private info:secret vector x ⃗ 1 , ⋯   , x ⃗ s ∈ Z q n \vec{x}_1,\cdots,\vec{x}_s\in\mathbb{Z}_q^n x 1,,x sZqn
  • relation: P 1 = C o m ( x ⃗ 1 ) ∧ ⋯ ∧ P s = C o m ( x ⃗ s ) ∧ y 1 = L ( x ⃗ 1 ) ∧ ⋯ ∧ y s = L ( x ⃗ s ) P_1=Com(\vec{x}_1)\wedge \cdots\wedge P_s=Com(\vec{x}_s) \wedge y_1=L(\vec{x}_1)\wedge \cdots \wedge y_s=L(\vec{x}_s) P1=Com(x 1)Ps=Com(x s)y1=L(x 1)ys=L(x s)

借助Bulletproofs思想,可将basic ∑ \sum -Protocol Π 0 \Pi_0 Π0 的communication cost压缩为 O ( log ⁡ n ) O(\log n) O(logn),Prover与Verifier之间的交互次数也增加为了 O ( log ⁡ n ) O(\log n) O(logn)。技术上来说,这种压缩将degrade the soundness from unconditional to computational, and protocols with computational soundness称为argument of knowledge。(注意Bulletproofs方案不具有zero knowledge,最终prover会reveal z z z。)

本文考虑的是针对amortized版本 Π 0 A m \Pi_0^{Am} Π0Am的压缩。与Bulletproofs方案不同,不再发送整个vector z ⃗ \vec{z} z ,改为证明Prover知道相应的 z ⃗ \vec{z} z ,使得 C o m ( z ⃗ ) = A P c Com(\vec{z})=AP^c Com(z )=APc成立。

通常需要在交互次数和communication cost之间做权衡,如constant number of rounds对应 O ( n ) O(\sqrt{n}) O(n ) communication cost,而增加交互次数为 O ( log ⁡ n ) O(\log n) O(logn),可降低communication cost为 O ( log ⁡ n ) O(\log n) O(logn)。交互次数可通过Fiat-Shamir转换为non-interactive,此时 O ( log ⁡ n ) O(\log n) O(logn) communication cost 方案可能更优。

在Ronald Cramer 1997年论文《Modular Design of Secure yet Practical Cryptographic Protocols》中指出, ∑ \sum -protocol 中的special soundness是指 knowledge soundness with knowledge error 1 / q 1/q 1/q,其中 q q q为the size of the challenge set。
压缩技术本质上将降低knowledge extractor的运行效率,也因此在Bulletproofs论文中未计算the extractor efficiency and knowledge errors。详细看参见2018年论文《Special Soundness Revisited》和2019年论文《qesa Efficient zero-knowledge arguments in the discrete log setting》 中对extractor efficiency 和 knowledge errors之间的讨论。

本文致力于在压缩的同时,实现unconditional soundness,而不是computational soundness,代价是将communication cost增加了2倍。

1.2 Compactifying a Vector of Commitments

本文所实现的压缩版的 ∑ \sum -protocol Π c \Pi_{c} Πc 可看成是:
压缩commitments to long secret vectors,允许高效的partial openings,如arbitrary linear forms applied to the secret committed vector。后续也可用于证明任意的(nonlinear)relation。所有的Prover私有数据(如secret data vector + secret auxiliary data, such as random coins)都需要 be committed to in a single compact commitment。

实际应用场景中,通常认为Prover的私有数据commitment是先生成的,而后才有相应的zero knowledge protocol运行。
本文主要考虑2种极端场景:
1)Prover对secret data vector仅有单一compact commitment。
2)Prover对secret data vector有单一compact commitment的同时,还有其中的每个元素相应的commitment。
本文会基于以上两种场景来实现plug&play 零知识证明。
1)针对场景一:

  • Prover使用新的generators来commit to the auxiliary information;
  • Prover使用压缩版 ∑ \sum -protocol Π c \Pi_c Πc,来证明 this is indeed a commitment that exclusively involves the new generators;
  • Prover和Verifier将这两个compact commitments相乘来获取 a single compact commitment to all relevant data。

2)针对场景二:

  • Prover使用basic (amortized) ∑ \sum -protocol Π 0 \Pi_0 Π0 ( Π 0 A m \Pi_0^{Am} Π0Am) 来证明其知道 openings to all individual commitments。
    基于该基础协议构建了新的 ∑ \sum -protocol:
    a)Prover在基础协议种的第一个消息 A A A 之后附加a compact commitment containing all relevant data and the randomness sampled in the first move of the basic ∑ \sum -protocol。
    b)Verifier发送challenge c c c
    c)Prover计算a public linear form (parameterized by the challenge c c c) evaluated at the vector to which the prover committed。
    与basic协议不同,Prover不直接发送该值,而改为:Prover 和 Verifier run the interactive protocol to open the associated linear form on the compact vector commitment。
    Verifier验证the opening of the vector commitment is also an opening of the commitment in the ∑ \sum -protocol。
    最终,Prover可证明其知道 openings to all individual commitments and that these openings are contained in the compact commitment together with the auxiliary data。

1.3 基于压缩版 ∑ \sum -protocol Π c \Pi_c Πc实现的plug-and-play secure algorithmics

  • Ronald Cramer等人2012年论文 [CDP12]《On the amortized complexity of zero knowledge protocols for multiplicative relations》:
    考虑的是单个element of Z q \mathbb{Z}_q Zq 的homomorphic commitment scheme,而不是a vector of large length。该论文的主要研究成果是实现了 ∑ \sum -protocol,用于证明 the correctness of commitments to m m m multiplication triples ( α i , β i , γ i = α i β i \alpha_i,\beta_i,\gamma_i=\alpha_i\beta_i αi,βi,γi=αiβi),具有low amortized complexity for large m m m。换句话说,该协议可验证乘法关系,且对每个乘法门的验证开销相对较低。
    其中的每个 α i , β i , γ i \alpha_i,\beta_i,\gamma_i αi,βi,γi都被单独committed,其解决方案是使用了strongly-multiplicative packed-secret sharing。如,考虑Shamir’s scheme over Z q \mathbb{Z}_q Zq,with privacy parameter t = 1 t=1 t=1, but with secret-space dimension m m m,使用random polynomials of degree ≤ m \leq m m,subject to the evaluations on the points 1 , ⋯   , m 1,\cdots, m 1,,m comprising the secret vector。注意,for each sharing,a single random Z q \mathbb{Z}_q Zq-element is required (which can be taken as the evaluation at 0)。
    需要重点留意的是,已知secret vector和random element时,根据Lagrange插值定理,对polynomial f ( X ) f(X) f(X) c ∈ Z q c\in\mathbb{Z}_q cZq 的evaluation f ( c ) f(c) f(c)是 some public Z q \mathbb{Z}_q Zq-linear combination over the coordinates of the secret vector and the random element。也就是说已知 m + 1 m+1 m+1个evaluations on the points 0 , ⋯   , m 0,\cdots,m 0,,m,就可以确定唯一的多项式 f ( X ) f(X) f(X) of degree ≤ m \leq m m。相应的transformation matrix不是Vandermonde-matrix,但是可以唯一确定 f ( X ) f(X) f(X)

假设 2 m < q 2m<q 2m<q (for strong-multiplicativity),整个协议运行流程为:
1) α i , β i , γ i \alpha_i,\beta_i,\gamma_i αi,βi,γi的commitments值为common input。
2)Prover选择random polynomial f ( X ) f(X) f(X) 来定义a packed secret sharing of the vector ( α 1 , ⋯   , α m ) (\alpha_1,\cdots,\alpha_m) (α1,,αm);选择random polynomial g ( X ) g(X) g(X)来定义a packed secret sharing of the vector ( β 1 , ⋯   , β m ) (\beta_1,\cdots,\beta_m) (β1,,βm)。最终,Prover计算多项式乘积 h ( X ) = f ( X ) g ( X ) h(X)=f(X)g(X) h(X)=f(X)g(X) of degree ≤ 2 m < q \leq 2m< q 2m<q
3)Prover commit to the random Z q \mathbb{Z}_q Zq-element for the sharing based on f ( X ) f(X) f(X),如 f ( 0 ) f(0) f(0)。同时,Prover还commit the evaluations of h ( X ) h(X) h(X) on the points 0 , m + 1 , ⋯   , 2 m 0,m+1,\cdots,2m 0,m+1,,2m。注意其中故意缺失了commitments to evaluations at 1 , ⋯   , m 1,\cdots,m 1,,m,因为相应的evaluations其实就是 γ 1 , ⋯   , γ m \gamma_1,\cdots,\gamma_m γ1,,γm,而这些commitments值已经在common input中包含了,没必要重复commit。
Prover将这些commitment值发送给Verifier。
4)Verifier选择除 1 , ⋯   , m 1,\cdots,m 1,,m之外的random challenge c ∈ Z q c\in\mathbb{Z}_q cZq发送给Prover。
5)Prover和Verifier同时计算3个commitments:
5.1) commitment to u = f ( c ) u=f(c) u=f(c)
5.2) commitment to v = g ( c ) v=g(c) v=g(c)
5.3) commitment to w = h ( c ) w=h(c) w=h(c)
6)Prover opens u , v , w u,v,w u,v,w
7)Verifier验证 w = u v w=uv w=uv是否成立。
根据commitment scheme的binding属性,若the committed polynomials不满足 f ( X ) g ( X ) = h ( X ) f(X)g(X)=h(X) f(X)g(X)=h(X),则伪造成功的概率不高于 2 m / ( q − m ) 2m/(q-m) 2m/(qm)

对以上整个协议观察可知:

  • Prover的私有数据汇聚为一个vector为:
    y ⃗ = ( α 1 , ⋯   , α m , β 1 , ⋯   , β m , f ( 0 ) , g ( 0 ) , h ( 0 ) , h ( 1 ) , ⋯   , h ( 2 m ) ) ∈ Z q 4 m + 3 \vec{y}=(\alpha_1,\cdots,\alpha_m,\beta_1,\cdots,\beta_m,f(0),g(0),h(0),h(1),\cdots,h(2m))\in\mathbb{Z}_q^{4m+3} y =(α1,,αm,β1,,βm,f(0),g(0),h(0),h(1),,h(2m))Zq4m+3
    以上私有信息Prover可commit为a single compact commitment。注意以上定义中,对于 1 ≤ i ≤ m 1\leq i\leq m 1im γ i = h ( i ) \gamma_i=h(i) γi=h(i)。而所有open给Verifier的数据都可看成是(long) secret committed vector y ⃗ \vec{y} y 的某种固定的线性组合(fixed linear form)。
  • 针对具有 n n n inputs、 s s s outputs、 m m m multiplication gates的arithmetic circuit C C C (具有2 fan-in, unbounded fan-out) over Z q \mathbb{Z}_q Zq,以上协议可用于实现“circuit zero-knowledge”,如 the prover convinces the verifier that the committed vector x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn satisfies some constraint captured by a given circuit C C C which returns 0。[CDP12]中的circuit zero-knowledge 复杂性太大。
    可将多项式 f ( X ) 、 g ( X ) 、 h ( X ) f(X)、g(X)、h(X) f(X)g(X)h(X)分别对应multiplication gates的packed-secret sharings of left inputs、right inputs和outputs。
    Prover commit to x ⃗ \vec{x} x 中的每一个元素;
    Prover commit to 辅助信息 a u x = ( f ( 0 ) , g ( 0 ) , h ( 0 ) , h ( 1 ) , ⋯   , h ( 2 m ) ) ∈ Z q 2 m + 3 aux=(f(0),g(0),h(0),h(1),\cdots,h(2m))\in\mathbb{Z}_q^{2m+3} aux=(f(0),g(0),h(0),h(1),,h(2m))Zq2m+3 为一个单一的compact commitment。
    对于以上circuit C C C,其私有数据vector y ⃗ \vec{y} y 的length为 γ = n + 2 m + 3 \gamma=n+2m+3 γ=n+2m+3

(1)用于Range proof——构建circuit C C C用于证明secret integer v v v in a public range [ 0 , 2 n − 1 ] [0,2^{n-1}] [0,2n1]:(communication complexity为 O ( log ⁡ n ) O(\log n) O(logn)

  • 将secret integer v v v n n n bit 二进制位表示: b ⃗ ∈ Z n \vec{b}\in\mathbb{Z}^n b Zn。可将 v v v看成是a linear form evaluated at b ⃗ \vec{b} b ,因此,a commitment to b ⃗ \vec{b} b is an implicit commitment to v v v
  • Prover和Verifier可运行以上的circuit satisfiability protocol to commit to b ⃗ \vec{b} b and prove that C ( b ⃗ ) = 0 C(\vec{b})=0 C(b )=0 for C : Z q n → Z q n , x ⃗ ↦ x ⃗ ∗ ( 1 ⃗ − x ⃗ ) C:\mathbb{Z}_q^n\rightarrow \mathbb{Z}_q^n,\vec{x}\mapsto \vec{x}*(\vec{1}-\vec{x}) C:ZqnZqn,x x (1 x ),其中 ∗ * 表示 component-wise product。 The nullity check for C C C shows that the committed coefficients are indeed bits。

(2)用于 ( k , n ) (k,n) (k,n)-partial knowledge,即证明Prover知道witnesses for some k k k-subset of n n n given public statements,在不reveal which k k k-subset 的情况下使Verifier信服。
参见Thomas Attema等作者的另一2020年论文《 Compressing proofs of k-out-of-n-partial knowledge》:借助本文压缩版的 ∑ \sum -protocol以及对Ronald Cramer等人1994年论文[CDS94] 《Proofs of partial knowledge and simplified design of witness hiding protocols》思想的再利用,实现了logarithmic size proofs of partial knowledge for all k , n k,n k,n
目前已知的for all k , n k,n k,n的方案是[CDS94] 中的linear size 方案;
而目前已知的logarithmic size方案仅适用于 k = 1 k=1 k=1的场景,即 1 − o u t − o f − n 1-out-of-n 1outofn proof,相关文献有:[GK15, BCC+15, JM20].

1.4 相关研究成果

基于discrete logarithm setting的circuit零知识证明方案通常具有的communication complexity为linear in the circuit size。

以上这些研究成果都是使用quadratic constraint来表示circuit。

在2016年论文《Linear algebra with sub-linear zero-knowledge arguments》中,作为一个中间成果,构建了一种polynomial commitment scheme:

  • A polynomial commitment为a commitment to the coefficient vector of a polynomial;
  • 该polynomial commitment具有the functionality of opening the evaluation at any given point。

而B¨unz等人2020年论文《Supersonic Transparent SNARKs from DARK Compilers》中是基于Strong-RSA assumption 实现了类似的polynomial functionality。该论文中使用了最近的更复杂的reductions,如[GWC19, MBKM19, XZZ+19]:

基于quadratic constraints构建protocol,无论是直接还是通过 a polynomial commitment scheme来构建,从complex theory角度来看很难构建 plug-and-play secure algorithmics。

在2019年论文《qesa Efficient zero-knowledge arguments in the discrete log setting》 中,zero-knowledge,reduced communication和reduced computation实现了融合。
本文采用了更简单直接的方式构建了压缩版的 ∑ \sum -protocol,可用于open 任意的 linear forms,并可与 Ronald Cramer等人2012年论文 [CDP12]《On the amortized complexity of zero knowledge protocols for multiplicative relations》 中的simple (MPC inspired) linearization技术 结合使用。
压缩版的 ∑ \sum -protocol 在Bulletproofs的基础上进行了改进,同时借助了linearization技术来 discard the need for a direct provision to handle nonlinearity。
同时本文压缩版的 ∑ \sum -protocol 实现了plug and play设计,最终的communication complexity与Bulletproofs相当。

2. 相关定义

  • public coin protocol:
    An interactive protocol in which the verifier chooses all its messages uniformly at random and independent from the prover’s messages is called a public coin protocol。

  • special soundness:
    A public coin protocol is said to be (unconditionally) ( k 1 , ⋯   , k μ ) (k_1,\cdots,k_{\mu}) (k1,,kμ)- special sound if there exists a polynomial time algorithm that on input a statement x x x and a ( k 1 , k 2 , ⋯   , k μ ) (k_1,k_2,\cdots,k_{\mu}) (k1,k2,,kμ)-tree of accepting transcripts,可输出a witness w w w for x x x
    详细的定义可参看Bootle和Groth等人2016年论文《Efficient Zero-Knowledge Arguments for Arithmetic Circuits in the Discrete Log Setting》,在该论文中指出, ( k 1 , ⋯   , k μ ) (k_1,\cdots,k_{\mu}) (k1,,kμ)-special soundness意味着 witness extended emulation。

  • Pedersen vector commitment:
    G \mathbb{G} G为Abelian group of prime order q q q,Pedersen vector commitment包含setupcommit 两个阶段:
    – Setup: g ⃗ = ( g 1 , ⋯   , g n ) ← R G n , h ← R G \vec{g}=(g_1,\cdots,g_n)\leftarrow_R \mathbb{G}^n, h\leftarrow_R \mathbb{G} g =(g1,,gn)RGn,hRG
    – Commit: C O M : Z q n × Z q → G , ( x ⃗ , γ ) ↦ h γ g ⃗ x ⃗ = h γ ∏ i = 1 n g i x i COM: \mathbb{Z}_q^n\times\mathbb{Z}_q\rightarrow \mathbb{G}, (\vec{x},\gamma)\mapsto h^{\gamma}\vec{g}^{\vec{x}}=h^{\gamma}\prod_{i=1}^{n}g_i^{x_i} COM:Zqn×ZqG,(x ,γ)hγg x =hγi=1ngixi
    定义:(其中 g ⃗ , h ⃗ ∈ G n , x ⃗ ∈ Z q n , c ∈ Z q \vec{g},\vec{h}\in\mathbb{G}^n,\vec{x}\in\mathbb{Z}_q^n,c\in\mathbb{Z}_q g ,h Gn,x Zqn,cZq
    g ⃗ x ⃗ = ∏ i = 1 n g i x i \vec{g}^{\vec{x}}=\prod_{i=1}^{n}g_i^{x_i} g x =i=1ngixi
    g ⃗ c = ( g 1 c , g 2 c , ⋯   , g n c ) \vec{g}^c=(g_1^c,g_2^c,\cdots,g_n^c) g c=(g1c,g2c,,gnc)
    component-wise product: g ⃗ ∗ h ⃗ = ( g 1 h 1 , g 2 h 2 , ⋯   , g n h n ) \vec{g}*\vec{h}=(g_1h_1,g_2h_2,\cdots,g_nh_n) g h =(g1h1,g2h2,,gnhn)
    当Prover不知道 generators g 1 , ⋯   , g n , h g_1,\cdots,g_n,h g1,,gn,h之间的non-trivial discrete log relation关系时,Pedersen vector commitment具有perfect hiding和computationally binding属性。

3. Basic ∑ \sum -protocol

为了open a commitment to a linear form L : Z q n → Z q L: \mathbb{Z}_q^n\rightarrow \mathbb{Z}_q L:ZqnZq,意味着:Prover wishes to reveal L ( x ⃗ ) L(\vec{x}) L(x ) together with a proof of validity without revealing any additional information on x ⃗ \vec{x} x 。即需要证明如下relation:
R = { ( P ∈ G , L ∈ L ( Z q n ) , y ∈ Z q ; x ⃗ ∈ Z q n , γ ∈ Z q ) : P = g ⃗ x ⃗ h γ , y = L ( x ⃗ ) } R=\{(P\in\mathbb{G},L\in\mathcal{L}(\mathbb{Z}_q^n),y\in\mathbb{Z}_q; \vec{x}\in\mathbb{Z}_q^n,\gamma\in\mathbb{Z}_q): P=\vec{g}^{\vec{x}}h^{\gamma},y=L(\vec{x})\} R={(PG,LL(Zqn),yZq;x Zqn,γZq):P=g x hγ,y=L(x )}
其中 L ( Z q n ) = { ( L : Z q n → Z q ) : L   i s   a   Z q − l i n e a r   m a p } \mathcal{L}(\mathbb{Z}_q^n)=\{(L:\mathbb{Z}_q^n\rightarrow\mathbb{Z}_q): L\ is\ a\ \mathbb{Z}_q-linear\ map\} L(Zqn)={(L:ZqnZq):L is a Zqlinear map}

对以上信息basic ∑ \sum -Protocol Π 0 \Pi_0 Π0:【相比于1.1节内容,添加了hiding属性以实现zero knowledge。】

  • public info: generators g ⃗ ∈ G n , h ∈ G \vec{g}\in\mathbb{G}^n,h\in\mathbb{G} g Gn,hG, commitment P ∈ G P\in\mathbb{G} PG,arbitrary public linear form L ∈ L ( Z q n ) L\in\mathcal{L}(\mathbb{Z}_q^n) LL(Zqn) y ∈ Z q y\in\mathbb{Z}_q yZq
  • private info:secret vector x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn和blinding factor γ ∈ Z q \gamma\in\mathbb{Z}_q γZq
  • relation: P = g ⃗ x ⃗ h γ ∧ y = L ( x ⃗ ) P=\vec{g}^{\vec{x}}h^{\gamma} \wedge y=L(\vec{x}) P=g x hγy=L(x )

zero knowledge basic ∑ \sum -Protocol Π 0 \Pi_0 Π0 证明过程为:【为3-move zero-knowledge协议,具有unconditionally special sound,perfectly complete和special honest-verifier zero-knowledge。 】

  • Prover:选择secret random r ⃗ ← R Z q n , ρ ← R Z q \vec{r}\leftarrow_R\mathbb{Z}_q^n,\rho\leftarrow_R\mathbb{Z}_q r RZqn,ρRZq,计算commitment A = g ⃗ r ⃗ h ρ A=\vec{g}^{\vec{r}}h^{\rho} A=g r hρ t = L ( r ⃗ ) t=L(\vec{r}) t=L(r )
    A ∈ G , t ∈ Z q A\in\mathbb{G},t\in\mathbb{Z}_q AG,tZq发送给Verifier。
  • Verifier:发送random challenge c ← R Z q c\leftarrow_R \mathbb{Z}_q cRZq 给Prover。
  • Prover:计算 z ⃗ = c x ⃗ + r ⃗ , ϕ = c γ + ρ \vec{z}=c\vec{x}+\vec{r}, \phi=c\gamma+\rho z =cx +r ,ϕ=cγ+ρ
    z ⃗ ∈ Z q n , ϕ ∈ Z q \vec{z}\in\mathbb{Z}_q^n,\phi\in\mathbb{Z}_q z Zqn,ϕZq 发送给Verifier。
  • Verifier:验证 g ⃗ z ⃗ h ϕ = A P c \vec{g}^{\vec{z}}h^{\phi}=AP^c g z hϕ=APc以及 L ( z ⃗ ) = c y + t L(\vec{z})=cy+t L(z )=cy+t是否成立即可。

zero knowledge basic ∑ \sum -Protocol Π 0 \Pi_0 Π0,总的communication cost为:
P → V P\rightarrow V PV:1 element of G \mathbb{G} G and n + 2 n+2 n+2 elements of Z q \mathbb{Z}_q Zq
V → P V\rightarrow P VP:1 element of Z q \mathbb{Z}_q Zq

整个zero knowledge basic ∑ \sum -Protocol Π 0 \Pi_0 Π0 证明图示为:
在这里插入图片描述

3.1 amortized版本的Basic ∑ \sum -protocol Π 0 A m \Pi_0^{Am} Π0Am

amortized版本 Π 0 A m \Pi_0^{Am} Π0Am,针对的场景为:【即,the same linear form L L L is evaluated on different commitments。】

  • public info: commitments P 1 , ⋯   , P s ∈ G P_1,\cdots, P_s\in\mathbb{G} P1,,PsG,arbitrary public linear form L ∈ L ( Z q n ) L\in\mathcal{L}(\mathbb{Z}_q^n) LL(Zqn) y 1 , ⋯   , y s ∈ Z q y_1,\cdots,y_s\in\mathbb{Z}_q y1,,ysZq
  • private info:secret vector x ⃗ 1 , ⋯   , x ⃗ s ∈ Z q n \vec{x}_1,\cdots,\vec{x}_s\in\mathbb{Z}_q^n x 1,,x sZqn和blinding factor γ 1 , ⋯   , γ s ∈ Z q \gamma_1,\cdots,\gamma_s\in\mathbb{Z}_q γ1,,γsZq
  • relation: ∀ i , P i = g ⃗ x ⃗ i h γ i , y i = L ( x ⃗ i ) \forall i, P_i=\vec{g}^{\vec{x}_i}h^{\gamma_i},y_i=L(\vec{x}_i) i,Pi=g x ihγi,yi=L(x i)

注意,对于uniform random challenge c ∈ Z q c\in\mathbb{Z}_q cZq,group element P ~ = A ∏ i = 1 s P i c i \tilde{P}=A\prod_{i=1}^{s}P_i^{c^i} P~=Ai=1sPici is a Pedersen commitment to x ⃗ ~ = r ⃗ + ∑ i = 1 s x ⃗ i c i ∈ Z q n \tilde{\vec{x}}=\vec{r}+\sum_{i=1}^{s}\vec{x}_ic^i\in\mathbb{Z}_q^n x ~=r +i=1sx iciZqn,其中 A A A为a commitment to a (random) vector r ⃗ \vec{r} r 。而 L ( x ⃗ ~ ) = L ( r ⃗ + ∑ i = 1 s y i c i ) L(\tilde{\vec{x}})=L(\vec{r}+\sum_{i=1}^{s}y_ic^i) L(x ~)=L(r +i=1syici)成立。

zero knowledge Amortized ∑ \sum -Protocol Π 0 A m \Pi_0^{Am} Π0Am 证明过程为:【为3-move zero-knowledge协议,具有unconditionally ( s + 1 ) (s+1) (s+1)-special sound。 】(可参见博客 椭圆曲线形式下的Pedersen commitment——vector commitment和polynomial commitment

  • Prover:选择secret random r ⃗ ← R Z q n , ρ ← R Z q \vec{r}\leftarrow_R\mathbb{Z}_q^n,\rho\leftarrow_R\mathbb{Z}_q r RZqn,ρRZq,计算commitment A = g ⃗ r ⃗ h ρ A=\vec{g}^{\vec{r}}h^{\rho} A=g r hρ t = L ( r ⃗ ) t=L(\vec{r}) t=L(r )
    A ∈ G , t ∈ Z q A\in\mathbb{G},t\in\mathbb{Z}_q AG,tZq发送给Verifier。
  • Verifier:发送random challenge c ← R Z q c\leftarrow_R \mathbb{Z}_q cRZq 给Prover。
  • Prover:计算 x ⃗ ~ = r ⃗ + ∑ i = 1 s x ⃗ i c i , ϕ ~ = ∑ i s c i γ i + ρ \tilde{\vec{x}}=\vec{r}+\sum_{i=1}^{s}\vec{x}_ic^i, \tilde{\phi}=\sum_{i}^{s}c^i\gamma_i+\rho x ~=r +i=1sx ici,ϕ~=isciγi+ρ
    x ⃗ ~ ∈ Z q n , ϕ ~ ∈ Z q \tilde{\vec{x}}\in\mathbb{Z}_q^n, \tilde{\phi}\in\mathbb{Z}_q x ~Zqn,ϕ~Zq 发送给Verifier。
  • Verifier:验证 g ⃗ x ⃗ ~ h ϕ ~ = A ∏ i = 1 s P i c i \vec{g}^{\tilde{\vec{x}}}h^{\tilde{\phi}}=A\prod_{i=1}^{s}P_i^{c^i} g x ~hϕ~=Ai=1sPici以及 L ( x ⃗ ~ ) = ∑ i = 1 s c i y i + t L(\tilde{\vec{x}})=\sum_{i=1}^{s}c^iy_i+t L(x ~)=i=1sciyi+t是否成立即可。

zero knowledge Amortized ∑ \sum -Protocol Π 0 A m \Pi_0^{Am} Π0Am,总的communication cost为:【Amortized ∑ \sum -Protocol Π 0 A m \Pi_0^{Am} Π0Am与basic ∑ \sum -Protocol Π 0 \Pi_0 Π0的communication cost一样。】
P → V P\rightarrow V PV:1 element of G \mathbb{G} G and n + 2 n+2 n+2 elements of Z q \mathbb{Z}_q Zq
V → P V\rightarrow P VP:1 element of Z q \mathbb{Z}_q Zq

4. 压缩版的 ∑ \sum -protocol

4.1 对basic ∑ \sum -protocol Π 0 \Pi_0 Π0进行压缩

待证明的relation为:
R 1 = { ( P ^ , L ^ , y ^ ; z ⃗ ^ ) : g ⃗ ^ z ⃗ ^ ∧ y ^ = L ^ ( z ⃗ ^ ) } R_1=\{(\hat{P},\hat{L},\hat{y};\hat{\vec{z}}):\hat{\vec{g}}^{\hat{\vec{z}}}\wedge \hat{y}=\hat{L}(\hat{\vec{z}})\} R1={(P^,L^,y^;z ^):g ^z ^y^=L^(z ^)}
其中, g ⃗ ^ = ( g 1 , ⋯   , g n , h ) ∈ G n + 1 , P ^ = A P c , y ^ = c y + t \hat{\vec{g}}=(g_1,\cdots,g_n,h)\in\mathbb{G}^{n+1}, \hat{P}=AP^c,\hat{y}=cy+t g ^=(g1,,gn,h)Gn+1,P^=APc,y^=cy+t 以及 L ^ ( z ⃗ , ϕ ) = L ( z ⃗ ) \hat{L}(\vec{z},\phi)=L(\vec{z}) L^(z ,ϕ)=L(z ) for all ( z ⃗ , ϕ ) (\vec{z},\phi) (z ,ϕ)

注意,Bulletproofs中的inner product relation为:
R b u l l e t = { ( P ∈ G , u ∈ Z q ; a ⃗ , b ⃗ ∈ Z q n ) : P = g ⃗ a ⃗ h ⃗ b ⃗ ∧ u = < a ⃗ , b ⃗ > } R_{bullet}=\{(P\in\mathbb{G},u\in\mathbb{Z}_q;\vec{a},\vec{b}\in\mathbb{Z}_q^n): P=\vec{g}^{\vec{a}}\vec{h}^{\vec{b}}\wedge u=<\vec{a},\vec{b}>\} Rbullet={(PG,uZq;a ,b Zqn):P=g a h b u=<a ,b >}

观察relation R 1 R_1 R1 R b u l l e t R_{bullet} Rbullet,两者非常相似,可对Bulletproofs方案进行小调整以构建logarithmic size PoK for relation R 1 R_1 R1
与Bulletproofs方案中的实现类似,额外再引入一个generator k ∈ G k\in\mathbb{G} kG g 1 , ⋯   , g n , h , k g_1,\cdots,g_n,h,k g1,,gn,h,k相互之间无确定的关系,则证明relation:
R 2 = { ( Q ∈ G , L ~ ∈ L ( Z q n + 1 ) ; z ⃗ ^ ∈ Z q n + 1 ) : Q = g ⃗ ^ z ⃗ ^ k L ~ ( z ⃗ ^ ) } R_2=\{(Q\in\mathbb{G},\tilde{L}\in\mathcal{L}(\mathbb{Z}_q^{n+1}); \hat{\vec{z}}\in\mathbb{Z}_q^{n+1}): Q=\hat{\vec{g}}^{\hat{\vec{z}}}k^{\tilde{L}(\hat{\vec{z}})}\} R2={(QG,L~L(Zqn+1);z ^Zqn+1):Q=g ^z ^kL~(z ^)}
其中 Q = P ^ k c y ^ , L ~ = c L ^ Q=\hat{P}k^{c\hat{y}},\tilde{L}=c\hat{L} Q=P^kcy^,L~=cL^ c ∈ G c\in\mathbb{G} cG为random challenge sampled by the verifier。

relation 由 R 1 R_1 R1 reduce 为 R 2 R_2 R2 的过程为:(该转换过程称为 argument of knowledge Π 1 \Pi_1 Π1 for R 1 R_1 R1。)【直接发送witness z ⃗ ^ ∈ Z q n + 1 \hat{\vec{z}}\in\mathbb{Z}_q^{n+1} z ^Zqn+1
在这里插入图片描述

以上 Π 1 \Pi_1 Π1 为 a 2-move protocol for relation R 1 R_1 R1。具有perfectly complete和computationally special sound,under the discrete logarithm assumption。 Π 1 \Pi_1 Π1 protocol 相应的communication cost为:
P → V P\rightarrow V PV n + 1 n+1 n+1 elements of Z q \mathbb{Z}_q Zq
V → P V\rightarrow P VP:1 element of Z q \mathbb{Z}_q Zq

假设 n + 1 n+1 n+1为2的幂乘,若不是,则在 z ⃗ ^ \hat{\vec{z}} z ^ vector尾部补0。借助Bulletproofs方案对 Π 1 \Pi_1 Π1 protocol进行recursion,以证明Relation R 2 R_2 R2,使得最终的communication cost为 1 1 1 field element Z q \mathbb{Z}_q Zq 2 log ⁡ 2 ( n + 1 ) 2\log_2(n+1) 2log2(n+1)个group elements G \mathbb{G} G

m m m为偶数,对 g ⃗ ∈ G m \vec{g}\in\mathbb{G}^m g Gm x ⃗ ∈ Z q m \vec{x}\in\mathbb{Z}_q^m x Zqm进行等分有:
g ⃗ L = ( g 1 , ⋯   , g m / 2 ) \vec{g}_L=(g_1,\cdots,g_{m/2}) g L=(g1,,gm/2)
g ⃗ R = ( g m / 2 + 1 , ⋯   , g m ) \vec{g}_R=(g_{m/2+1},\cdots,g_m) g R=(gm/2+1,,gm)
x ⃗ L = ( x 1 , ⋯   , x m / 2 ) \vec{x}_L=(x_1,\cdots,x_{m/2}) x L=(x1,,xm/2)
x ⃗ R = ( x m / 2 + 1 , ⋯   , x m ) \vec{x}_R=(x_{m/2+1},\cdots,x_m) x R=(xm/2+1,,xm)
对linear form L : Z q m → Z q L: \mathbb{Z}_q^m\rightarrow \mathbb{Z}_q L:ZqmZq进行等分有:
L L : Z q m / 2 → Z q , x ⃗ L ↦ L ( x ⃗ L , 0 ⃗ ) L_L: \mathbb{Z}_q^{m/2}\rightarrow \mathbb{Z}_q, \vec{x}_L\mapsto L(\vec{x}_L,\vec{0}) LL:Zqm/2Zq,x LL(x L,0 )
L R : Z q m / 2 → Z q , x ⃗ R ↦ L ( 0 ⃗ , x ⃗ R ) L_R: \mathbb{Z}_q^{m/2}\rightarrow \mathbb{Z}_q, \vec{x}_R\mapsto L(\vec{0}, \vec{x}_R) LR:Zqm/2Zq,x RL(0 ,x R)

由于 L L L为linear form,因此有 ( a L L + L R ) ( x ⃗ L + a x ⃗ R ) = a L ( x ⃗ ) + L R ( x ⃗ L ) + a 2 L L ( x ⃗ R ) (aL_L+L_R)(\vec{x}_L+a\vec{x}_R)=aL(\vec{x})+L_R(\vec{x}_L)+a^2L_L(\vec{x}_R) (aLL+LR)(x L+ax R)=aL(x )+LR(x L)+a2LL(x R)

对于Relation R 2 R_2 R2
R 2 = { ( Q ∈ G , L ~ ∈ L ( Z q n + 1 ) ; z ⃗ ^ ∈ Z q n + 1 ) : Q = g ⃗ ^ z ⃗ ^ k L ~ ( z ⃗ ^ ) } R_2=\{(Q\in\mathbb{G},\tilde{L}\in\mathcal{L}(\mathbb{Z}_q^{n+1}); \hat{\vec{z}}\in\mathbb{Z}_q^{n+1}): Q=\hat{\vec{g}}^{\hat{\vec{z}}}k^{\tilde{L}(\hat{\vec{z}})}\} R2={(QG,L~L(Zqn+1);z ^Zqn+1):Q=g ^z ^kL~(z ^)}
借助Bulletproofs思想,在每一轮构建:(其中 c ∈ Z q c\in\mathbb{Z}_q cZq为每一轮的Verifier challenge)
z ⃗ ′ = z ⃗ ^ L + c ⋅ z ⃗ ^ R \vec{z}'=\hat{\vec{z}}_L+c\cdot \hat{\vec{z}}_R z =z ^L+cz ^R 【Prover】
L ′ = c ⋅ L ~ L + L ~ R L'=c\cdot \tilde{L}_L+\tilde{L}_R L=cL~L+L~R 【Prover & Verifier】
g ⃗ ′ = g ⃗ ^ L c ⋅ g ⃗ ^ R \vec{g}'=\hat{\vec{g}}_L^c\cdot \hat{\vec{g}}_R g =g ^Lcg ^R 【Prover & Verifier】
A = g ⃗ ^ R z ⃗ ^ L k L ~ R ( z ⃗ ^ L ) A=\hat{\vec{g}}_R^{\hat{\vec{z}}_L}k^{\tilde{L}_R(\hat{\vec{z}}_L)} A=g ^Rz ^LkL~R(z ^L) 【Prover】
B = g ⃗ ^ L z ⃗ ^ R k L ~ L ( z ⃗ ^ R ) B=\hat{\vec{g}}_L^{\hat{\vec{z}}_R}k^{\tilde{L}_L(\hat{\vec{z}}_R)} B=g ^Lz ^RkL~L(z ^R) 【Prover】
Q ′ = A Q c B c 2 Q'=AQ^cB^{c^2} Q=AQcBc2 【Prover & Verifier】
从而有 ( g ⃗ ′ ) z ⃗ ′ k L ′ ( z ⃗ ′ ) = Q ′ (\vec{g}')^{\vec{z}'}k^{L'(\vec{z}')}=Q' (g )z kL(z )=Q 在每一轮都成立。


注意,本文实现的Compressed Proof of Knowledge Π 2 \Pi_2 Π2 for relation R 2 R_2 R2的最后一轮是 n = 2 n=2 n=2,而不是Bulletproofs中的 n = 1 n=1 n=1,其实在 n = 2 n=2 n=2收敛的communication cost反而比在 n = 1 n=1 n=1少(少2个group elements A , B A,B A,B,少一个verifier challenge field element c c c,多一个field element z ′ z' z)。


Compressed Proof of Knowledge Π 2 \Pi_2 Π2 for relation R 2 R_2 R2 证明的详细图示为:【为 ( 2 μ + 1 ) (2\mu+1) (2μ+1)-move protocol,其中 μ = ⌈ log ⁡ 2 ( n + 1 ) ⌉ − 1 \mu= \left \lceil \log_2(n+1)\right \rceil -1 μ=log2(n+1)1。】
在这里插入图片描述

Compressed Π 2 \Pi_2 Π2 protocol 具有 perfectly complete和unconditionally ( k 1 , ⋯   , k μ ) (k_1,\cdots,k_{\mu}) (k1,,kμ)-special sound,其中 k i = 3 k_i=3 ki=3 for all 1 ≤ i ≤ μ 1\leq i\leq \mu 1iμ (因为每一轮 Q ’ Q’ Q的公式中challenge c c c的最高阶为1。)。
Compressed Π 2 \Pi_2 Π2 protocol的communication cost为:
P → V P\rightarrow V PV 2 ⌈ log ⁡ 2 ( n + 1 ) ⌉ − 2 2\left \lceil \log_2(n+1)\right \rceil -2 2log2(n+1)2 elements of G \mathbb{G} G和2 elements of Z q \mathbb{Z}_q Zq
V → P V\rightarrow P VP ⌈ log ⁡ 2 ( n + 1 ) ⌉ − 1 \left \lceil \log_2(n+1)\right \rceil -1 log2(n+1)1 elements of Z q \mathbb{Z}_q Zq

4.2 具有logarithmic round complexity的压缩版的 ∑ \sum -protocol Π c \Pi_c Πc

压缩版的 ∑ \sum -protocol Π c \Pi_c Πc for relation R R R 可看成是 Π 2 , Π 1 , Π 0 \Pi_2,\Pi_1,\Pi_0 Π2,Π1,Π0的组合:
Π c = Π 2 ◊ Π 1 ◊ Π 0 \Pi_c=\Pi_2 \lozenge \Pi_1 \lozenge \Pi_0 Πc=Π2Π1Π0
最终具有logarithmic round complexity,logarithmic communication complexity的压缩版的 ∑ \sum -protocol Π c \Pi_c Πc的实现图示为:
在这里插入图片描述

具有logarithmic round complexity,logarithmic communication complexity的压缩版的 ∑ \sum -protocol Π c \Pi_c Πc

  • ( 2 μ + 3 ) (2\mu+3) (2μ+3)-move protocol for relation R R R,其中 μ = ⌈ log ⁡ 2 ( n + 1 ) ⌉ − 1 \mu= \left \lceil \log_2(n+1)\right \rceil -1 μ=log2(n+1)1
  • 具有perfectly complete, special honest-verifier zero-knowledge以及computationally ( 2 , 2 , k 1 , ⋯   , k μ ) (2,2,k_1,\cdots,k_{\mu}) (2,2,k1,,kμ)-special sound,under discrete logarithm assumption,其中 k i = 3 k_i=3 ki=3 for all 1 ≤ i ≤ μ 1\leq i\leq \mu 1iμ (因为每一轮 Q ’ Q’ Q的公式中challenge c c c的最高阶为1。)。
  • communication cost为:
    P → V P\rightarrow V PV 2 ⌈ log ⁡ 2 ( n + 1 ) ⌉ − 1 2\left \lceil \log_2(n+1)\right \rceil -1 2log2(n+1)1 elements of G \mathbb{G} G和3 elements of Z q \mathbb{Z}_q Zq
    V → P V\rightarrow P VP ⌈ log ⁡ 2 ( n + 1 ) ⌉ + 1 \left \lceil \log_2(n+1)\right \rceil +1 log2(n+1)+1 elements of Z q \mathbb{Z}_q Zq

4.3 Amortized压缩版 ∑ \sum -protocol Π c A m \Pi_c^{Am} ΠcAm

由于有Amortized版的 Π 0 A m \Pi_0^{Am} Π0Am协议,相应的有Amortized压缩版 ∑ \sum -protocol Π c A m = Π 2 ◊ Π 1 ◊ Π 0 A m \Pi_c^{Am}=\Pi_2 \lozenge \Pi_1 \lozenge \Pi_0^{Am} ΠcAm=Π2Π1Π0Am

Amortized具有logarithmic round complexity,logarithmic communication complexity的压缩版的 ∑ \sum -protocol Π c A m \Pi_c^{Am} ΠcAm

  • ( 2 μ + 3 ) (2\mu+3) (2μ+3)-move protocol for relation R A m R^{Am} RAm,其中 μ = ⌈ log ⁡ 2 ( n + 1 ) ⌉ − 1 \mu= \left \lceil \log_2(n+1)\right \rceil -1 μ=log2(n+1)1
  • 具有perfectly complete, special honest-verifier zero-knowledge以及computationally ( s + 1 , 2 , k 1 , ⋯   , k μ ) (s+1,2,k_1,\cdots,k_{\mu}) (s+1,2,k1,,kμ)-special sound,under discrete logarithm assumption,其中 k i = 3 k_i=3 ki=3 for all 1 ≤ i ≤ μ 1\leq i\leq \mu 1iμ (参看本博文3.1节内容, x ⃗ ~ \tilde{\vec{x}} x ~中的challenge c c c 的最高阶为 s s s)。
  • communication cost为:
    P → V P\rightarrow V PV 2 ⌈ log ⁡ 2 ( n + 1 ) ⌉ − 1 2\left \lceil \log_2(n+1)\right \rceil -1 2log2(n+1)1 elements of G \mathbb{G} G和3 elements of Z q \mathbb{Z}_q Zq
    V → P V\rightarrow P VP ⌈ log ⁡ 2 ( n + 1 ) ⌉ + 1 \left \lceil \log_2(n+1)\right \rceil +1 log2(n+1)+1 elements of Z q \mathbb{Z}_q Zq

4.4 具有unconditional soundness的压缩版 ∑ \sum -protocol Π c \Pi_c Πc

Π c = Π 2 ◊ Π 1 ◊ Π 0 \Pi_c=\Pi_2 \lozenge \Pi_1 \lozenge \Pi_0 Πc=Π2Π1Π0
由于protocol Π 1 \Pi_1 Π1具有computational soundness,因此 Π c \Pi_c Πc 也具有computational soundness。本文有2种方式来实现unconditional knowledge soundness Π c \Pi_c Πc

  • 方法一:与Bulletproofs方案不同,本文只考虑linear constraints,不考虑quadratic constraints。 Π c \Pi_c Πc不是unconditional soundness的根源在于the reduction of protocol Π 1 \Pi_1 Π1。为了实现unconditional soundness,仅需简单的去掉该reduction即可,代价是增加了一倍的logarithmic communication cost。(对两个relation分开证明,不合并成一个relation再证明。)

  • 方法二:与方法一不同,在不增加communication cost的基础上,实现unconditional soundness,但是将增加Prover和Verifier的computational cost,因为二者都需要计算a basis for V L V_L VL
    以relation R ′ R' R 为例:【相当于证明knowledge of an opening of a Pedersen vector commitment。】
    R ′ = { ( P ∈ G ; z ⃗ ∈ Z q n − 1 , γ ∈ Z q ) : k ⃗ z ⃗ h γ = P } R'=\{(P\in\mathbb{G};\vec{z}\in\mathbb{Z}_q^{n-1},\gamma\in\mathbb{Z}_q): \vec{k}^{\vec{z}}h^{\gamma}=P\} R={(PG;z Zqn1,γZq):k z hγ=P}
    其中public parameters k ⃗ ∈ G n − 1 , h ∈ G \vec{k}\in\mathbb{G}^{n-1},h\in\mathbb{G} k Gn1,hG
    而本文希望证明的relation R R R为:
    R = { ( P ∈ G , L ∈ L ( Z q n ) , y ∈ Z q ; x ⃗ ∈ Z q n , γ ∈ Z q ) : P = g ⃗ x ⃗ h γ , y = L ( x ⃗ ) } R=\{(P\in\mathbb{G}, L\in\mathcal{L}(\mathbb{Z}_q^n), y\in\mathbb{Z}_q; \vec{x}\in\mathbb{Z}_q^n, \gamma\in\mathbb{Z}_q): P=\vec{g}^{\vec{x}}h^{\gamma}, y=L(\vec{x})\} R={(PG,LL(Zqn),yZq;x Zqn,γZq):P=g x hγ,y=L(x )}
    其中 public parameters g ⃗ ∈ G n , h ∈ G \vec{g}\in\mathbb{G}^n,h\in\mathbb{G} g Gn,hG
    可将relation R R R的证明看成是:a committed vector x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn 满足 L ( x ⃗ ) = y L(\vec{x})=y L(x )=y,for some linear form L L L and scalar y y y
    可将其等价为证明:
    x ⃗ \vec{x} x lies in the affine subspace A L , y = { z ⃗ ∈ Z q n : L ( z ⃗ ) = y } A_{L,y}=\{\vec{z}\in\mathbb{Z}_q^n: L(\vec{z})=y\} AL,y={z Zqn:L(z )=y}
    不失一般性,可设置 y = 0 , L ≠ 0 y=0,L\neq 0 y=0,L=0,则有 V L = A L , 0 ⊂ Z q n V_L=A_{L,0}\subset \mathbb{Z}_q^n VL=AL,0Zqn is a linear subspace of dimension n − 1 n-1 n1。然后Prover和Verifier使用the same deterministic algorithm 来计算 a basis v 1 , ⋯   , v n − 1 v_1,\cdots,v_{n-1} v1,,vn1 for V L V_L VL 和 a new set of generators k ⃗ = ( g v 1 , ⋯   , g v n − 1 ) ∈ G n − 1 \vec{k}=(g^{v_1},\cdots,g^{v_{n-1}})\in\mathbb{G}^{n-1} k =(gv1,,gvn1)Gn1。注意,由于 v 1 , ⋯   , v n − 1 v_1,\cdots,v_{n-1} v1,,vn1为basis,则 a non-trivial discrete log relation between k 1 , ⋯   , k n − 1 , h k_1,\cdots,k_{n-1},h k1,,kn1,h 意味着 a non-trivial discrete log relation between g 1 , ⋯   , g n , h g_1,\cdots,g_n,h g1,,gn,h
    在这里插入图片描述

4.5 具有constant round complexity的压缩版的 ∑ \sum -protocol Π c \Pi_c Πc

压缩版的 ∑ \sum -protocol Π c \Pi_c Πc for relation R R R 可看成是 Π 2 , Π 1 , Π 0 \Pi_2,\Pi_1,\Pi_0 Π2,Π1,Π0的组合:
Π c = Π 2 ◊ Π 1 ◊ Π 0 \Pi_c=\Pi_2 \lozenge \Pi_1 \lozenge \Pi_0 Πc=Π2Π1Π0

Groth 2009年论文[Gro09]《Linear Algebra with Sub-linear Zero-Knowledge Arguments》在communication complexity和number of rounds之间做了平衡。类似地,本文4.2节的protocol Π 2 \Pi_2 Π2具有logarithmic communication complexity at the cost of a logarithmic number of rounds。

所以可采用[Gro09]中类似的思路来构建具有constant round complexity,sqrt communication complexity的压缩版的 ∑ \sum -protocol Π c \Pi_c Πc
不过,由于可以使用Fiat-Shamir 来实现non-interactive,因此实际logarithmic communication complexity更具有优势。

5. 将压缩版 Π c \Pi_c Πc看成是black-box

接下来要是实现的目标是:
具有a compact vector commitment;
允许Prover open arbitrary linear forms on multiple commitments。

[ x ] [x] [x]来表示vector x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn的compact commitment;
(public) linear form L L L
Π O P E N ( [ x ] , L ; x ⃗ ) \Pi_{OPEN}([x],L; \vec{x}) ΠOPEN([x],L;x )来表示the interactive protocol that reveals L ( x ⃗ ) L(\vec{x}) L(x ) and nothing else to the verifier。

若Open a linear form evaluated in a committed vector,则相应的证明为:
在这里插入图片描述

5.1 many nullity checks for the price of one

针对的场景为:

  • 有多个linear forms L 1 , ⋯   , L s L_1,\cdots,L_s L1,,Ls
  • Prover声称 L i ( x ⃗ ) = 0 L_i(\vec{x})=0 Li(x )=0 for i = 1 , ⋯   , s i=1,\cdots,s i=1,,s
  • Verifier challenge ρ ∈ Z q \rho\in\mathbb{Z}_q ρZq
  • ask the Prover to open the linear form L ( x ⃗ ) = ∑ i = 1 s L i ( x ⃗ ) ρ i − 1 L(\vec{x})=\sum_{i=1}^{s}L_i(\vec{x})\rho^{i-1} L(x )=i=1sLi(x )ρi1,如Prover和Verifier可运行 Π O P E N ( [ x ] , L ; x ⃗ ) \Pi_{OPEN}([x],L;\vec{x}) ΠOPEN([x],L;x )

the opening of L ( x ⃗ ) L(\vec{x}) L(x ) equals the evaluation of some polynomial of degree at most s − 1 s-1 s1。若该polynomial is non-zero,则其最多有 s − 1 s-1 s1个零值解。也就是说: L ( x ⃗ ) = 0 L(\vec{x})=0 L(x )=0 implies that L i ( x ⃗ ) = 0 L_i(\vec{x})=0 Li(x )=0 for all i i i with probability at least 1 − ( s − 1 ) / q 1-(s-1)/q 1(s1)/q
相应的协议可表示为 Π N U L L I T Y ( [ x ] , L 1 , ⋯   , L s ; x ⃗ ) \Pi_{NULLITY}([x],L_1,\cdots,L_s;\vec{x}) ΠNULLITY([x],L1,,Ls;x )
在这里插入图片描述
Π N U L L I T Y ( [ x ] , L 1 , ⋯   , L s ; x ⃗ ) \Pi_{NULLITY}([x],L_1,\cdots,L_s;\vec{x}) ΠNULLITY([x],L1,,Ls;x ) 除了比 s = 1 s=1 s=1的情况多一个 Z q \mathbb{Z}_q Zq element from V V V to P P P之外,其communication cost与a single nullity-check ( s = 1 s=1 s=1)相同。

将其中的linear forms替换为affine forms Φ 1 ( x ) , ⋯   , Φ s \Phi_1(x),\cdots,\Phi_s Φ1(x),,Φs也是成立的,表示为 Π N U L L I T Y ( [ x ] , Φ 1 , ⋯   , Φ s ; x ⃗ ) \Pi_{NULLITY}([x],\Phi_1,\cdots,\Phi_s;\vec{x}) ΠNULLITY([x],Φ1,,Φs;x )

同理,amortized and compressed ∑ \sum -protocol Π c A m \Pi_c^{Am} ΠcAm用于make the same nullity claims over many different commitments。

5.2 Opening Affine maps

许多ZK场景都可reduce为nullity-checks,如对于 arbitrary affine maps:
Φ ⃗ : Z q n → Z q s , x ⃗ ↦ A a ⃗ + b ⃗ \vec{\Phi}: \mathbb{Z}_q^n\rightarrow \mathbb{Z}_q^s, \vec{x}\mapsto \mathbf{A}\vec{a}+\vec{b} Φ :ZqnZqs,x Aa +b
其中 A \mathbf{A} A s × n s\times n s×n矩阵, x ⃗ \vec{x} x length为 n n n b ⃗ \vec{b} b length为 s s s Φ ⃗ \vec{\Phi} Φ length为 s s s

open以上affine maps需要的communication cost 相比于只open一个linear form,增加了 s − 1 s-1 s1 values in Z q \mathbb{Z}_q Zq (实际即为 the evaluations of s − 1 s-1 s1 additional outputs)。

注意 Φ ⃗ \vec{\Phi} Φ 为combination of s s s affine forms,则相应的协议 Π O P E N ( [ x ⃗ ] , Φ ⃗ ; x ⃗ ) \Pi_{OPEN}([\vec{x}],\vec{\Phi}; \vec{x}) ΠOPEN([x ],Φ ;x )可设计为:

  • Prover reveal the evaluation y ⃗ = Φ ⃗ ( x ⃗ ) \vec{y}=\vec{\Phi}(\vec{x}) y =Φ (x ),其中 x ⃗ \vec{x} x length为 n n n y ⃗ \vec{y} y length为 s s s
  • 然后Prover 提供 amortized nullity-check on the affine forms Φ 1 ( x ⃗ ) − y 1 , ⋯   , Φ s ( x ⃗ ) − y s \Phi_1(\vec{x})-y_1,\cdots,\Phi_s(\vec{x})-y_s Φ1(x )y1,,Φs(x )ys

Π O P E N ( [ x ⃗ ] , Φ ⃗ ; x ⃗ ) \Pi_{OPEN}([\vec{x}],\vec{\Phi}; \vec{x}) ΠOPEN([x ],Φ ;x )协议与 Π N U L L I T Y ( [ x ⃗ ] , L 1 , ⋯   , L s ; x ⃗ ) \Pi_{NULLITY}([\vec{x}],L_1,\cdots,L_s; \vec{x}) ΠNULLITY([x ],L1,,Ls;x )完全一样,只是其中的 L 1 ( x ⃗ ) = Φ 1 ( x ⃗ ) − y 1 , ⋯   , L s ( x ⃗ ) = Φ s ( x ⃗ ) − y s L_1(\vec{x})=\Phi_1(\vec{x})-y_1,\cdots, L_s(\vec{x})=\Phi_s(\vec{x})-y_s L1(x )=Φ1(x )y1,,Ls(x )=Φs(x )ys

同理,该协议也可延伸扩展至用于open the evaluations of Φ ⃗ \vec{\Phi} Φ on many committed vectors。仅增加 the additional evaluations,底层的压缩版 ∑ \sum -protocol communication cost仍然保持不变。注意,此时需要使用两次Amortized:

  • 1)在第一层,支持多个commitments;
  • 2)在第二层,支持多个affine forms。

open the evaluations of Φ ⃗ \vec{\Phi} Φ on many committed vectors 针对的场景为:

  • public info: commitments P 1 , ⋯   , P s ∈ G P_1,\cdots, P_s\in\mathbb{G} P1,,PsG,arbitrary public linear form L 1 , ⋯   , L s ∈ L ( Z q n ) L_1,\cdots,L_s\in\mathcal{L}(\mathbb{Z}_q^n) L1,,LsL(Zqn) y 1 , ⋯   , y s ∈ Z q y_1,\cdots,y_s\in\mathbb{Z}_q y1,,ysZq
  • private info:secret vector x ⃗ 1 , ⋯   , x ⃗ s ∈ Z q n \vec{x}_1,\cdots,\vec{x}_s\in\mathbb{Z}_q^n x 1,,x sZqn和blinding factor γ 1 , ⋯   , γ s ∈ Z q \gamma_1,\cdots,\gamma_s\in\mathbb{Z}_q γ1,,γsZq
  • relation: ∀ i , P i = g ⃗ x ⃗ i h γ i , y i = L i ( x ⃗ i ) \forall i, P_i=\vec{g}^{\vec{x}_i}h^{\gamma_i},y_i=L_i(\vec{x}_i) i,Pi=g x ihγi,yi=Li(x i)

open the evaluations of Φ ⃗ \vec{\Phi} Φ on many committed vectors 相应的证明思路为:

  • Prover:选择secret random r ⃗ ← R Z q n , ρ ← R Z q \vec{r}\leftarrow_R\mathbb{Z}_q^n,\rho\leftarrow_R\mathbb{Z}_q r RZqn,ρRZq,计算commitment A = g ⃗ r ⃗ h ρ A=\vec{g}^{\vec{r}}h^{\rho} A=g r hρ t i = L i ( r ⃗ ) t_i=L_i(\vec{r}) ti=Li(r )
    A ∈ G , t 1 , ⋯   , t s ∈ Z q A\in\mathbb{G},t_1,\cdots,t_s\in\mathbb{Z}_q AG,t1,,tsZq发送给Verifier。
  • Verifier:发送random challenge c ← R Z q c\leftarrow_R \mathbb{Z}_q cRZq 给Prover。
  • Prover:计算 x ⃗ ~ = r ⃗ + ∑ i = 1 s x ⃗ i c i , ϕ ~ = ∑ i s c i γ i + ρ \tilde{\vec{x}}=\vec{r}+\sum_{i=1}^{s}\vec{x}_ic^i, \tilde{\phi}=\sum_{i}^{s}c^i\gamma_i+\rho x ~=r +i=1sx ici,ϕ~=isciγi+ρ
    x ⃗ ~ ∈ Z q n , ϕ ~ ∈ Z q \tilde{\vec{x}}\in\mathbb{Z}_q^n, \tilde{\phi}\in\mathbb{Z}_q x ~Zqn,ϕ~Zq 发送给Verifier。
  • Verifier:计算 L = ∑ i = 1 s L i c i L=\sum_{i=1}^{s}L_ic^i L=i=1sLici验证 g ⃗ x ⃗ ~ h ϕ ~ = A ∏ i = 1 s P i c i \vec{g}^{\tilde{\vec{x}}}h^{\tilde{\phi}}=A\prod_{i=1}^{s}P_i^{c^i} g x ~hϕ~=Ai=1sPici以及 L ( x ⃗ ~ ) = ∑ i = 1 s c i y i + ∑ i = 1 s t i L(\tilde{\vec{x}})=\sum_{i=1}^{s}c^iy_i+\sum_{i=1}^{s}t_i L(x ~)=i=1sciyi+i=1sti是否成立即可。

5.3 Compactifying a Vector of Commitments

主要考虑2种极端场景:

  • 场景一:Prover commit to x ⃗ \vec{x} x in a single compact commitment。该场景也可称为教科书级别的ZK setting。【communication complexity 为linear in the number of commitments。】
  • 场景二:Prover commit to the coordinates of x ⃗ \vec{x} x individually。对应的实际场景为:Prover deliver committed data in subsequent transactions and only periodically prove in ZK some property on the compound information。【communication complexity 为linear in the (maximum) dimension of the committed vectors。】

以上两者之间的混合场景为:
the secret-vector-of-interest x ⃗ \vec{x} x 分散在多个不同的compact commitments中。

场景一和场景二的解决方案都是将其reduce为 a prover with a single compact commitment [ ( x ⃗ , a u x → ) ] [(\vec{x},\overrightarrow{aux})] [(x ,aux )] to all relevant data (如input data和auxiliary data)。

5.3.1 场景一 Prover commit to x ⃗ \vec{x} x in a single compact commitment

针对场景一——Prover commit to x ⃗ \vec{x} x in a single compact commitment:
利用Pedersen commitment的同态属性,有2组无交集的generators g ⃗ ∈ G n , h ⃗ ∈ G t \vec{g}\in\mathbb{G}^n,\vec{h}\in\mathbb{G}^t g Gn,h Gt,分别用于对 x ⃗ ∈ Z q n , a u x → ∈ Z q t \vec{x}\in\mathbb{Z}_q^n,\overrightarrow{aux}\in\mathbb{Z}_q^t x Zqn,aux Zqt进行commit,有: P = g ⃗ x ⃗ , Q = h ⃗ a u x → P=\vec{g}^{\vec{x}}, Q=\vec{h}^{\overrightarrow{aux}} P=g x ,Q=h aux ,则可将 P ′ = P ⋅ Q P'=P\cdot Q P=PQ看成是对 ( x ⃗ , a u x → ) (\vec{x},\overrightarrow{aux}) (x ,aux ) pair的compact commitment。
首先,Prover 必须证明 x ⃗ , a u x → \vec{x},\overrightarrow{aux} x ,aux “live on disjoint sets of generators”——其本质上就是 a nullity check:(将 g ⃗ \vec{g} g 称为initial set of generators,将 h ⃗ \vec{h} h 称为 new generators。)
(a) Prover show that in P P P, there is a window of zeros w.r.t. the new generators。有 P = g ⃗ x ⃗ = g ⃗ x ⃗ h ⃗ 0 ⃗ P=\vec{g}^{\vec{x}}=\vec{g}^{\vec{x}}\vec{h}^{\vec{0}} P=g x =g x h 0 ,所以 P P P 可看成是对 ( x ⃗ , 0 ⃗ ) ∈ Z q n + t (\vec{x},\vec{0})\in\mathbb{Z}_q^{n+t} (x ,0 )Zqn+t的commitment。
(b) Prover show that in Q Q Q, there is a window of zeros w.r.t. the initial set of generators。有 Q = h ⃗ a u x → = g ⃗ 0 ⃗ h ⃗ a u x → Q=\vec{h}^{\overrightarrow{aux}}=\vec{g}^{\vec{0}}\vec{h}^{\overrightarrow{aux}} Q=h aux =g 0 h aux ,所以 Q Q Q 可看成是对 ( 0 ⃗ , a u x → ) ∈ Z q n + t (\vec{0},\overrightarrow{aux})\in\mathbb{Z}_q^{n+t} (0 ,aux )Zqn+t的commitment。
利用之前提到的amortized nullity check protocol,可实现logarithmic communication证明。
事实上在后续会提到,仅需要对 Q Q Q进行check就足够了,而不需要对 P P P Q Q Q都check。若串行运行,则communication efficiency将降低一倍,而并行运行的话,可避免communication efficiency损失。
注意,amortized Π 0 A m \Pi_0^{Am} Π0Am允许Prover open one linear form on many compact commitments efficiently;而amortized nullity check Π N U L L I T Y \Pi_{NULLITY} ΠNULLITY 允许Prover open many linear forms on one compact commitments efficiently。
Π 0 A m \Pi_0^{Am} Π0Am Π N U L L I T Y \Pi_{NULLITY} ΠNULLITY协议结合基本就足够了。除非要求Prover open linear forms “intended” for one particular commitment on other commitments,这将导致cross-terms泄露,为了避免这种隐私泄露,需要mask these cross-terms appropriately——通过构建a small shell around commitments containing sufficient randomness。Masking the appropriate cross-terms returns us to the “standard” amortization scenario where the prover wishes to open one affine map on multiple compact commitments。The shells cause unintended evaluations to return random values, whereas intended evaluations are left unaltered。

(一) 场景一的串行解决方案
分为两步:
1) Prover open one linear form on one compact commitment,即运行amortized nullity checks on Pedersen commitment Q Q Q to ( 0 , a u x → ) ∈ Z q n + t (0,\overrightarrow{aux})\in\mathbb{Z}_q^{n+t} (0,aux )Zqn+t
2) Prover open another linear form on another commitment,即采用论文第六章的技术来open Pedersen commitment P ′ = P Q P'=PQ P=PQ to ( x ⃗ , a u x → ) ∈ Z q n + t (\vec{x},\overrightarrow{aux})\in\mathbb{Z}_q^{n+t} (x ,aux )Zqn+t。注意,其中 P P P为Pedersen commitment to the input data x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn

考虑如下情形:

  • public info:two linear forms L 1 , L 2 : Z q n → Z q L_1,L_2:\mathbb{Z}_q^n\rightarrow \mathbb{Z}_q L1,L2:ZqnZq,以及two compact commitments [ x ⃗ 1 ] , [ x ⃗ 2 ] [\vec{x}_1],[\vec{x}_2] [x 1],[x 2], generators g ⃗ ∈ G n \vec{g}\in\mathbb{G}^n g Gn,以及 y 1 , y 2 ∈ Z q y_1,y_2\in\mathbb{Z}_q y1,y2Zq
  • private info: x ⃗ 1 , x ⃗ 2 ∈ Z q n \vec{x}_1,\vec{x}_2\in\mathbb{Z}_q^n x 1,x 2Zqn 以及 cross-terms L 1 ( x ⃗ 2 ) L_1(\vec{x}_2) L1(x 2) L 2 ( x ⃗ 1 ) L_2(\vec{x}_1) L2(x 1)
  • relation: [ x ⃗ 1 ] = g ⃗ x ⃗ 1 ∧ [ x ⃗ 2 ] = g ⃗ x ⃗ 2 ∧ y 1 = L 1 ( x ⃗ 1 ) ∧ y 2 = L 2 ( x ⃗ 2 ) [\vec{x}_1]=\vec{g}^{\vec{x}_1}\wedge [\vec{x}_2]=\vec{g}^{\vec{x}_2}\wedge y_1=L_1(\vec{x}_1)\wedge y_2=L_2(\vec{x}_2) [x 1]=g x 1[x 2]=g x 2y1=L1(x 1)y2=L2(x 2)

主要的思路为:
build a shell around the compact commitments that allows the prover to mask linear form evaluations that are not supposed to be revealed, i.e., the cross-terms。这样,问题就可reduce 为 a standard amortization scenario where the entire “matrix” of linear form evaluations
( L 1 ( x ⃗ 1 ) L 1 ( x ⃗ 2 ) L 2 ( x ⃗ 1 ) L 2 ( x ⃗ 2 ) ) \begin{pmatrix} L_1(\vec{x}_1) & L_1(\vec{x}_2)\\ L_2(\vec{x}_1) & L_2(\vec{x}_2) \end{pmatrix} (L1(x 1)L2(x 1)L1(x 2)L2(x 2))
is revealed。
更准确的来说,该matrix的对角线上的元素,为intended evaluations,需要为正确的值;而matrix中非对角线上的元素,是unintended evaluations,需要替换为masked random value。

解决方案为:
在public set-up information中引入一组不同于已有 g ⃗ , h ⃗ \vec{g},\vec{h} g ,h 的新的generators k 1 , k 2 ∈ G k_1,k_2\in\mathbb{G} k1,k2G,为Prover 引入新的random coefficients u , w ∈ Z q u,w\in\mathbb{Z}_q u,wZq服务。对应构建的 R s h e l l R_{shell} Rshell版情形为:【其中的auxiliary data a u x → \overrightarrow{aux} aux 为commitment 中的blinding factor,此处分别为 γ 1 , γ 2 \gamma_1,\gamma_2 γ1,γ2

  • public info:two linear forms L 1 , L 2 : Z q n → Z q L_1,L_2:\mathbb{Z}_q^n\rightarrow \mathbb{Z}_q L1,L2:ZqnZq,以及two compact commitments P 1 , P 2 ∈ G P_1,P_2\in\mathbb{G} P1,P2G, generators g ⃗ ∈ G n , k 1 , k 2 , h ∈ G \vec{g}\in\mathbb{G}^n, k_1,k_2,h\in\mathbb{G} g Gn,k1,k2,hG,以及 y 1 , y 2 ∈ Z q y_1,y_2\in\mathbb{Z}_q y1,y2Zq
  • private info: x ⃗ 1 , x ⃗ 2 ∈ Z q n \vec{x}_1,\vec{x}_2\in\mathbb{Z}_q^n x 1,x 2Zqn 以及 cross-terms L 1 ( x ⃗ 2 ) L_1(\vec{x}_2) L1(x 2) L 2 ( x ⃗ 1 ) L_2(\vec{x}_1) L2(x 1) u , w , γ 1 , γ 2 ∈ Z q u,w,\gamma_1,\gamma_2\in\mathbb{Z}_q u,w,γ1,γ2Zq
  • relation: P 1 = g ⃗ x ⃗ 1 k 1 u h γ 1 ∧ P 2 = g ⃗ x ⃗ 2 k 2 w h γ 2 ∧ y 1 = L 1 ( x ⃗ 1 ) ∧ y 2 = L 2 ( x ⃗ 2 ) P_1=\vec{g}^{\vec{x}_1}k_1^uh^{\gamma_1}\wedge P_2=\vec{g}^{\vec{x}_2}k_2^wh^{\gamma_2}\wedge y_1=L_1(\vec{x}_1)\wedge y_2=L_2(\vec{x}_2) P1=g x 1k1uhγ1P2=g x 2k2whγ2y1=L1(x 1)y2=L2(x 2)

其中 P 1 = g ⃗ x ⃗ 1 k 1 u h γ 1 = g ⃗ x ⃗ 1 k 1 u k 2 0 h γ 1 P_1=\vec{g}^{\vec{x}_1}k_1^uh^{\gamma_1}=\vec{g}^{\vec{x}_1}k_1^uk_2^0h^{\gamma_1} P1=g x 1k1uhγ1=g x 1k1uk20hγ1 P 1 P_1 P1可看成是对 ( x ⃗ 1 , u , 0 ) (\vec{x}_1,u,0) (x 1,u,0)的blinding commitment,同理 P 2 = g ⃗ x ⃗ 2 k 1 0 k 2 w h γ 2 P_2=\vec{g}^{\vec{x}_2}k_1^0k_2^wh^{\gamma_2} P2=g x 2k10k2whγ2可看成是对 ( x ⃗ 2 , 0 , w ) (\vec{x}_2,0,w) (x 2,0,w)的blinding commitment。

  • Verifier:发送challenge ρ ∈ Z q ∖ { − 1 } \rho\in\mathbb{Z}_q \setminus \{-1\} ρZq{1} 给Prover。【注意为了mask cross terms,要求 ρ ≠ − 1 \rho\neq -1 ρ=1
  • Prover:构建新的linear forms:【为了支持amortized nullity check,使其满足 L ^ 1 ( x ⃗ 1 , u , 0 ) = 0 , L ^ 2 ( x ⃗ 2 , 0 , w ) = 0 \hat{L}_1(\vec{x}_1,u,0)=0,\hat{L}_2(\vec{x}_2,0,w)=0 L^1(x 1,u,0)=0,L^2(x 2,0,w)=0,而 L ^ 1 ( x ⃗ 2 , 0 , w ) , L ^ 2 ( x ⃗ 1 , u , 0 ) \hat{L}_1(\vec{x}_2,0,w),\hat{L}_2(\vec{x}_1,u,0) L^1(x 2,0,w),L^2(x 1,u,0)的evaluation值不会泄露 L 1 ( x ⃗ 2 ) , L 2 ( x ⃗ 1 ) L_1(\vec{x}_2),L_2(\vec{x}_1) L1(x 2),L2(x 1)的值。】
    L ^ 1 : Z q n + 2 → Z q , ( x ⃗ , a , b ) ↦ L 1 ( x ⃗ ) − y 1 + b ( ρ + 1 ) \hat{L}_1: \mathbb{Z}_q^{n+2}\rightarrow \mathbb{Z}_q, (\vec{x},a,b)\mapsto L_1(\vec{x})-y_1+b(\rho+1) L^1:Zqn+2Zq,(x ,a,b)L1(x )y1+b(ρ+1)
    L ^ 2 : Z q n + 2 → Z q , ( x ⃗ , a , b ) ↦ L 2 ( x ⃗ ) − y 2 + a ( ρ + 1 ) \hat{L}_2: \mathbb{Z}_q^{n+2}\rightarrow \mathbb{Z}_q, (\vec{x},a,b)\mapsto L_2(\vec{x})-y_2+a(\rho+1) L^2:Zqn+2Zq,(x ,a,b)L2(x )y2+a(ρ+1)

此时,需证明的改成支持amortized nullity check的 R ^ s h e l l \hat{R}_{shell} R^shell版情形为:【扩展为通用场景,将 0 , 0 0,0 0,0替换为了更通用的 u ′ , w ′ u',w' u,w

  • public info:two linear forms L 1 , L 2 : Z q n → Z q L_1,L_2:\mathbb{Z}_q^n\rightarrow \mathbb{Z}_q L1,L2:ZqnZq,以及two compact commitments P 1 , P 2 ∈ G P_1,P_2\in\mathbb{G} P1,P2G, generators g ⃗ ∈ G n , k 1 , k 2 , h ∈ G \vec{g}\in\mathbb{G}^n, k_1,k_2,h\in\mathbb{G} g Gn,k1,k2,hG,以及 y 1 , y 2 , y 12 , y 21 ∈ Z q y_1,y_2,y_{12},y_{21}\in\mathbb{Z}_q y1,y2,y12,y21Zq
  • private info: x ⃗ 1 , x ⃗ 2 ∈ Z q n \vec{x}_1,\vec{x}_2\in\mathbb{Z}_q^n x 1,x 2Zqn 以及 cross-terms L 1 ( x ⃗ 2 ) L_1(\vec{x}_2) L1(x 2) L 2 ( x ⃗ 1 ) L_2(\vec{x}_1) L2(x 1) u , w , u ′ , w ′ , γ 1 , γ 2 ∈ Z q u,w,u',w',\gamma_1,\gamma_2\in\mathbb{Z}_q u,w,u,w,γ1,γ2Zq
  • relation: P 1 = g ⃗ x ⃗ 1 k 1 u k 2 w ′ h γ 1 ∧ P 2 = g ⃗ x ⃗ 2 k 1 u ′ k 2 w h γ 2 ∧ L ^ 1 ( x ⃗ 1 , u , w ′ ) = L ^ 2 ( x ⃗ 2 , u ′ , w ) = 0 ∧ y 12 = L ^ 1 ( x ⃗ 2 , u ′ , w ) ∧ y 21 = L 2 ( x ⃗ 1 , u , w ′ ) P_1=\vec{g}^{\vec{x}_1}k_1^uk_2^{w'}h^{\gamma_1}\wedge P_2=\vec{g}^{\vec{x}_2}k_1^{u'}k_2^wh^{\gamma_2}\wedge \hat{L}_1(\vec{x}_1,u,w')=\hat{L}_2(\vec{x}_2,u',w)=0 \wedge y_{12}=\hat{L}_1(\vec{x}_2,u',w)\wedge y_{21}=L_2(\vec{x}_1,u,w') P1=g x 1k1uk2whγ1P2=g x 2k1uk2whγ2L^1(x 1,u,w)=L^2(x 2,u,w)=0y12=L^1(x 2,u,w)y21=L2(x 1,u,w)

采用标准的amortization技术可为 R ^ s h e l l \hat{R}_{shell} R^shell实现具有指定communication complexity的 ∑ \sum -protocol。但是,a ZKPoK for relation R ^ s h e l l \hat{R}_{shell} R^shell并不对应为 a ZKPoK for relation R s h e l l R_{shell} Rshell,原因是masks u , w u,w u,w会泄露。
为了实现ZKPoK for relation R s h e l l R_{shell} Rshell,需要Prover 首先re-randomize the shells by sending commitments R 1 , R 2 R_1,R_2 R1,R2 to s 1 , s 2 ∈ Z q s_1,s_2\in\mathbb{Z}_q s1,s2Zq chosen uniformly at random under generators ( k 1 , h ) (k_1,h) (k1,h) ( k 2 , h ) (k_2,h) (k2,h) respectively;然后Prover和Verifier计算re-randomized commitments R 1 P 1 R_1P_1 R1P1 R 2 P 2 R_2P_2 R2P2,然后运行2个standard ∑ \sum -protocol来证明commitments R 1 , R 2 R_1,R_2 R1,R2 exclusively involve the appropriate generators;最后,Prover和Verifier运行一个standard amortized ∑ \sum -protocol for relation R ^ s h e l l \hat{R}_{shell} R^shell

也就是说,ZKPoK for relation R s h e l l R_{shell} Rshell 主要由3部分组成:
(1)Amortized nullity checks on shelled commitments P 1 , P 2 P_1,P_2 P1,P2
(2)Re-randomization of the shells, together with the basic ∑ \sum -protocols for R 1 R_1 R1 and R 2 R_2 R2
(3)Amortized ∑ \sum -protocol for relation R ^ s h e l l \hat{R}_{shell} R^shell

R s h e l l R_{shell} Rshell版情形为:【其中的auxiliary data a u x → \overrightarrow{aux} aux 为commitment 中的blinding factor,此处分别为 γ 1 , γ 2 \gamma_1,\gamma_2 γ1,γ2

  • public info:two linear forms L 1 , L 2 : Z q n → Z q L_1,L_2:\mathbb{Z}_q^n\rightarrow \mathbb{Z}_q L1,L2:ZqnZq,以及two compact commitments P 1 , P 2 ∈ G P_1,P_2\in\mathbb{G} P1,P2G, generators g ⃗ ∈ G n , k 1 , k 2 , h ∈ G \vec{g}\in\mathbb{G}^n, k_1,k_2,h\in\mathbb{G} g Gn,k1,k2,hG,以及 y 1 , y 2 ∈ Z q y_1,y_2\in\mathbb{Z}_q y1,y2Zq
  • private info: x ⃗ 1 , x ⃗ 2 ∈ Z q n \vec{x}_1,\vec{x}_2\in\mathbb{Z}_q^n x 1,x 2Zqn 以及 cross-terms L 1 ( x ⃗ 2 ) L_1(\vec{x}_2) L1(x 2) L 2 ( x ⃗ 1 ) L_2(\vec{x}_1) L2(x 1) u , w , γ 1 , γ 2 ∈ Z q u,w,\gamma_1,\gamma_2\in\mathbb{Z}_q u,w,γ1,γ2Zq
  • relation: P 1 = g ⃗ x ⃗ 1 k 1 u h γ 1 ∧ P 2 = g ⃗ x ⃗ 2 k 2 w h γ 2 ∧ y 1 = L 1 ( x ⃗ 1 ) ∧ y 2 = L 2 ( x ⃗ 2 ) P_1=\vec{g}^{\vec{x}_1}k_1^uh^{\gamma_1}\wedge P_2=\vec{g}^{\vec{x}_2}k_2^wh^{\gamma_2}\wedge y_1=L_1(\vec{x}_1)\wedge y_2=L_2(\vec{x}_2) P1=g x 1k1uhγ1P2=g x 2k2whγ2y1=L1(x 1)y2=L2(x 2)

R s h e l l R_{shell} Rshell版情形的证明思路为:

  • Verifier:发送challenge ρ ← R Z q ∖ { − 1 } \rho\leftarrow_R \mathbb{Z}_q\setminus \{-1\} ρRZq{1} 给Prover。
  • Prover和Verifier:构建新的public linear form:
    L ^ 1 : Z q n + 2 → Z q , ( x ⃗ , a , b ) ↦ L 1 ( x ⃗ ) − y 1 + b ( ρ + 1 ) \hat{L}_1: \mathbb{Z}_q^{n+2}\rightarrow \mathbb{Z}_q, (\vec{x},a,b)\mapsto L_1(\vec{x})-y_1+b(\rho+1) L^1:Zqn+2Zq,(x ,a,b)L1(x )y1+b(ρ+1)
    L ^ 2 : Z q n + 2 → Z q , ( x ⃗ , a , b ) ↦ L 2 ( x ⃗ ) − y 2 + a ( ρ + 1 ) \hat{L}_2: \mathbb{Z}_q^{n+2}\rightarrow \mathbb{Z}_q, (\vec{x},a,b)\mapsto L_2(\vec{x})-y_2+a(\rho+1) L^2:Zqn+2Zq,(x ,a,b)L2(x )y2+a(ρ+1)
    【阶段(1):证明Prover知道 P 1 , P 2 P_1,P_2 P1,P2的openings—— ( x ⃗ 1 , u , 0 ) , γ 1 (\vec{x}_1,u,0),\gamma_1 (x 1,u,0),γ1 ( x ⃗ 2 , 0 , w ) , γ 2 (\vec{x}_2,0,w),\gamma_2 (x 2,0,w),γ2。】
  • Prover:
    选择Prover私有随机数 r ⃗ ← R Z q n + 2 , ω ← R Z q \vec{r}\leftarrow_R \mathbb{Z}_q^{n+2}, \omega \leftarrow_R\mathbb{Z}_q r RZqn+2,ωRZq,计算 A = ( g ⃗ , k 1 , k 2 ) r ⃗ h ω A=(\vec{g},k_1,k_2)^{\vec{r}}h^{\omega} A=(g ,k1,k2)r hω
    Prover将 A ∈ G A\in\mathbb{G} AG发送给Verifier。
  • Verifier:发送random challenge c ← R Z q c\leftarrow_R \mathbb{Z}_q cRZq 给Prover。
  • Prover:计算 z ⃗ = ( x ⃗ 1 , u , 0 ) c + ( x ⃗ 2 , 0 , w ) c 2 + r ⃗ \vec{z}=(\vec{x}_1,u,0)c+(\vec{x}_2,0,w)c^2+\vec{r} z =(x 1,u,0)c+(x 2,0,w)c2+r ϕ = γ 1 c + γ 2 c 2 + ω \phi=\gamma_1c+\gamma_2c^2+\omega ϕ=γ1c+γ2c2+ω
    Prover将 z ⃗ ∈ Z q n + 2 \vec{z}\in\mathbb{Z}_q^{n+2} z Zqn+2 ϕ ∈ Z q \phi\in\mathbb{Z}_q ϕZq发送给Verifier
  • Verifier:验证 ( g ⃗ , k 1 , k 2 ) z ⃗ h ϕ = A ( P 1 ) c ( P 2 ) c 2 (\vec{g},k_1,k_2)^{\vec{z}}h^{\phi}=A(P_1)^c(P_2)^{c^2} (g ,k1,k2)z hϕ=A(P1)c(P2)c2是否成立即可。
    【阶段(2):在阶段(1)的基础上,为了隐藏shell mask u , w u,w u,w,引入了factor s 1 , s 2 s_1,s_2 s1,s2,使得在后续阶段reveal的内容为 u + s 1 , w + s 2 u+s_1,w+s_2 u+s1,w+s2,从而保证 u , w u,w u,w不被泄露;为了证明Prover知道 s 1 , s 2 s_1,s_2 s1,s2的值,引入了 r 1 , r 2 , η 1 , η 2 r_1,r_2,\eta_1,\eta_2 r1,r2,η1,η2来证明。】
  • Prover:
    选择Prover私有随机数 s 1 , s 2 , ψ 1 , ψ 2 ← R Z q s_1,s_2,\psi_1,\psi_2\leftarrow_R \mathbb{Z}_q s1,s2,ψ1,ψ2RZq,计算 R 1 = k 1 s 1 h ψ 1 , R 2 = k 2 s 2 h ψ 2 R_1=k_1^{s_1}h^{\psi_1},R_2=k_2^{s_2}h^{\psi_2} R1=k1s1hψ1,R2=k2s2hψ2
    选择Prover私有随机数 r 1 , r 2 , η 1 , η 2 ← R Z q r_1,r_2,\eta_1,\eta_2\leftarrow_R \mathbb{Z}_q r1,r2,η1,η2RZq,计算 A 1 = k 1 r 1 h η 1 , A 2 = k 2 r 2 h η 2 A_1=k_1^{r_1}h^{\eta_1},A_2=k_2^{r_2}h^{\eta_2} A1=k1r1hη1,A2=k2r2hη2
    Prover将 R 1 , R 2 , A 1 , A 2 ∈ G R_1,R_2,A_1,A_2\in\mathbb{G} R1,R2,A1,A2G发送给Verifier。
  • Verifier:发送random challenge c ← R Z q c\leftarrow_R \mathbb{Z}_q cRZq 给Prover。
  • Prover:计算 z ~ 1 = c s 1 + r 1 , z ~ 2 = c s 2 + r 2 , ϕ 1 = c ψ 1 + η 1 , ϕ 2 = c ψ 2 + η 2 \tilde{z}_1=cs_1+r_1,\tilde{z}_2=cs_2+r_2,\phi_1=c\psi_1+\eta_1,\phi_2=c\psi_2+\eta_2 z~1=cs1+r1,z~2=cs2+r2,ϕ1=cψ1+η1,ϕ2=cψ2+η2
    Prover将 z ~ 1 , z ~ 2 , ϕ 1 , ϕ 2 ∈ Z q \tilde{z}_1,\tilde{z}_2,\phi_1,\phi_2\in\mathbb{Z}_q z~1,z~2,ϕ1,ϕ2Zq发送给Verifier。
  • Verifier:验证 k 1 z ~ 1 h ϕ 1 = A 1 R 1 c , k 2 z ~ 2 h ϕ 2 = A 2 R 2 c k_1^{\tilde{z}_1}h^{\phi_1}=A_1R_1^c, k_2^{\tilde{z}_2}h^{\phi_2}=A_2R_2^c k1z~1hϕ1=A1R1c,k2z~2hϕ2=A2R2c是否成立。
    若成立,Verifier可信服Prover知道 P 1 R 1 P_1R_1 P1R1的openings为 ( x ⃗ 1 , u + s 1 , 0 ) (\vec{x}_1,u+s_1,0) (x 1,u+s1,0) P 2 R 2 P_2R_2 P2R2的openings为 ( x ⃗ 2 , 0 , w + s 2 ) (\vec{x}_2,0,w+s_2) (x 2,0,w+s2)
    【将阶段1和阶段2结合,调整Prover发送的 z ⃗ ∈ Z q n + 2 , ϕ ∈ Z q \vec{z}\in\mathbb{Z}_q^{n+2},\phi\in\mathbb{Z}_q z Zqn+2,ϕZq z ⃗ = ( x ⃗ 1 , u + s 1 , 0 ) c + ( x ⃗ 2 , 0 , w + s 2 ) c 2 + r ⃗ , ϕ = ( γ 1 + ψ 1 ) c + ( γ 2 + ψ 2 ) c 2 + ω \vec{z}=(\vec{x}_1,u+s_1,0)c+(\vec{x}_2,0,w+s_2)c^2+\vec{r}, \phi=(\gamma_1+\psi_1)c+(\gamma_2+\psi_2)c^2+\omega z =(x 1,u+s1,0)c+(x 2,0,w+s2)c2+r ,ϕ=(γ1+ψ1)c+(γ2+ψ2)c2+ω,相应地,Verifier的验证公式调整为 ( g ⃗ , k 1 , k 2 ) z ⃗ h ϕ = A ( P 1 R 1 ) c ( P 2 R 2 ) c 2 (\vec{g},k_1,k_2)^{\vec{z}}h^{\phi}=A(P_1R_1)^c(P_2R_2)^{c^2} (g ,k1,k2)z hϕ=A(P1R1)c(P2R2)c2
    【阶段3:证明 y 1 = L 1 ( x ⃗ 1 ) ∧ y 2 = L 2 ( x ⃗ 2 ) y_1=L_1(\vec{x}_1)\wedge y_2=L_2(\vec{x}_2) y1=L1(x 1)y2=L2(x 2),借助 L ^ 1 , L ^ 2 \hat{L}_1,\hat{L}_2 L^1,L^2为linear form,满足 L ^ 1 ( c x ⃗ 1 + c 2 x ⃗ 2 + r ⃗ ) = c L ^ 1 ( x ⃗ 1 ) + c 2 L ^ 1 ( x ⃗ 2 ) + L ^ 1 ( r ⃗ ) \hat{L}_1(c\vec{x}_1+c^2\vec{x}_2+\vec{r})=c\hat{L}_1(\vec{x}_1)+c^2\hat{L}_1(\vec{x}_2)+\hat{L}_1(\vec{r}) L^1(cx 1+c2x 2+r )=cL^1(x 1)+c2L^1(x 2)+L^1(r )。此时改为证明Prover知道 L ^ 1 ( z ⃗ ) \hat{L}_1(\vec{z}) L^1(z ) L ^ 2 ( z ⃗ ) \hat{L}_2(\vec{z}) L^2(z )的具体值。在阶段1和阶段2的环节中插入:】
  • Prover:计算 y 21 = L ^ 2 ( x ⃗ 1 , u + s 1 , 0 ) , y 12 = L ^ 1 ( x ⃗ 2 , 0 , w + s 2 ) y_{21}=\hat{L}_2(\vec{x}_1,u+s_1,0),y_{12}=\hat{L}_1(\vec{x}_2,0,w+s_2) y21=L^2(x 1,u+s1,0),y12=L^1(x 2,0,w+s2),计算 t 1 = L ^ 1 ( r ⃗ ) , t 2 = L ^ 2 ( r ⃗ ) t_1=\hat{L}_1(\vec{r}), t_2=\hat{L}_2(\vec{r}) t1=L^1(r ),t2=L^2(r )
    Prover将 t 1 , t 2 , y 12 , y 21 ∈ Z q t_1,t_2,y_{12},y_{21}\in\mathbb{Z}_q t1,t2,y12,y21Zq 发送给Veirifer。
  • Verifier:发送random challenge c ← R Z q c\leftarrow_R \mathbb{Z}_q cRZq 给Prover。
  • Prover:发送 z ⃗ = ( x ⃗ 1 , u + s 1 , 0 ) c + ( x ⃗ 2 , 0 , w + s 2 ) c 2 + r ⃗ \vec{z}=(\vec{x}_1,u+s_1,0)c+(\vec{x}_2,0,w+s_2)c^2+\vec{r} z =(x 1,u+s1,0)c+(x 2,0,w+s2)c2+r 给Verifier。
  • Verifier:验证 L ^ 1 ( z ⃗ ) = c 2 y 12 + t 1 , L ^ 2 ( z ⃗ ) = c y 21 + t 2 \hat{L}_1(\vec{z})=c^2y_{12}+t_1, \hat{L}_2(\vec{z})=cy_{21}+t_2 L^1(z )=c2y12+t1,L^2(z )=cy21+t2

将以上阶段1、2、3整合在一起,即可形成4-move protocol for relation R s h e l l R_{shell} Rshell Π s h e l l \Pi_{shell} Πshell,其communication cost为:
P → V P\rightarrow V PV 5 5 5 elements of G \mathbb{G} G n + 11 n+11 n+11 elements of Z q \mathbb{Z}_q Zq
V → P V\rightarrow P VP 2 2 2 elements of Z q \mathbb{Z}_q Zq

整个 Π s h e l l \Pi_{shell} Πshell protocol为:【具有perfectly complete, special honest verifier zero-knowledge and computationally (2,3)-special sound, under the discrete logarithm assumption。】
在这里插入图片描述

5.3.2 场景二 Prover commit to the coordinates of x ⃗ \vec{x} x individually

此时,Prover有 s s s 个individual Pedersen commitments P i P_i Pi to v i ∈ Z q v_i\in\mathbb{Z}_q viZq

针对的情形为:【即证明某compact commitment的openings依次为某些individual commitments的opening v 1 , ⋯   , v s v_1,\cdots,v_s v1,,vs + 随机数 r r r + auxiliary data a u x → \overrightarrow{aux} aux 。】

  • public info:individual commitments P 1 , ⋯   , P s P_1,\cdots, P_s P1,,Ps和compact commitment [ y ⃗ ] [\vec{y}] [y ],generators g , h ∈ G , g ⃗ ∈ G s + 1 , h ⃗ ∈ G t g,h\in\mathbb{G}, \vec{g}\in\mathbb{G}^{s+1},\vec{h}\in\mathbb{G}^t g,hG,g Gs+1,h Gt
  • private info: v 1 , ⋯   , v s ∈ Z q v_1,\cdots,v_s\in\mathbb{Z}_q v1,,vsZq γ 1 , ⋯   , γ s ∈ Z q \gamma_1,\cdots,\gamma_s\in\mathbb{Z}_q γ1,,γsZq 以及 a u x → ∈ Z q t \overrightarrow{aux}\in\mathbb{Z}_q^t aux Zqt,和 y ⃗ = ( y 1 , y 2 , ⋯   , y s , r , a u x → ) = ( y ⃗ ’ , a u x → ) ∈ Z q s + 1 + t \vec{y}=(y_1,y_2,\cdots,y_s,r, \overrightarrow{aux})=(\vec{y}’, \overrightarrow{aux})\in\mathbb{Z}_q^{s+1+t} y =(y1,y2,,ys,r,aux )=(y ,aux )Zqs+1+t
  • relation:for 1 ≤ i ≤ s 1\leq i\leq s 1is,有 P i = g v i h γ i ∧ v i = y i P_i=g^{v_i}h^{\gamma_i}\wedge v_i=y_i Pi=gvihγivi=yi以及 [ y ⃗ ] = g ⃗ y ⃗ ’ h ⃗ a u x → [\vec{y}]=\vec{g}^{\vec{y}’}\vec{h}^{\overrightarrow{aux}} [y ]=g y h aux

相应的协议 Π P \Pi_P ΠP的基本思路为:【引入linear form L a ( x ⃗ ) = x s + 1 + ∑ i = 1 s a i x i L_a(\vec{x})=x_{s+1}+\sum_{i=1}^{s}a^ix_i La(x )=xs+1+i=1saixi 来证明 v i = y i v_i=y_i vi=yi。】

  • Prover:需要对compact commitment中的 r ∈ Z q r\in\mathbb{Z}_q rZq进行commit,引入blinding random factor ρ ← R Z q \rho\leftarrow_R \mathbb{Z}_q ρRZq,计算 A = g r h ρ A=g^rh^{\rho} A=grhρ
    Prover将commitment A ∈ G A\in\mathbb{G} AG发送给Verifier。
  • Verifier:发送random challenge c ← R Z q c\leftarrow_R\mathbb{Z}_q cRZq 发送给Prover。
  • Prover:计算 z = r + ∑ i = 1 s c i v i , ϕ = ρ + ∑ i = 1 s c i γ i z=r+\sum_{i=1}^{s}c^iv_i,\phi=\rho+\sum_{i=1}^{s}c^i\gamma_i z=r+i=1scivi,ϕ=ρ+i=1sciγi
    Prover将 z , ϕ ∈ Z q z,\phi\in\mathbb{Z}_q z,ϕZq 发送给Verifier。
  • Verifier:验证 g z h ϕ = A ∏ i = 1 s P c i g^zh^{\phi}=A\prod_{i=1}^{s}P^{c^i} gzhϕ=Ai=1sPci
  • Prover和Verifier:构建linear form L c ( x ⃗ ) = x s + 1 + ∑ i = 1 s c i x i L_c(\vec{x})=x_{s+1}+\sum_{i=1}^{s}c^ix_i Lc(x )=xs+1+i=1scixi
    接着,Prover和Verifier运行 Π N U L L I T Y ( [ y ⃗ ] , L c − z ; y ⃗ ) \Pi_{NULLITY}([\vec{y}],L_c-z;\vec{y}) ΠNULLITY([y ],Lcz;y ) 协议。

Π P \Pi_P ΠP 协议详细流程为:
在这里插入图片描述
在这里插入图片描述

6. 借助Arithmetic circuits来证明nonlinear relations

借助 Π c \Pi_c Πc协议,实现对任意arithmetic circuits的efficient zero-knowledge arguments。
考虑的情况为:
arithmetic circuits C C C over Z q \mathbb{Z}_q Zq with n n n 个 inputs, s s s 个 outputs 和 m m m个乘法门。其中的加法门和乘法门具有2 fan-in和unbounded fan-out。
加法门的数量并不重要,scalar multiplication gates (常量乘法门,即如 c 1 = 5 a 1 c_1=5a_1 c1=5a1)的数量也不重要。所以 m m m仅代表两个输入都为变量的乘法门数量。
将circuit的输入编号为 1 , ⋯   , n 1,\cdots,n 1,,n,乘法门编号为 1 , ⋯   , m 1,\cdots,m 1,,m

本文借鉴改进了以下技术:

6.1 basic circuit satisfiability

考虑以下basic circuit satisfiability场景:
Prover shows that it knows an input x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn for which the arithmetic circuit C C C evaluates to 0 0 0
即需要为circuit satisfiability relation R c s R_{cs} Rcs 构建ZK protocol:
R c s = { ( C ; x ⃗ ) : C ( x ⃗ ) = 0 } R_{cs}=\{(C;\vec{x}): C(\vec{x})=0\} Rcs={(C;x ):C(x )=0}

本文采用的是commit and prove 范式,即:

  • Prover commits to the witness x ⃗ \vec{x} x
  • 然后Prover proves that it satisfies the required relation。

C C C 为 an affine map,如没有乘法门,则Prover可commit to x ⃗ \vec{x} x ,然后运行 Π N U L L I T Y ( [ x ⃗ , C ; x ⃗ ] ) \Pi_{NULLITY}([\vec{x},C;\vec{x}]) ΠNULLITY([x ,C;x ]) 协议。这样,相应的加法门和scalar multiplications都处理了,因为 Π c \Pi_{c} Πc协议允许the opening of arbitrary linear forms。
乘法门则通过改进[CDP12]中的技术来处理。[CDP12] 中的主要成果是:
构建了 ∑ \sum -protocol来show correctness of m m m 个 multiplication triples ( α i , β i , γ i ) (\alpha_i,\beta_i,\gamma_i) (αi,βi,γi)

  • Prover:选择随机多项式 f ( X ) ∈ Z q [ X ] ≤ m f(X)\in\mathbb{Z}_q[X]_{\leq m} f(X)Zq[X]m 用于定义 a packed secret sharing of the vector ( α 1 , ⋯   , α m ) (\alpha_1,\cdots,\alpha_m) (α1,,αm);再选择一个随机多项式 g ( X ) ∈ Z q [ X ] ≤ m g(X)\in\mathbb{Z}_q[X]_{\leq m} g(X)Zq[X]m 用于定义a packed secret sharing of the vector ( β 1 , ⋯   , β m ) (\beta_1,\cdots,\beta_m) (β1,,βm);Prover计算两个多项式的乘积 h ( X ) = f ( X ) g ( X ) h(X)=f(X)g(X) h(X)=f(X)g(X) of degree ≤ 2 m < q \leq 2m<q 2m<q
  • Prover:commits to the vector
    y ⃗ = ( α 1 , ⋯   , α m , β 1 , ⋯   , β m , f ( 0 ) , g ( 0 ) , h ( 0 ) , h ( 1 ) , ⋯   , h ( 2 m ) ) ∈ Z q 4 m + 3 \vec{y}=(\alpha_1,\cdots,\alpha_m,\beta_1,\cdots,\beta_m,f(0),g(0),h(0),h(1),\cdots,h(2m))\in\mathbb{Z}_q^{4m+3} y =(α1,,αm,β1,,βm,f(0),g(0),h(0),h(1),,h(2m))Zq4m+3
    in a single compact commitment [ y ⃗ ] [\vec{y}] [y ],然后将commitment [ y ⃗ ] [\vec{y}] [y ] 发送给Verifier。
    注意,根据Lagrange插值,多项式 f ( X ) , g ( X ) , h ( X ) f(X),g(X),h(X) f(X),g(X),h(X)可由vector y ⃗ \vec{y} y 唯一确定。
  • Verifier:选择不同于 1 , ⋯   , m 1,\cdots,m 1,,m 的random challenge c ∈ Z q c\in\mathbb{Z}_q cZq,将 c c c 发送给Prover。
  • Public linear combinations of the coefficients of y ⃗ \vec{y} y define three values: u = f ( c ) , v = g ( c ) , w = h ( c ) u=f(c),v=g(c),w=h(c) u=f(c),v=g(c),w=h(c)。These values are opened and the verifier checks whether w = u v w=uv w=uv。 Prover作弊的概率不高于 2 m / ( q − m ) 2m/(q-m) 2m/(qm),honest-verifier zero-knowledge essentially follows from 1-privacy of the secret sharing scheme。

本文将[CDP12]中的以上方法调整为适用于circuit satisfiability场景:
设置 C : Z q n → Z q s C: \mathbb{Z}_q^n\rightarrow \mathbb{Z}_q^s C:ZqnZqs 为具有 m m m 个乘法门的arbitrary arithmetic circuits。
考虑 the computation graph induced by evaluation at input-vector x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn
乘法门的输出以 γ 1 , ⋯   , γ m ∈ Z q \gamma_1,\cdots,\gamma_m\in\mathbb{Z}_q γ1,,γmZq表示;
对于每个 1 ≤ i ≤ m 1\leq i\leq m 1im ( α i , β i ) ∈ Z q 2 (\alpha_i,\beta_i)\in\mathbb{Z}_q^2 (αi,βi)Zq2 为第 i i i个乘法门的输入;
ω ∈ Z q s \omega\in\mathbb{Z}_q^s ωZqs 为circuit的输出。
则:

  • 1)对于每个 1 ≤ i ≤ m 1\leq i\leq m 1im,存在 affine forms:
    u i , v i : Z q n + m → Z q u_i,v_i: \mathbb{Z}_q^{n+m}\rightarrow \mathbb{Z}_q ui,vi:Zqn+mZq
    depending only on C C C,使得对所有的 x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn,使得:
    α i = u i ( x ⃗ , γ 1 , ⋯   , γ m ) , β i = v i ( x ⃗ , γ 1 , ⋯   , γ m ) \alpha_i=u_i(\vec{x},\gamma_1,\cdots,\gamma_m),\beta_i=v_i(\vec{x},\gamma_1,\cdots, \gamma_m) αi=ui(x ,γ1,,γm),βi=vi(x ,γ1,,γm)
    都成立。
    该affine forms由加法门和scalar multiplication(常量乘法门)唯一确定。

  • 2)存在affine function:
    w : Z q n + m → Z q s w: \mathbb{Z}_q^{n+m}\rightarrow \mathbb{Z}_q^s w:Zqn+mZqs
    使得对所有的 x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn,使得:
    ω = w ( x ⃗ , γ 1 , ⋯   , γ m ) \omega=w(\vec{x},\gamma_1,\cdots,\gamma_m) ω=w(x ,γ1,,γm)
    都成立。

也就是说,当且仅当 u i ( x ⃗ , γ 1 , ⋯   , γ m ) ⋅ v i ( x ⃗ , γ 1 , ⋯   , γ m ) = γ i u_i(\vec{x},\gamma_1,\cdots,\gamma_m)\cdot v_i(\vec{x},\gamma_1,\cdots,\gamma_m)=\gamma_i ui(x ,γ1,,γm)vi(x ,γ1,,γm)=γi (for i = 1 , ⋯   , m i=1,\cdots,m i=1,,m) 以及 w ( x ⃗ , γ 1 , ⋯   , γ m ) = 0 w(\vec{x},\gamma_1,\cdots,\gamma_m)=0 w(x ,γ1,,γm)=0都成立时,有 pair ( x ⃗ , γ 1 , ⋯   , γ m ) ∈ Z q n × Z q m (\vec{x},\gamma_1,\cdots,\gamma_m)\in\mathbb{Z}_q^n\times \mathbb{Z}_q^m (x ,γ1,,γm)Zqn×Zqm 可completed to an accepting computation graph。

根据multiplication-triples 方法,可做如下调整:

  • Prover在 y ⃗ \vec{y} y 中增加input vector x ⃗ \vec{x} x ,而将 α i , β i \alpha_i,\beta_i αi,βi从中去除,调整为:
    y ⃗ = ( x ⃗ , f ( 0 ) , g ( 0 ) , h ( 0 ) , h ( 1 ) , ⋯   , h ( 2 m ) ) ∈ Z q n + 2 m + 3 \vec{y}=(\vec{x},f(0),g(0),h(0),h(1),\cdots,h(2m))\in\mathbb{Z}_q^{n+2m+3} y =(x ,f(0),g(0),h(0),h(1),,h(2m))Zqn+2m+3
    其中 ( x ⃗ , γ 1 , ⋯   , γ m ) = ( x ⃗ , h ( 1 ) , ⋯   , h ( m ) ) (\vec{x},\gamma_1,\cdots,\gamma_m)=(\vec{x},h(1),\cdots,h(m)) (x ,γ1,,γm)=(x ,h(1),,h(m)) y ⃗ \vec{y} y 的subvector。【注意,仍然保持 f ( i ) = α i , g ( i ) = β i f(i)=\alpha_i,g(i)=\beta_i f(i)=αi,g(i)=βi来唯一确定多项式 f ( X ) , g ( X ) f(X),g(X) f(X),g(X),只是此时 α i = u i ( x ⃗ , γ 1 , ⋯   , γ m ) , β i = v i ( x ⃗ , γ 1 , ⋯   , γ m ) \alpha_i=u_i(\vec{x},\gamma_1,\cdots,\gamma_m),\beta_i=v_i(\vec{x},\gamma_1,\cdots, \gamma_m) αi=ui(x ,γ1,,γm),βi=vi(x ,γ1,,γm)。】
  • Prover对以上调整后的 y ⃗ \vec{y} y 进行compactly commit。
  • 接下来,Prover需要证明:
    (1) w ( x ⃗ , γ 1 , ⋯   , γ m ) = 0 w(\vec{x},\gamma_1,\cdots,\gamma_m)=0 w(x ,γ1,,γm)=0;【可直接允许 Π N U L L I T Y \Pi_{NULLITY} ΠNULLITY协议。】
    (2) α i ⋅ β i = γ i \alpha_i\cdot \beta_i=\gamma_i αiβi=γi for all 1 ≤ i ≤ m 1\leq i\leq m 1im,其中的 α i = u i ( x ⃗ , γ 1 , ⋯   , γ m ) , β i = v i ( x ⃗ , γ 1 , ⋯   , γ m ) \alpha_i=u_i(\vec{x},\gamma_1,\cdots,\gamma_m),\beta_i=v_i(\vec{x},\gamma_1,\cdots, \gamma_m) αi=ui(x ,γ1,,γm),βi=vi(x ,γ1,,γm),即可将 α i , β i \alpha_i,\beta_i αi,βi看成是affine functions u i , v i u_i,v_i ui,vi ( x ⃗ , γ 1 , ⋯   , γ m ) (\vec{x},\gamma_1,\cdots,\gamma_m) (x ,γ1,,γm)的evaluation值,其实也可将其看成是在 y ⃗ \vec{y} y 的evaluation值。【多项式 f ( X ) , g ( X ) f(X),g(X) f(X),g(X)仍然由Prover’s compact commitment to y ⃗ \vec{y} y 唯一确定。也就是说,the randomness underlying its selection ρ = f ( 0 ) \rho=f(0) ρ=f(0)仍被包含在 y ⃗ \vec{y} y 中。根据 f ( 0 ) = ρ f(0)=\rho f(0)=ρ f ( i ) = α i   ( i = 1 , ⋯   , m ) f(i)=\alpha_i\ (i=1,\cdots,m) f(i)=αi (i=1,,m)可唯一确定degree ≤ m \leq m m 的多项式 f ( X ) f(X) f(X),从而 f ( c ) f(c) f(c)的值可通过合适的affine map evaluate at y ⃗ \vec{y} y 来计算获得。同理,由于 y ⃗ \vec{y} y 中包含了 ρ ’ = g ( 0 ) \rho’=g(0) ρ=g(0),根据 g ( 0 ) = ρ ’ g(0)=\rho’ g(0)=ρ g ( i ) = β i   ( i = 1 , ⋯   , m ) g(i)=\beta_i\ (i=1,\cdots,m) g(i)=βi (i=1,,m)可唯一确定degree ≤ m \leq m m 的多项式 g ( X ) g(X) g(X),从而 g ( c ) g(c) g(c)的值可通过合适的affine map evaluate at y ⃗ \vec{y} y 来计算获得。 h ( X ) = f ( X ) g ( X ) h(X)=f(X)g(X) h(X)=f(X)g(X),其它规则仍跟之前一样。】

注意:
对于 m m m阶多项式 f ( X ) f(X) f(X),可由 m + 1 m+1 m+1个不同的插值 ( x 0 , f ( x 0 ) ) , ( x 1 , f ( x 1 ) ) , ⋯ ( x m , f ( x m ) ) (x_0,f(x_0)), (x_1,f(x_1)),\cdots (x_m,f(x_m)) (x0,f(x0)),(x1,f(x1)),(xm,f(xm))来唯一确定: f ( X ) = ∑ k = 0 m ∏ i = 0 , i ≠ k m ( X − x i ) ⋅ f ( x k ) ∏ i = 0 , i ≠ k m ( x k − x i ) f(X)=\sum_{k=0}^{m}\frac{\prod_{i=0,i\neq k}^{m}(X-x_i)\cdot f(x_k)}{\prod_{i=0,i\neq k}^{m}(x_k-x_i)} f(X)=k=0mi=0,i=km(xkxi)i=0,i=km(Xxi)f(xk)
对于本文,实际插值点分别为 ( 0 , f ( 0 ) ) , ( 1 , f ( 1 ) ) , ⋯   , ( m , f ( m ) ) (0,f(0)),(1,f(1)),\cdots,(m,f(m)) (0,f(0)),(1,f(1)),,(m,f(m)),因此,相应的 f ( X ) = ∑ k = 0 m ∏ i = 0 , i ≠ k m ( X − i ) ⋅ f ( k ) ∏ i = 0 , i ≠ k m ( k − i ) f(X)= \sum_{k=0}^{m}\frac{\prod_{i=0,i\neq k}^{m}(X-i)\cdot f(k)}{\prod_{i=0,i\neq k}^{m}(k-i)} f(X)=k=0mi=0,i=km(ki)i=0,i=km(Xi)f(k)。此时, f ( X ) f(X) f(X)可看成是基于 ρ , α 1 , ⋯   , α m \rho,\alpha_1,\cdots,\alpha_m ρ,α1,,αm的linear form。(此时 ρ , α 1 , ⋯   , α m \rho,\alpha_1,\cdots,\alpha_m ρ,α1,,αm为secret value。)
α i = u i ( x ⃗ , γ 1 , ⋯   , γ m ) \alpha_i=u_i(\vec{x}, \gamma_1,\cdots,\gamma_m) αi=ui(x ,γ1,,γm)为linear form,所以 f ( X ) f(X) f(X)可看成是双层linear form。

最终的communication cost与circuit的输出数量 s s s无关。相应的circuit证明协议 Π c s \Pi_{cs} Πcs为:
在这里插入图片描述

在这里插入图片描述
类似于5.3.1节、5.3.2节的场景一、场景二:
在这里插入图片描述
相应的证明分别为 Π c s ( 1 ) \Pi_{cs}^{(1)} Πcs(1) Π c s ( 2 ) \Pi_{cs}^{(2)} Πcs(2)
在这里插入图片描述
在这里插入图片描述

7. 构建range proof

range proof,即Prover 需证明 a secret committed integer v v v in a public range,如 [ 0 , 2 n − 1 ] [0,2^{n-1}] [0,2n1]
本文主要考虑2种情况:
1)a secret committed integer v v v in a public range,如 [ 0 , 2 n − 1 ] [0,2^{n-1}] [0,2n1]
2)many different integer commitments are all in some fixed range。

7.1 basic range proof

basic 场景为:
Prover commit to the integer v ∈ { 0 , ⋯   , 2 n − 1 } v\in\{0,\cdots,2^{n-1}\} v{0,,2n1} 和 the required auxiliary data a u x → \overrightarrow{aux} aux at once in a single compact commitment

接下来考虑的场景为:
Prover不直接对 v v v进行commit,而是对其二进制位表示 b ⃗ ∈ Z q n \vec{b}\in\mathbb{Z}_q^n b Zqn进行commit。此时, v v v can be computed as linear form evaluated at b b b,因此,a compact commitment to b ⃗ \vec{b} b is an implicit commitment to v v v。To show that v v v is in the range [ 0 , 2 n − 1 ] [0,2^{n-1}] [0,2n1], the prover now only has to convince the verifier that the committed vector b ⃗ \vec{b} b is comprised of 0’s and 1’s, which can be done by a simple application of the circuit Z K ZK ZK protocol Π c s \Pi_{cs} Πcs
最终,可定义circuit为:
C : Z q n → Z q n , x ⃗ ↦ x ⃗ ∗ ( 1 ⃗ − x ⃗ ) C: \mathbb{Z}_q^n\rightarrow \mathbb{Z}_q^n,\vec{x}\mapsto \vec{x}*(\vec{1}-\vec{x}) C:ZqnZqn,x x (1 x )
相应的range proof relation R r R_r Rr为:
R r = { ( C ; b ⃗ ) : C ( b ⃗ ) = 0 ⃗ } R_r=\{(C;\vec{b}): C(\vec{b})=\vec{0}\} Rr={(C;b ):C(b )=0 }

基于以下观察做了相应调整:
1)由于所有的multiplication inputs具有的形式为 α \alpha α 1 − α 1-\alpha 1α,则,与其借助随机多项式 g ( X ) g(X) g(X),此时可定义multiplication gates右侧输入为 g ( X ) = 1 − f ( X ) g(X)=1-f(X) g(X)=1f(X)
2)由于所有的multiplication gates输出都为0,即有 h ( 1 ) = h ( 2 ) = ⋯ = h ( n ) = 0 h(1)=h(2)=\cdots=h(n)=0 h(1)=h(2)==h(n)=0,因此这些值没必要包含在compact commitment中。

相应的range proof证明 Π r \Pi_{r} Πr 为:
在这里插入图片描述
在这里插入图片描述

7.2 aggregate range proof

针对的情况为:
Prover证明 s s s个Pedersen commitments to v 1 , ⋯   , v s ∈ Z q v_1,\cdots,v_s\in\mathbb{Z}_q v1,,vsZq 都在range [ 0 , 2 n − 1 ] [0,2^{n-1}] [0,2n1]
相应的relation标识为 R r ( s ) R_r^{(s)} Rr(s),相应的证明过程表示为 Π r ( s ) \Pi_{r}^{(s)} Πr(s):【可借助5.3节场景二中的compactification技术,来获取a single compact commitment to the n s ns ns bits of the s s s committed values together with the auxiliary data required to prove their correctness。】
在这里插入图片描述

8. 基于Strong-RSA假设

以上实现都是基于discrete logarithmic assumption,接下来考虑基于Strong-RSA assumption来实现相应协议。

使用Pedersen vector commitment scheme的一个主要缺陷是所需generators的数量与vector dimension成正比。如需commit to an n n n-dimensional vector,则需要 n + 1 n+1 n+1 generators of the group G \mathbb{G} G。同时,对于compressed ∑ \sum -protocol Π c \Pi_c Πc,其verification time与dimension n n n呈正比。

另外,参见论文[FO97,DF02], vector commitment scheme也可以通过unknown order group G \mathbb{G} G来实现,详细可参看Bu¨nz等人2020年论文《Transparent snarks from DARK compilers》。(可参见博客 Supersonic Transparent SNARKs from DARK Compilers学习笔记
在Supersonic论文中,构建了a polynomial commitment scheme,允许Prover to commit to a polynomial f ∈ Z q [ X ] f\in\mathbb{Z}_q[X] fZq[X] of arbitrary degree, via a unique integer representation of its coefficient vector。A commitment to such a representation 仅需要2个group elements g , h ∈ G g,h\in\mathbb{G} g,hG
在Supersonic论文中展示了如何open arbitrary evaluations f ( a ) ∈ Z q f(a)\in\mathbb{Z}_q f(a)Zq of a committed polynomial without revealing any additional information about f f f。且在polynomial evaluation protocol中使用了类似Bulletproofs的recursive技术。具有logarithmic communication complexity。同时,Supersonic借助Proof of Exponentiation (PoE) 技术,实现了logarithmic verification time。

本文在Supersonic的基础上进行了改进,使得支持vector commitment scheme with linear form openings。

8.1 integer commitment scheme

参照[DF02] Damg˚ard 等人2002年论文《A statistically-hiding integer commitment scheme based on groups with hidden order》中的定义。integer commitment scheme的commitment space为a group G \mathbb{G} G of unknown order,如an RSA group或者a class group。尽管the exact order of G \mathbb{G} G 是未知的,但是可假设order的upper bound为 B B B,即 ∣ G ∣ ≤ B |\mathbb{G}|\leq B GB

integer commitment scheme 的setup phase会生成2个random group elements g , h ∈ G g,h\in\mathbb{G} g,hG,使得两者都可generate the same subgroup of G \mathbb{G} G
此时,对于random γ \gamma γ from [ 0 , B ⋅ 2 K ) [0,B\cdot 2^{\mathcal{K}}) [0,B2K)(其中 K \mathcal{K} K为security parameter), h γ h^{\gamma} hγ的distribution将exponentially close to the uniform distribution on < g > <g> <g>。因此,对于任意的integer x x x [ x ] = g x h γ [x]=g^xh^{\gamma} [x]=gxhγ将statistically hides x x x
直观地,binding属性则源于Prover不知道the order of G \mathbb{G} G,正式的证明binding 属性源于the root assumption,具体参见论文[DF02, BFS20]。

Vector Encoding scheme采用了Supersonic中的算法:

  • 首先将vector x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn lift为unique representative in Z ( q − 1 2 ) n = { x ⃗ ∈ Z n : ∣ ∣ x ⃗ ∣ ∣ ∞ } \mathbb{Z}(\frac{q-1}{2})^n=\{\vec{x}\in\mathbb{Z}^n: ||\vec{x}||_{\infty}\} Z(2q1)n={x Zn:x }
  • 然后,对于任意的 b ∈ Z b\in\mathbb{Z} bZ Q > 2 b Q>2b Q>2b,相应的encoding算法为:
    E n c o d e : Z ( b ) n → Z , x ⃗ ↦ ∑ i = 1 n x i Q i − 1 Encode: \mathbb{Z}(b)^n\rightarrow \mathbb{Z},\vec{x}\mapsto \sum_{i=1}^{n}x_iQ^{i-1} Encode:Z(b)nZ,x i=1nxiQi1

由于 Q > 2 b Q>2b Q>2b,该encoding算法为injective的。对于 x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn x ⃗ ∈ Z ( b ) n \vec{x}\in\mathbb{Z}(b)^n x Z(b)n,可将其integer encoding结果表示为 x ^ ∈ Z \hat{x}\in\mathbb{Z} x^Z。而a commitment [ x ⃗ ] [\vec{x}] [x ] to a vector x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn或者 x ⃗ ∈ Z ( b ) n \vec{x}\in\mathbb{Z}(b)^n x Z(b)n 为 an integer commitment to x ^ \hat{x} x^

以上流程即生成了a compact vector commitment scheme:
[ ⋅ ] : Z q n → G [\cdot]: \mathbb{Z}_q^n\rightarrow \mathbb{G} []:ZqnG

对于linear form L : Z q n → Z q L:\mathbb{Z}_q^n\rightarrow\mathbb{Z}_q L:ZqnZq,该commitment scheme具有basic ∑ \sum -protocol for relation R Z q R_{\mathbb{Z}_q} RZq
R Z q = { ( P ∈ G , u ∈ Z q , Q ∈ Z , L ; x ⃗ ∈ Z q n , γ ∈ Z q n ) : P = g x ^ h γ , L ( x ⃗ ) = u , Q > q } R_{\mathbb{Z}_q}=\{(P\in\mathbb{G},u\in\mathbb{Z}_q,Q\in\mathbb{Z},L; \vec{x}\in\mathbb{Z}_q^n,\gamma\in\mathbb{Z}_q^n): P=g^{\hat{x}}h^{\gamma}, L(\vec{x})=u,Q>q\} RZq={(PG,uZq,QZ,L;x Zqn,γZqn):P=gx^hγ,L(x )=u,Q>q}

此处的 ∑ \sum -protocol与第3节的 Π 0 \Pi_0 Π0 protocol的最大不同之处在于:
此处的 ∑ \sum -protocol 具有statistically hiding属性,且all exponents are sampled from subsets of Z \mathbb{Z} Z,因此Verifier需要验证the final response is of bounded norm。
Supersonic中也有类似的对 R Z q R_{\mathbb{Z}_q} RZq的证明协议:
在这里插入图片描述
由于以上协议传递的 z ⃗ ∈ Z n \vec{z}\in\mathbb{Z}^n z Zn,以trivial PoK for relation R Z R_{\mathbb{Z}} RZ 为例:【PoK和PoE的区别参看博客 Proof (of knowledge) of exponentiation
R Z = { ( P ∈ G , u ∈ Z q , Q , b ∈ z , L ; x ⃗ ∈ Z n ) : ∣ ∣ x ⃗ ∣ ∣ ∞ ≤ b < q , P = g x ^ , L ( x ⃗ ) = u   m o d   q } R_{\mathbb{Z}}=\{(P\in\mathbb{G},u\in\mathbb{Z}_q,Q,b\in\mathbb{z},L; \vec{x}\in\mathbb{Z}^n): ||\vec{x}||_{\infty}\leq b<q, P=g^{\hat{x}}, L(\vec{x})=u \ mod\ q\} RZ={(PG,uZq,Q,bz,L;x Zn):x b<q,P=gx^,L(x )=u mod q}

可借助Bulletproofs的recursive思想,构建more efficient PoK for relation R Z R_{\mathbb{Z}} RZ,以下Protocol 13 表示了 one iteration of the recursion, 重复该recursion O ( log ⁡ n ) O(\log n) O(logn)次,将result in a logarithmic complexity。必须注意到,其中的bound b b b将在每一轮都增加,因此,所选择的encoding 参数 Q Q Q必须足够大。Verifier为了避免计算first move之后的large expensive exponentiation (此处为 A R Q n 2 A_R^{Q^{\frac{n}{2}}} ARQ2n),可如Supersonic的polynomial evaluation protocol类似,引入Proof of Exponentiation 算法,来降低verification time。
同时Protocol 13中与基于discrete logarithmic assumption的compression Π c \Pi_c Πc不同,the linear form evaluation L ( x ⃗ ) L(\vec{x}) L(x ) 未包含在commitment中,因此cross terms A R A_R AR A L A_L AL are part of the first message。
【参看博客 Proof (of knowledge) of exponentiation 中第二节有安全隐患的攻击,必须要求 g g g包含在CRS中。】
在这里插入图片描述

9. 基于KEA假设

本文也可基于Knowledge-of-Exponent Assumption (KEA),来构建 vector commitment scheme with compact linear form openings。
基于KEA假设,可将第6节的 Π c s \Pi_{cs} Πcs的communication complexity由logarithmic reduce为constant,需要a trusted setup that depends on the arithmetic circuit under consideration。

KEA并不是一种难解的假设,it is unfalsifiable [Nao03, BCPR14]。因此KEA的应用目前仍然有争议。

接下来,将介绍基于KEA构建的vector commitment scheme以及相应的ZK protocol for opening linear forms。
本文主要基于Groth 2010年论文《Short pairing-based non-interactive zero-knowledge arguments》中的技术,并做了点小调整:

  • A compact commitment to a vector x ⃗ ∈ Z q n \vec{x}\in\mathbb{Z}_q^n x Zqn,实际为a Pedersen vector commitment P = h γ g ⃗ x ⃗ P=h^{\gamma}\vec{g}^{\vec{x}} P=hγg x
  • A ZKPoK of knowing an opening to P P P is another Pedersen commitment P ′ P' P to x ⃗ \vec{x} x ,基于相同的randomness γ \gamma γ,但是使用一组不同的generators h ′ = h α , g 1 ′ = g 1 α , ⋯   , g n ′ = g n α h'=h^\alpha,g_1'=g_1^{\alpha},\cdots,g_n'=g_n^{\alpha} h=hα,g1=g1α,,gn=gnα,其中 α ∈ Z q \alpha\in\mathbb{Z}_q αZq为 sampled uniformly at random in the trusted setup phase and is only shared with a designated verifier。
  • 以上两组generators都是public的,且作为common reference string的一部分。designated Verifier仅需验证 P ′ = P α P'=P^{\alpha} P=Pα成立即可。

Knowledge-of-Exponent Assumption 描述的是:
若an adversary 能够计算pairs ( P , P ′ ) (P,P') (P,P),满足 P ′ = P α P'=P^{\alpha} P=Pα,则意味着其要么知道 α \alpha α,要么其知道an opening to P P P

由此可知,correctness和zero-knowledge都满足。以上ZKPoK为non-interactive,其size也与dimension n n n无关。

以上ZKPoK为designated Verifier,要扩展至public verifiable的话,需要:
引入a bilinear pairing e : G × G → G t e: \mathbb{G}\times \mathbb{G}\rightarrow \mathbb{G}_t e:G×GGt,这样就可以在不知道 α \alpha α的情况下,Verifier仅需验证 e ( P , h ′ ) = e ( h , P ′ ) e(P,h')=e(h,P') e(P,h)=e(h,P)是否成立即可。

为了证明the committed vector x ⃗ \vec{x} x 满足a linear form relation L ( x ⃗ = u ) L(\vec{x}=u) L(x =u),则需要对generators做特别设置:for all 1 ≤ i ≤ n 1\leq i\leq n 1in g i = h β i g_i=h^{\beta^i} gi=hβi,其中 β ∈ Z q \beta\in\mathbb{Z}_q βZq为secret值。所引申的即为 n n n-power Knowledge-of-Exponenet Assumption (n-PKEA)。

Groth 在其2010年论文《Short pairing-based non-interactive zero-knowledge arguments》中之处,借助以上generators特别设置,以及bilinear pairing,可实现efficient circuit ZK protocol。本文希望prove correctness of a linear form evaluation,可基于如下观察:
a ⃗ = ( a 1 , ⋯   , a n ) ∈ Z q n \vec{a}=(a_1,\cdots,a_n)\in\mathbb{Z}_q^n a =(a1,,an)Zqn 使得 L ( z ⃗ ) = < a ⃗ , z ⃗ > L(\vec{z})=<\vec{a},\vec{z}> L(z )=<a ,z > for all z ⃗ ∈ Z q n \vec{z}\in\mathbb{Z}_q^n z Zqn,可定义如下多项式:
f ( Y ) = γ + ∑ i = 1 n x i Y i f(Y)=\gamma+\sum_{i=1}^{n}x_iY^i f(Y)=γ+i=1nxiYi
g ( Y ) = ∑ i = 0 n − 1 Y i g(Y)=\sum_{i=0}^{n-1}Y^i g(Y)=i=0n1Yi
h ( Y ) = f ( Y ) g ( Y ) = ∑ i = 0 2 n − 1 c i Y i h(Y)=f(Y)g(Y)=\sum_{i=0}^{2n-1}c_iY^i h(Y)=f(Y)g(Y)=i=02n1ciYi
则有 the n n n-th coefficient of h ( Y ) h(Y) h(Y)等于 c n = < x ⃗ , a ⃗ > = L ( x ⃗ ) c_n=<\vec{x},\vec{a}>=L(\vec{x}) cn=<x ,a >=L(x )

基于以上观察,Groth 2010年论文《Short pairing-based non-interactive zero-knowledge arguments》第六章中的Hadamard product argument 可进行相应改进,从而形成a constant size ZKPoK for the correctness of a linear form evaluation。(也可参看博客 Short Pairing-based Non-interactive Zero-Knowledge Arguments 第2节的Hadamard Product argument)

对于circuit ZK protocol,可继续沿用第6节中的技术来linearize the non-linearities in a black-box manner。而[GGPR13, Gro16] 等其它基于KEA构建的 circuit ZK protocol,都需要将 arithmetic circuit转换为quadratic span programs 或 QSPs等,本文斌更不需要这种转换,但是本文的linearization 技术将 render our solution interactive (although in a setting where Fiat-Shamir applies)。
与基于linearization+DL假设不同,基于linearization+KEA假设构建的circuit ZK protocol具有constant verification complexity,是a ZK-SNARK。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值