proof-carrying data from accumulation schemes学习笔记

1. 引言

B¨unz 等人2020年论文《proof-carrying data from accumulation schemes》,暂无收录信息。

代码实现:

  • https://github.com/scipr-lab/poly-commit 中的ipa_pc

Recursive proof composition可用于incrementally-verifiable computation (IVC)以及proof-carrying data (PCD)。
现有的基于递归调用构造的SNARK,Verifier的验证时间是sublinear in the size of the statement。

Bowe等人2019年论文《Recursive Proof Composition without a Trusted Setup》中构建了特定的recursive composition用于SNARK,使得Verifier time不再是sub-linear了。但是他们在该论文中忽略了具体的细节同时也未能提供相应的security property证明。

在本文,定义了an accumulation scheme for a non-interactive argument,足以构建PCD以及SNARKs,且无需sublinear-time verifier。


要点:
相当于借助 “SNARK+accumulator” 来实现 PCD,对计算中的每个步骤进行验证。
要求accumulator 不随计算步骤的增加而增长,且允许batch延迟验证。
其中accumulator的实现有2种:
– 1)基于discrete logarithm的polynomial commitment P C D L PC_{DL} PCDL 的accumulator设计,参见本博文第5节内容。
– 2)基于 knowledge assumption in bilinear groups 的 polynomial commitment P C A G M PC_{AGM} PCAGM 的accumulator 设计,参见本博文第6节内容。


1.1 What is PCD?

proof-carrying data (PCD) 由Chiesa等人在2010年论文《Proof-Carrying Data and Hearsay Arguments from Signature Cards》中提出,可用于不信任的各方进行分布式无限计算,保证每个计算的中间状态都可以succinctly verified。
PCD支持基于(可能是无限的)有向无环图计算,with messages passed along directed edges。通过为每个message附加一个succinct proof以证明其correctness。
可将PCD看成是incrementally-verifiable computation (IVC) (参见Paul Valiant 2008年论文《Incrementally Verifiable Computation or Proofs of Knowledge Imply Time/Space Efficiency》)的generalization,IVC = PCD for the path graph。

PCD可广泛用于:

现有的构建PCD的方式是基于recursive composition of succinct non-interactive arguments (SNARGs) [BCCT13;BCTV14;COS20](Bitansky等人2013年论文《Recursive Composition and Bootstrapping for SNARKs and Proof-Carrying Data》、Ben-Sasson等人2014年论文《Scalable Zero Knowledge via Cycles of Elliptic Curves》以及Chiesa等人2020年论文《Fractal: Post-Quantum and Transparent Recursive Proofs from Holography》)。证明某个具有 t t t steps的计算被正确执行了,基本思路为:
the t t t-th step of the computation was executed correctly, and there exists a proof that the computation was executed correctly for t − 1 t-1 t1 steps。
现有的实现要求:the statement we are proving does not grow with the number of recursion steps t t t

Bowe等人2019年论文《Recursive Proof Composition without a Trusted Setup》没有verify the previous proof π t − 1 \pi_{t-1} πt1,而是将proof 添加仅accumulator,然后在最终进行verify。同时accumulator must not grow in size。该论文提供了一种特殊的SNARK构建思路,其证明了所构建的SNARK是secure的,但是并没有包含其recursive安全性的相关定义或证明。

借助recursion的SNARK相关研究有:

1.2 本文主要贡献

本文的主要贡献:

  • 引入了accumulation scheme for a predicate Φ : X → { 0 , 1 } \Phi: X\rightarrow \{0,1\} Φ:X{0,1}
    在Bowe等人2019年论文《Recursive Proof Composition without a Trusted Setup》的基础上进行了改进。
    accumulation scheme 可理解为:存在无限的stream q 1 , q 2 , c d o t s q_1,q_2,cdots q1,q2,cdots,其中每个 q i ∈ X q_i\in X qiX
    at time i i i,引入accumulators a c c i acc_i acci,存在以下三种算法(均为stateless):【accumulation prover、accumulation verifier和decider】
    – the accumulation prover receives ( q i , a c c i − 1 ) (q_i,acc_{i-1}) (qi,acci1) and computes a c c i acc_i acci
    – the accumulation verifier receives ( q i , a c c i − 1 , a c c i ) (q_i,acc_{i-1},acc_i) (qi,acci1,acci),然后验证 a c c i − 1 acc_{i-1} acci1 q i q_i qi were correctly accumulated into a c c i acc_i acci,若验证不通过,则流程停止。
    – at any time t t t,decider可validate a c c t acc_t acct, which establishes that, for all i ∈ [ t ] i\in [t] i[t], Φ ( q i ) = 1 \Phi(q_i)=1 Φ(qi)=1
    以上三个算法都是无状态的,为避免trivial construction,要求:
    – 1)accumulation verifier的效率应高于 Φ \Phi Φ
    – 2)accumulator size以及以上三个算法的running time不会随时间而增长。
    any SNARK having an accumulation scheme where the accumulation verifier is sublinear can be used to build a proof-carrying data (PCD) scheme, even if the SNARK verifier is not itself sublinear。Chiesa等人2020年论文《Fractal: Post-Quantum and Transparent Recursive Proofs from Holography》中指出,若SNARK和accumulation scheme为量子安全的,则PCD scheme也为量子安全。而是否存在non-trivial accumulation schemes for post-quantum SNARKs仍是个公开的难题。

[MBKM19; GWC19; CHMMVW20] Maller等人2019年论文《Sonic: Zero-Knowledge SNARKs from Linear-Size Universal and Updateable Structured Reference Strings》、Gabizon等人2019年论文《PLONK: Permutations over Lagrange-bases for Oecumenical Noninteractive arguments of Knowledge》以及 Chiesa等人2020年论文《Marlin: Preprocessing zkSNARKs with Universal and Updatable SRS》中构建的SNARKs,其Verifiers are succinct relative to a specific predicate: checking the opening of a polynomial commitment [KZG10]。

现有的具有accumulation scheme in random oracle model的polynomial commitment scheme主要有两大类:

在这里插入图片描述
对于这两种schemes,the cost of checking that an accumulation step was performed correctly is much less than the cost of checking an evaluation proof。
本文的 accumulation scheme for P C D L PC_{DL} PCDL 是在Bowe等人2019年论文《Halo: Recursive Proof Composition without a Trusted Setup》中的Polynomial commitment的基础上进行了改进。

构建PCD scheme的方式有两种:

  • 通过 P C D L PC_{DL} PCDL:PCD based on discrete logarithms,可构建PCD scheme in the uniform reference string model (如,without secret parameters) and small argument sizes。之前的PCD scheme要么需要structured reference strings [BCTV14],要么需要larger argument sizes ([COS20])。本文的PCD scheme可基于任意的cycle of elliptic curves来实例化。而之前的具有small argument size的PCD scheme需要使用昂贵的cycles of pairing-friendly elliptic cuves [BCTV14; CCW19]。

  • 通过 P C A G M PC_{AGM} PCAGM:lightweight PCD based on bilinear groups。这种PCD scheme中的recursive statement不需要任何的pairing computation check,因为pairing验证推迟到了recursive statement之外。而之前基于pairing-based SNARK构建的PCD scheme则需要check pairing computations。
    本文构建的PCD具有启发意义:instantiate the random oracle of certain SNARK constructions with an appropriate hash function。

1.3 IVC/PCD的相关研究成果

1.3.1 PCD from SNARKs

Bitansky等人2013年论文《Recursive Composition and Bootstrapping for SNARKs and Proof-Carrying Data》中证明了recursive composition of SNARKs for machine computations implies PCD for constant-depth graphs,同时也暗示 IVC for polynomial-time machine computations。为达成recursive composition,从实际效率上考虑,使用preprocessing SNARKs for circuits要优于使用SNARKs for machines [BCTV14; COS20]。相关的实际应用有:Coda项目。[Co17; BMRS20]

当前基于SNARKs构建PCD的思路主要有以下2种:

  • 基于pairing-based SNARKs构建PCD:
    Ben-Sasson等人2014年论文《Scalable Zero Knowledge via Cycles of Elliptic Curves》中使用pairing-based SNARKs with a special algebraic property实现了efficient recursive composition with very small argument sizes (linear in the security parameter λ \lambda λ)。
    使用pairing-based SNARKs具有2个主要缺陷:
    1)需要sampling a structured reference string involving secret values (“toxic waste”),这些有毒垃圾如果泄露,则会影响安全性。
    2)Verifier performs operations over a finite field that is necessarily different from the field supported “natively” by the statement it is checking。为了避免expensive simulation of field arithmetic,构建过程中需要使用pairing-friendly cycles of elliptic curves,从而限制了实际应用时field的选型,为了保证security,往往需要a large base field。

  • 基于IOP-based SNARKs构建PCD:
    Chiesa等人2020年论文《Fractal: Post-Quantum and Transparent Recursive Proofs from Holography》中使用holographic IOP构建了一种preprocessing SNARK,在(quantum) random oracle model下是无条件安全的,是一种post-quantum preprocessing SNARK in the uniform reference string model (i.e., without toxic waste)。在该论文中z横眉了任意的抗量子攻击SNARK可通过recursive composition产生抗量子攻击的PCD scheme。主要缺点在于:基于现有的holographic IOPs,其argument size很大,为 O ( λ 2 log ⁡ 2 N ) O(\lambda^2\log^2N) O(λ2log2N)bits,其中 N N N为circuit size。

1.3.2 IVC from homomorphic encryption

Naor等人2019年论文《Incrementally Verifiable Computation via Incremental PCPs》中将某种omomorphic encryption和incrmental PCP结合实现了IVC。其security基于falsifiable assumption。其IVC实现主要有2种缺陷:

  • 待验证的computation必须为deterministic的(所有基于falsifiable assumption的构建都有此要求)。
  • 更微妙的是,completeness仅在intermediate proofs were honestly generated场景下才成立。这就意味着可能存在以下攻击:an adversary provides an intermediate proof that verifies, but it is impossible for honest parties to generate new proofs for subsequent computations。即中途塞入无效的intermediate proof将影响后续的流程。

本文构建的PCD可避免以上这两种缺陷,实现nondeterministic computation和相应的completeness,避免被中间错误intermediate proof攻击。

1.4 Pedersen commitment定义及属性

  • Pedersen commitment定义:
    在这里插入图片描述
    在这里插入图片描述

  • Pedersen commitment的双线性属性:
    在这里插入图片描述

1.5 基于discrete logarithm 构建的polynomial commitment

以下所有算法中的oracle access都是基于相同的random oracle ρ 0 \rho_0 ρ0
为了方便描述,假设 d + 1 d+1 d+1 D + 1 D+1 D+1均为2的幂乘,即满足 d + 1 = 2 k , D + 1 = 2 m d+1=2^k,D+1=2^m d+1=2k,D+1=2m
对于向量 a ⃗ ∈ S n \vec{a}\in S^n a Sn,二分法时, l ( a ⃗ ) = ( a 1 , ⋯   , a n / 2 ) l(\vec{a})=(a_1,\cdots,a_{n/2}) l(a )=(a1,,an/2) r ( a ⃗ ) = ( a n / 2 + 1 , ⋯   , a n ) r(\vec{a})=(a_{n/2+1},\cdots,a_n) r(a )=(an/2+1,,an)分别表示 a ⃗ \vec{a} a 的左半部分和右半部分。

基于discrete logarithm,对单变量多项式 p ( X ) = c 0 + c 1 X + ⋯ + c d X d p(X)=c_0+c_1X+\cdots+c_dX^d p(X)=c0+c1X++cdXd的polynomial commitment算法实现细节为:

  • P C D L . S e t u p PC_{DL}.Setup PCDL.Setup
    在这里插入图片描述

  • P C D L . T r i m PC_{DL}.Trim PCDL.Trim:(暂时只考虑所有polynomial degree均为 d d d的情况)
    在这里插入图片描述

  • P C D L . C o m m i t PC_{DL}.Commit PCDL.Commit:引入随机数 w w w,对多项式系数进行commit C = w S + ∑ i = 0 d c i G i C=wS+\sum_{i=0}^{d}c_iG_i C=wS+i=0dciGi
    在这里插入图片描述

  • P C D L . O p e n PC_{DL}.Open PCDL.Open:借助[BCCGP16; BBBPWM18]中inner product argument的变种,计算evaluation proof π \pi π:(evaluation point为 z z z
    – 1. 计算evaluation v = p ( z ) ∈ F q v=p(z)\in\mathbb{F}_q v=p(z)Fq
    – 2. sample 随机多项式 p ˉ ∈ F q ≤ d [ X ] \bar{p}\in\mathbb{F}_q^{\leq d}[X] pˉFqd[X],使得 p ˉ ( z ) = 0 \bar{p}(z)=0 pˉ(z)=0
    – 3. sample 相应的commitment randomness w ˉ ∈ F q \bar{w}\in\mathbb{F}_q wˉFq
    – 4. 计算随机多项式 p ˉ \bar{p} pˉ的hiding commitment: C ˉ = C M . C o m m i t ρ 0 ( c k ⃗ , p ˉ ; w ˉ ) \bar{C}=CM.Commit^{\rho_0}(\vec{ck},\bar{p};\bar{w}) Cˉ=CM.Commitρ0(ck ,pˉ;wˉ)
    – 5. 计算challenge α = ρ ( C , z , v , C ˉ ) ∈ F q ∗ \alpha=\rho(C,z,v,\bar{C})\in\mathbb{F}_q^* α=ρ(C,z,v,Cˉ)Fq
    – 6. 计算多项式: p ′ = p + α p ˉ = ∑ i = 0 d c i X i ∈ F q [ X ] p'=p+\alpha \bar{p}=\sum_{i=0}^{d}c_iX^i\in\mathbb{F}_q[X] p=p+αpˉ=i=0dciXiFq[X]
    – 7. 计算commitment randomness: w ′ = w + α w ˉ ∈ F q w'=w+\alpha\bar{w}\in\mathbb{F}_q w=w+αwˉFq
    – 8. 计算多项式 p ′ p' p的non-hiding commitment: C ′ = C + α C ˉ − w ′ S ∈ G C'=C+\alpha\bar{C}-w'S\in\mathbb{G} C=C+αCˉwSG
    计算 0 0 0-th challenge field element ξ 0 = ρ o ( C ′ , z , v ) ∈ F q \xi_0=\rho_o(C',z,v)\in\mathbb{F}_q ξ0=ρo(C,z,v)Fq,用它来计算group element H ′ = ξ 0 H ∈ G H'=\xi_0H\in\mathbb{G} H=ξ0HG
    转为inner product 证明:
    a)public info: z ⃗ 0 = ( 1 , z , ⋯   , z d ) ∈ F q d + 1 \vec{z}_0=(1,z,\cdots,z^d)\in\mathbb{F}_q^{d+1} z 0=(1,z,,zd)Fqd+1 G ⃗ 0 = ( G 0 , G 1 , ⋯   , G d ) ∈ G d + 1 \vec{G}_0=(G_0,G_1,\cdots,G_d)\in\mathbb{G}^{d+1} G 0=(G0,G1,,Gd)Gd+1 v ∈ F q v\in\mathbb{F}_q vFq C ′ ∈ G C'\in\mathbb{G} CG
    b)private info: c ⃗ 0 = ( c 0 , c 1 , ⋯   , c d ) ∈ F q d + 1 \vec{c}_0=(c_0,c_1,\cdots,c_d)\in\mathbb{F}_q^{d+1} c 0=(c0,c1,,cd)Fqd+1
    c)relation: < c ⃗ 0 , z ⃗ 0 > = v <\vec{c}_0,\vec{z}_0>=v <c 0,z 0>=v C ′ = ∑ i = 0 d c i G i C'=\sum_{i=0}^{d}c_iG_i C=i=0dciGi
    借助[BCCGP16; BBBPWM18]中二分法递归调用思想,在每一轮 i ∈ { 1 , ⋯   , log ⁡ 2 ( d + 1 ) } i\in \{1,\cdots,\log_2(d+1)\} i{1,,log2(d+1)},有:
    1)设置 ∑ L = l ( G ⃗ i − 1 ) ∣ ∣ H ′ \sum_L=l(\vec{G}_{i-1})||H' L=l(G i1)H,计算left commitment L i = C M . C o m m i t ∑ L ( r ( c ⃗ i − 1 ) ∣ ∣ < r ( c ⃗ i − 1 ) , l ( z ⃗ i − 1 ) > ) L_i=CM.Commit_{\sum_L}(r(\vec{c}_{i-1})||<r(\vec{c}_{i-1}),l(\vec{z}_{i-1})>) Li=CM.CommitL(r(c i1)<r(c i1),l(z i1)>)
    2)设置 ∑ R = r ( G ⃗ i − 1 ) ∣ ∣ H ′ \sum_R=r(\vec{G}_{i-1})||H' R=r(G i1)H,计算right commitment R i = C M . C o m m i t ∑ R ( l ( c ⃗ i − 1 ) ∣ ∣ < l ( c ⃗ i − 1 ) , r ( z ⃗ i − 1 ) > ) R_i=CM.Commit_{\sum_R}(l(\vec{c}_{i-1})||<l(\vec{c}_{i-1}),r(\vec{z}_{i-1})>) Ri=CM.CommitR(l(c i1)<l(c i1),r(z i1)>)
    3)生成 i i i-th challenge ξ i = ρ 0 ( ξ i − 1 , L i , R i ) ∈ F q \xi_i=\rho_0(\xi_{i-1}, L_i,R_i)\in\mathbb{F}_q ξi=ρ0(ξi1,Li,Ri)Fq
    4)为下一轮构建新的commitment key: G ⃗ i = l ( G ⃗ i − 1 ) + ξ i ⋅ r ( G ⃗ i − 1 ) \vec{G}_i=l(\vec{G}_{i-1})+\xi_i\cdot r(\vec{G}_{i-1}) G i=l(G i1)+ξir(G i1)
    5)构建下一轮的输入: c ⃗ i = l ( c ⃗ i − 1 ) + ξ i − 1 ⋅ r ( c ⃗ i − 1 ) \vec{c}_i=l(\vec{c}_{i-1})+\xi_i^{-1}\cdot r(\vec{c}_{i-1}) c i=l(c i1)+ξi1r(c i1) z ⃗ i = l ( z ⃗ i − 1 ) + ξ i ⋅ r ( z ⃗ i − 1 ) \vec{z}_i=l(\vec{z}_{i-1})+\xi_i\cdot r(\vec{z}_{i-1}) z i=l(z i1)+ξir(z i1)
    最后一轮,设置 U = G log ⁡ 2 ( d + 1 ) , c = c log ⁡ 2 ( d + 1 ) U=G_{\log_2(d+1)},c=c_{\log_2(d+1)} U=Glog2(d+1),c=clog2(d+1)
    最终给receiver发送的evaluation proof 为: π = ( L ⃗ , R ⃗ , U , c , C ˉ , w ′ ) \pi=(\vec{L},\vec{R},U,c,\bar{C},w') π=(L ,R ,U,c,Cˉ,w)

  • P C D L . C h e c k PC_{DL}.Check PCDL.Check:receiver的输入为:receiver key r k ⃗ P C \vec{rk}_{PC} rk PC、commitment C C C、degree bound d d d、evaluation point z z z、claimed evaluation v v v 以及 evaluation proof π \pi π P C D L . C h e c k PC_{DL}.Check PCDL.Check verifies the evaluation proof by invoking the verifier of the inner product argument:
    – 1. Parse c k ⃗ \vec{ck} ck as ( < g r o u p > , h k ⃗ , S ) (<group>,\vec{hk},S) (<group>,hk ,S)
    – 2. 设置 d ′ = ∣ h k ⃗ ∣ − 1 d'=|\vec{hk}|-1 d=hk 1
    – 3. 设置 r k ⃗ = ( < g r o u p > , S , H , d ’ ) \vec{rk}=(<group>,S,H,d’) rk =(<group>,S,H,d)
    – 4. 验证 P C D L . S u c c i n c t C h e c k ρ 0 ( r k ⃗ , C , d , z , v , π ) PC_{DL}.SuccinctCheck^{\rho_0}(\vec{rk},C,d,z,v,\pi) PCDL.SuccinctCheckρ0(rk ,C,d,z,v,π) 是否成立,输出为 ( h , U ) (h,U) (h,U)
    – 5. 验证 U = C M . C o m m i t ( c k , h ⃗ ) U=CM.Commit(ck,\vec{h}) U=CM.Commit(ck,h ),其中 h ⃗ \vec{h} h 为多项式 h h h的系数。

  • P C D L . S u c c i n c t C h e c k PC_{DL}.SuccinctCheck PCDL.SuccinctCheck:在 P C D L . C h e c k PC_{DL}.Check PCDL.Check和本文的accumulation scheme中均会调用。【 P C D L . O p e n PC_{DL}.Open PCDL.Open中的inner product argument递归调用构建proof过程中,保证了每一轮的 C i = C M . C o m m i t G ⃗ i ( c i ⃗ ) + < c ⃗ i , z ⃗ i > H ′ C_i=CM.Commit_{\vec{G}_i}(\vec{c_i})+<\vec{c}_i,\vec{z}_i>H' Ci=CM.CommitG i(ci )+<c i,z i>H成立。在最后一轮的 c ⃗ log ⁡ 2 ( d + 1 ) = c , z ⃗ log ⁡ 2 ( d + 1 ) = h ( z ) \vec{c}_{\log_2(d+1)}=c,\vec{z}_{\log_2(d+1)}=h(z) c log2(d+1)=c,z log2(d+1)=h(z)。】
    – 1. Parse r k ⃗ \vec{rk} rk as ( < g r o u p > , S , H , d ′ ) (<group>, S,H,d') (<group>,S,H,d),和 π \pi π as ( L ⃗ , R ⃗ , U , c , C ˉ , w ′ ) (\vec{L},\vec{R},U,c,\bar{C},w') (L ,R ,U,c,Cˉ,w)
    – 2. 验证 d = d ′ d=d' d=d
    – 3. 计算challenge: α = ρ 0 ( C , z , v , C ˉ ) ∈ F q ∗ \alpha=\rho_0(C,z,v,\bar{C})\in\mathbb{F}_q^* α=ρ0(C,z,v,Cˉ)Fq
    – 4. 计算non-hiding commitment C ′ = C + α C ˉ − w ′ S ∈ G C'=C+\alpha\bar{C}-w'S\in\mathbb{G} C=C+αCˉwSG
    – 5. 计算 0 0 0-th challenge ξ 0 = ρ 0 ( C ′ , z , v ) \xi_0=\rho_0(C',z,v) ξ0=ρ0(C,z,v),设置 H ′ = ξ 0 H ∈ G H'=\xi_0H\in\mathbb{G} H=ξ0HG
    – 6. 计算 group element C 0 = C ′ + v H ′ ∈ G C_0=C'+vH'\in\mathbb{G} C0=C+vHG
    – 7. 在每一轮 i ∈ { 1 , ⋯   , log ⁡ 2 ( d + 1 ) } i\in \{1,\cdots,\log_2(d+1)\} i{1,,log2(d+1)},有:
    (a)生成 i i i-th challenge: ξ i = ρ 0 ( ξ i − 1 , L i , R i ) ∈ F q \xi_i=\rho_0(\xi_{i-1},L_i,R_i)\in\mathbb{F}_q ξi=ρ0(ξi1,Li,Ri)Fq
    (b)计算the i i i-th commitment: C i = ξ i − 1 L i + C i − 1 + ξ i R i ∈ G C_i=\xi_i^{-1}L_i+C_{i-1}+\xi_iR_i\in\mathbb{G} Ci=ξi1Li+Ci1+ξiRiG
    – 8. 定义单变量多项式 h ( X ) = ∏ i = 0 log ⁡ 2 ( d + 1 ) − 1 ( 1 + ξ log ⁡ 2 ( d + 1 ) − i X 2 i ) ∈ F q [ X ] h(X)=\prod_{i=0}^{\log_2(d+1)-1}(1+\xi_{\log_2(d+1)-i}X^{2^i})\in\mathbb{F}_q[X] h(X)=i=0log2(d+1)1(1+ξlog2(d+1)iX2i)Fq[X]
    – 9. 计算evaluation v ′ = c ⋅ h ( z ) ∈ F q v'=c\cdot h(z)\in\mathbb{F}_q v=ch(z)Fq
    – 10. 验证 C log ⁡ 2 ( d + 1 ) = C M . C o m m i t ∑ ( c ∣ ∣ v ′ ) C_{\log_2(d+1)}=CM.Commit_{\sum}(c||v') Clog2(d+1)=CM.Commit(cv),其中 ∑ = ( U ∣ ∣ H ′ ) \sum=(U||H') =(UH)
    – 11. 输出 ( h , U ) (h,U) (h,U)

以上整个 P C D L PC_{DL} PCDL算法具有hiding和extractability属性。


注意:
借鉴了[BMMV19]中inner-product argument(参见博客 Proofs for Inner Pairing Products and Applications 学习笔记 5.2.1节内容。)中的思想,由于 z ⃗ = ( 1 , z , z 2 , ⋯   , z d ) \vec{z}=(1,z,z^2,\cdots,z^d) z =(1,z,z2,,zd)为public info,且为structured,Verifier中的递归调用计算 z ⃗ i \vec{z}_i z i,可延迟计算最终以多项式 h ( z ) = ∏ i = 0 log ⁡ 2 ( d + 1 ) − 1 ( 1 + ξ log ⁡ 2 ( d + 1 ) − i z 2 i ) h(z) =\prod_{i=0}^{\log_2(d+1)-1}(1+\xi_{\log_2(d+1)-i}z^{2^i}) h(z)=i=0log2(d+1)1(1+ξlog2(d+1)iz2i)表示。
甚至可以构建多项式 h ( X ) = ∏ i = 0 log ⁡ 2 ( d + 1 ) − 1 ( 1 + ξ log ⁡ 2 ( d + 1 ) − i X 2 i ) ∈ F q [ X ] h(X)=\prod_{i=0}^{\log_2(d+1)-1}(1+\xi_{\log_2(d+1)-i}X^{2^i})\in\mathbb{F}_q[X] h(X)=i=0log2(d+1)1(1+ξlog2(d+1)iX2i)Fq[X],如 博客 Proofs for Inner Pairing Products and Applications 学习笔记 5.2.1节内容 所示,为减少Verifier的计算压力,再引入一个对 h ( X ) h(X) h(X)的polynomial commitment,将相应的计算压力转移给Prover。


1.6 基于knowledge assumption in bilinear groups 构建的polynomial commitment

已知maximum degree bound D D D,bilinear group ( G 1 , G 2 , G T , q , G , H , e ) (\mathbb{G}_1, \mathbb{G}_2,\mathbb{G}_T, q, G, H, e) (G1,G2,GT,q,G,H,e),有:

  • committer key c k ck ck c k = { G , β G , ⋯   , β D G } ∈ G 1 D + 1 ck=\{G,\beta G,\cdots, \beta^D G\}\in\mathbb{G}_1^{D+1} ck={G,βG,,βDG}G1D+1,其中 β \beta β为random field element,为有毒垃圾;

  • receiver key r k rk rk r k = ( G , H , β H ) ∈ G 1 × G 2 rk=(G,H,\beta H)\in\mathbb{G}_1\times \mathbb{G}_2 rk=(G,H,βH)G1×G2

  • Committer:对多项式 p ∈ F q ≤ D [ X ] p\in\mathbb{F}_q^{\leq D}[X] pFqD[X]的commitment为:
    C = p ( β ) G C=p(\beta)G C=p(β)G

  • Committer:为证明 p p p evaluates to v v v at a given point z ∈ F q z\in\mathbb{F}_q zFq,committer需构建一个witness polynomial w ( X ) = ( p ( X ) − v ) / ( X − z ) w(X)=(p(X)-v)/(X-z) w(X)=(p(X)v)/(Xz),输出的evaluation proof 为 π = w ( β ) G ∈ G 1 \pi=w(\beta)G\in\mathbb{G}_1 π=w(β)GG1

  • Receiver:验证pairing方程式 e ( C − v G , H ) = e ( π , β H − z H ) e(C-vG,H)=e(\pi, \beta H-zH) e(CvG,H)=e(π,βHzH)是否成立。

基于knowledge assumption in bilinear groups,本文对单变量多项式 p ( X ) = c 0 + c 1 X + ⋯ + c d X d p(X)=c_0+c_1X+\cdots+c_dX^d p(X)=c0+c1X++cdXd的polynomial commitment scheme P C A G M PC_{AGM} PCAGM的详细算法实现为:(与Marlin论文中的实现略有不同,Check算法中的opening challenge ξ = ρ 0 ( r k , C , z , d , v ) \xi=\rho_0(rk,C,z,d,v) ξ=ρ0(rk,C,z,d,v) 由random oracle计算获得,而Marlin中的 ξ \xi ξ是外部输入(explicit external input)。【实际算法实现与Marlin还是有差异的。】)

  • P C A G M . S e t u p PC_{AGM}.Setup PCAGM.Setup
    在这里插入图片描述

  • P C A G M . T r i m PC_{AGM}.Trim PCAGM.Trim:生成commitment key c k ck ck 和 receiver key r k rk rk。当匹配多个degree为 [ d i ] i = 1 n [d_i]_{i=1}^{n} [di]i=1n的多项式时,取degree最大值为 d d d生成( d = m a x i ∈ [ n ] ( d 1 , ⋯   , d n ) d=max_{i\in[n]}(d_1,\cdots,d_n) d=maxi[n](d1,,dn))。
    在这里插入图片描述

  • P C A G M . C o m m i t PC_{AGM}.Commit PCAGM.Commit:输入为commitment key c k ck ck、单变量多项式 p p p、degree bound d d d、commitment randomness ( w , w ∗ ) (w,w^*) (w,w)
    – 1. 从 c k ck ck中获取所支持的degree bounds [ d i ] i = 1 n [d_i]_{i=1}^{n} [di]i=1n。若 d e g ( p ) > d deg(p)>d deg(p)>d或者 d ∉ [ d i ] i = 1 n d\notin [d_i]_{i=1}^{n} d/[di]i=1n,则abort;否则继续。
    – 2. 若随机数 w , w ∗ w,w^* w,w不为空,则计算degree 为 d e g ( p ) deg(p) deg(p)的随机单变量多项式 p ˉ \bar{p} pˉ p ˉ ∗ \bar{p}^* pˉ;否则,设置 p ˉ \bar{p} pˉ p ˉ ∗ \bar{p}^* pˉ为zero polynomial。
    – 3. 计算unshifted commitment U = p ( β ) G + p ˉ ( β ) γ G U=p(\beta)G+\bar{p}(\beta)\gamma G U=p(β)G+pˉ(β)γG 和 shifted commitment S = β D − d p ( β ) G + p ˉ ∗ γ G S=\beta^{D-d}p(\beta)G+\bar{p}^*\gamma G S=βDdp(β)G+pˉγG
    – 4. 输出为: C = ( U , S ) C=(U,S) C=(U,S)。注意其中 U , S U,S U,S都是由 c k ck ck中的元素线性计算获得。

  • P C A G M . O p e n PC_{AGM}.Open PCAGM.Open:输入为commitment key c k ck ck、单变量多项式 p p p、a commitment C C C to p p p、degree bound d d d、evaluation point z z z、commitment randomness ( w , w ∗ ) (w,w^*) (w,w)
    – 1. 1. 从 c k ck ck中获取所支持的degree bounds [ d i ] i = 1 n [d_i]_{i=1}^{n} [di]i=1n。若 d e g ( p ) > d deg(p)>d deg(p)>d或者 d ∉ [ d i ] i = 1 n d\notin [d_i]_{i=1}^{n} d/[di]i=1n,则abort;否则继续。
    – 2. 若随机数 w , w ∗ w,w^* w,w不为空,则获取degree 为 d e g ( p ) deg(p) deg(p)的随机单变量多项式 p ˉ \bar{p} pˉ p ˉ ∗ \bar{p}^* pˉ;否则,设置 p ˉ \bar{p} pˉ p ˉ ∗ \bar{p}^* pˉ为zero polynomial。
    – 3. 计算evaluation v = p ( z ) v=p(z) v=p(z) 和 opening challenge ξ = ρ 0 ( r k , C , z , d , v ) ∈ F q \xi=\rho_0(rk,C,z,d,v)\in\mathbb{F}_q ξ=ρ0(rk,C,z,d,v)Fq
    – 4. 定义多项式 p ∗ ( X ) = X D − d p ( X ) − X D − d p ( z ) p^*(X)=X^{D-d}p(X)-X^{D-d}p(z) p(X)=XDdp(X)XDdp(z),计算witness 多项式 w ( X ) = p ( X ) − p ( z ) X − z w(X)=\frac{p(X)-p(z)}{X-z} w(X)=Xzp(X)p(z) for p p p,计算witness polynomial w ∗ ( X ) = X D − d w ( X ) w^*(X)=X^{D-d}w(X) w(X)=XDdw(X) for p ∗ p^* p。将这两个witness结合为 w ′ = w + ξ w ∗ w'=w+\xi w^* w=w+ξw
    – 5. 计算witness 多项式 w ˉ ( X ) = p ˉ ( X ) − p ˉ ( z ) X − z \bar{w}(X)= \frac{\bar{p}(X)-\bar{p}(z)}{X-z} wˉ(X)=Xzpˉ(X)pˉ(z) for p ˉ \bar{p} pˉ,计算witness 多项式 w ˉ ∗ ( X ) = p ˉ ∗ ( X ) − p ˉ ∗ ( z ) X − z \bar{w}^*(X)= \frac{\bar{p}^*(X)-\bar{p}^*(z)}{X-z} wˉ(X)=Xzpˉ(X)pˉ(z) for p ˉ ∗ \bar{p}^* pˉ。将这两个witness结合为 w ˉ ′ = w ˉ + ξ w ˉ ∗ \bar{w}'=\bar{w}+\xi \bar{w}^* wˉ=wˉ+ξwˉ
    – 6. 计算evaluation v ˉ = p ˉ ( z ) + ξ p ˉ ∗ ( z ) \bar{v}=\bar{p}(z)+\xi\bar{p}^*(z) vˉ=pˉ(z)+ξpˉ(z)
    – 7. 计算 W = w ′ ( β ) G + w ˉ ′ ( β ) γ G W=w'(\beta)G+\bar{w}'(\beta)\gamma G W=w(β)G+wˉ(β)γG
    – 8. 输出的evaluation proof 为: π = ( W , v ˉ ) \pi=(W,\bar{v}) π=(W,vˉ)

  • P C A G M . C h e c k PC_{AGM}.Check PCAGM.Check:输入为commitment key r k rk rk、a commitment C C C t、degree bound d d d、evaluation point z z z、a claimed evaluation v v v、a evaluation proof π \pi π
    – 1. 若 d ∉ r k d\notin rk d/rk,则abort;否则继续。
    – 2. 解析commitment C C C ( U , S ) ∈ G 1 2 (U,S)\in \mathbb{G}_1^2 (U,S)G12
    – 3. 解析 proof π \pi π ( W , v ˉ ) ∈ G 1 × F q (W,\bar{v})\in\mathbb{G}_1\times\mathbb{F}_q (W,vˉ)G1×Fq
    – 4. 计算opening challenge ξ = ρ 0 ( r k , C , z , d , v ) ∈ F q \xi=\rho_0(rk,C,z,d,v)\in\mathbb{F}_q ξ=ρ0(rk,C,z,d,v)Fq
    – 5. 计算combined commitment C ′ = U + ξ S C'=U+\xi S C=U+ξS
    – 6. 验证 e ( C ′ − v G − v ξ β D − d G − v ˉ γ G , H ) = e ( W , β H − z H ) e(C'-vG-v\xi\beta^{D-d}G-\bar{v}\gamma G,H)=e(W,\beta H-zH) e(CvGvξβDdGvˉγG,H)=e(W,βHzH) 是否成立。

2 技术要点

2.1 PCD from arguments with accumulation schemes

[BCTV14; COS20] 在每一步 i i i,证明 “ z i = F ( z i − 1 ) z_i=F(z_{i-1}) zi=F(zi1),且存在proof π i − 1 \pi_{i-1} πi1 可证实 z i − 1 z_{i-1} zi1的正确性”。为了保证Verifier验证proof的复杂度低于直接进行相应计算,关注重点在于实现succinct verification。
succinct verification似乎是个矛盾的需求:Verifier没有时间来读取整个circuit R R R。解决该问题的办法之一是借助preprocessing:在recursion开始时,为 R R R计算一个短的cryptographic digest,recursive Verifier可用该digest而不用直接读取整个circuit R R R。对于固定的circuit R R R,这种preprocessing 仅需offline 执行一次,对后续online phase中的each recursive step的性能影响可忽略。

仅有preprocessing还不够,[BGH19] Bowe等人2019年论文《Halo: Recursive Proof Composition without a Trusted Setup》中引入了 post-processing 技术,基于以下发现:
if a SNARK is such that we can efficiently “defer” the verification of a claim in a way that does not grow in cost with the number of claims to be checked, then we can hope to achieve recursive composition by deferring the verification of all claims to the end。

本文构建的基于SNARKs的PCD算法具有post-processing属性。

本文的accumulation scheme在 [BGH19] Bowe等人2019年论文《Halo: Recursive Proof Composition without a Trusted Setup》的基础上进行generalization,主要包括3组算法:

  • accumulation prover。输入为:an instance-proof pair ( z , π ) (z,\pi) (z,π)和a previous accumulator a c c acc acc;输出为:new accumulator a c c ∗ acc^* acc that “includes” the new instance。
  • accumulation verifier。输入为 ( ( z , π ) , a c c , a c c ∗ ) ((z,\pi),acc,acc^*) ((z,π),acc,acc),然后验证 a c c ∗ acc^* acc计算正确(i.e., that it accumulates ( z , π ) (z,\pi) (z,π) into a c c acc acc)。
  • decider。输入为:a single accumulator a c c acc acc,然后perform a single check that simultaneously ensures that every instance-proof pair accumulated in a c c acc acc verifies。

基于以上accumulation scheme,可构建IVC:

  • IVC prover。输入为:previous instance z i z_i zi, proof π i \pi_i πi和accumulator a c c i acc_i acci。IVC prover首先accumulate ( z i , π i ) (z_i,\pi_i) (zi,πi) with a c c i acc_i acci to obtain a new accumulator a c c i + 1 acc_{i+1} acci+1;生成 a SNARK proof π i + 1 \pi_{i+1} πi+1 of the claim: " z i + 1 = F ( z i ) z_{i+1}=F(z_i) zi+1=F(zi), and there exist a proof π i \pi_i πi and an accumulator a c c i acc_i acci such that the accmulation verifier accepts ( ( z i , π i ) , a c c i , a c c i + 1 ) ((z_i,\pi_i), acc_i, acc_{i+1}) ((zi,πi),acci,acci+1)", expressed as a circuit R R R
    最终的IVC proof包含 ( π T , a c c T ) (\pi_T,acc_T) (πT,accT)
  • IVC verifier。通过running the SNARK verifier on π T \pi_T πT and the accumulation scheme decider on a c c T acc_T accT来验证IVC proof。

以上流程能实现IVC的原因在于:
a c c i acc_i acci is a valid accumulator (according to the decider) 且 π i \pi_i πi is a valid proof,则可说明computation is correct up to the i i i-th step。
若在time T T T都一直成立,则IVC verifier就成功check了整个计算。
注意到,若我们能通过一个an invariant 来证明 “ z i + 1 = F ( z i ) z_{i+1}=F(z_i) zi+1=F(zi), π i \pi_i πi is a valid proof, and a c c i acc_i acci is a valid accumulator”,则可认为 the computation is correct up to step i + 1 i+1 i+1。但是迄今为止我们无法直接实现相应的证明,原因有二:
1)证明 π i \pi_i πi是一个有效的proof需要证明a statement about the argument verifier, which may not be sublinear;
2)证明 a c c i acc_i acci是一个有效的accumulator需要证明 a statement about the decider, which may not be sublinear。

所以,与其直接进行证明,我们可以“defer”(推迟):prover accumulate ( z i , π i ) (z_i,\pi_i) (zi,πi) into a c c i acc_i acci to obtain a new accumulator a c c i + 1 acc_{i+1} acci+1
这种accumulation scheme的soundness可保证,若 a c c i + 1 acc_{i+1} acci+1是有效的且accumulation verfier accepts ( ( z i , π i ) , a c c i , a c c i + 1 ) ((z_i,\pi_i), acc_i, acc_{i+1}) ((zi,πi),acci,acci+1),则 π i \pi_i πi是一个有效的proof且 a c c i acc_i acci是一个有效的accumulator。剩下的就是要找到相应的invariant,使得prover能用于prove that the accumulation verifer accepts,同时可实现sublinear accumulation verifier。

PCD是IVC的generalization,与IVC每次计算步骤中只接收一个input z i z_i zi不同,PCD支持接收 m m m个inputs from different nodes。
PCD中证明正确性,要求证明所有的inputs都被正确计算了。
本文构建的PCD支持check m m m proofs and m m m accumulators。因此,需要拓展上述accumulation scheme的定义,以允许 accmulate 多个 instance-proof pairs和多个 “old” accumulators。

本文构建的PCD具有如下属性:

  • 满足效率要求。要求accumulation verifier run in time sublinear in the size of the circuit R R R,这就意味着 an accumulator must be of size sublinear in the size of R R R,不能随着每次accumulation step 增长。而 the SNARK verifier和decider algorithm均只需要有正常的运行效率即可(如,polynomial-time)。
  • Soundness。若底层的SNARK is knowledge sound 和 accumulation scheme is sound,则本文的PCD scheme也是sound的。本文强调这两种情况都是secure in the standard (CRS) model without any random orcales (as in prior PCD constructions)。
  • Zero knowledge。若底层的SNARK和accumulation scheme都是zero knowledge的,则相应的PCD scheme也是zero knowledge的。
  • Post-quantum security。若底层的SNARK和accumulation scheme都是post-quantum secure的,则相应的PCD scheme也是post-quantum secure的。

2.2 Accumulation scheme

  • accumulation scheme for a predicate 定义:
    在这里插入图片描述
    而accumulation scheme for a SNARK 是 accumulation scheme for a predicate induced by the argument verifier,上图中的predicate input q q q 包含 an instance-proof pair ( x , π ) (x,\pi) (x,π)
    对于IVC/PCD,相当于有某个fixed circuit R R R,需要accumulate pairs ( x i , π i ) (x_i,\pi_i) (xi,πi),其中 π i \pi_i πi是a SNARK proof,证明存在 w i w_i wi使得 R ( x i , w i ) = 1 R(x_i,w_i)=1 R(xi,wi)=1。此时,predicate依赖的要素有:
    – pair ( x i , π i ) (x_i,\pi_i) (xi,πi)
    – circuit R R R
    – public parameters of the argument scheme p p pp pp
    – random oracle ρ \rho ρ
    circuit R R R 不能是input q q q 的一部分,因为其太大的,所以circuit R R R必须在一开始就fixed。
    需要同时定义:
    – a predicate Φ : U ( ∗ ) × ( { 0 , 1 } ∗ ) 3 → { 0 , 1 } \Phi:\mathcal{U}(*)\times(\{0,1\}^*)^3\rightarrow \{0,1\} Φ:U()×({0,1})3{0,1}
    – a predicate-specification algorithm H \mathcal{H} H
    调整2.1定义中的predicate为 Φ ( ρ , p p Φ , i Φ , ⋅ ) \Phi(\rho,pp_{\Phi},i_{\Phi},\cdot) Φ(ρ,ppΦ,iΦ,),其中 ρ \rho ρ为a random oracle, p p Φ pp_{\Phi} ppΦ为output by H ρ \mathcal{H}^{\rho} Hρ i Φ i_{\Phi} iΦ为chosen adversarially。
    在本文的SNARK中, H \mathcal{H} H相当于the SNARK generator, i Φ i_{\Phi} iΦ为circuit R R R,且 Φ ( ρ , p p , R , ( x , π ) ) = V ρ ( p p , R , x , π ) \Phi(\rho,pp,R,(x,\pi))=\mathcal{V}^{\rho}(pp,R,x,\pi) Φ(ρ,pp,R,(x,π))=Vρ(pp,R,x,π)

  • zero knowledge accumulation scheme:
    在这里插入图片描述

Maller等人2019年论文《Sonic: Zero-Knowledge SNARKs from Linear-Size Universal and Updateable Structured Reference Strings》中提出了“helped verification”定义(即支持batch verification?),在具有helped verification 的SNARK中,an untrusted party known as the helper can, given n n n proofs, produce an auxiliary proof that enables checking the n n n proofs at lower cost than that of checking each proof individually。这种batching 能力可看成是accumulation的特例,as it applies to n n n “fresh” proofs only; there is no notion of batching “old” accumulators。目前不清晰仅靠helped verification 是否足以构建IVC/PCD schemes。

2.3 构建arguments with accumulation schemes

2.4 accumulation schemes for polynomial commitments

polynomial commitment scheme (PC scheme) 定义为:
one produce a commitment C C C to a polynomial p p p,然后证明该committed polynomial evaluates to a claimed value v v v at a desired point z z z

相应的an accumulation scheme for a PC scheme为:
accmulates claims of the form " C C C commits to p p p such that p ( z ) = v p(z)=v p(z)=v" for arbitrary polynomials p p p and evaluation points z z z

基于当前流行的两种 (hiding) polynomial commitment scheme构建的 (zero knowledge) accumulation scheme为:

无论是基于哪种 polynomial commitment scheme构建的accumulation scheme,accumulation verifier的running time都是sublinear in the degree of the polynomial,而accumulator本身并不会随着accumulation steps数量增加而增长。

2.4.1 基于 P C D L PC_{DL} PCDL构建的accumulation scheme

对于degree小于 d d d的单变量多项式, P C D L PC_{DL} PCDL的evaluation proof size 为 O ( λ log ⁡ d ) O(\lambda\log d) O(λlogd) in the random oracle model。 P C D L PC_{DL} PCDL基于的安全假设为:the hardness of the discrete logarithm problem in a prime order group G \mathbb{G} G,这就使得 P C D L PC_{DL} PCDL的参数中没有secret信息,即没有有毒垃圾。
但是 P C D L PC_{DL} PCDL的verification complexity很高:验证an evaluation proof需要 Ω ( d ) \Omega (d) Ω(d)个scalar multiplications in G \mathbb{G} G。[BGH19] Bowe等人2019年论文《Halo: Recursive Proof Composition without a Trusted Setup》通过实现a batch of n n n proofs的摊销相应的verification complexity。
接下来将介绍Halo中对 P C D L PC_{DL} PCDL的accumulation scheme,其accumulation verifier仅需 O ( n log ⁡ d ) O(n\log d) O(nlogd)个scalar multiplications而不是直接的 Θ ( n ⋅ d ) \Theta (n\cdot d) Θ(nd),accumulator size为 O ( log ⁡ d ) O(\log d) O(logd) elements in G \mathbb{G} G

public parameter: { G 0 , G 1 , ⋯   , G d } ∈ G d + 1 \{G_0,G_1,\cdots,G_d\}\in\mathbb{G}^{d+1} {G0,G1,,Gd}Gd+1 in a group G \mathbb{G} G of prime order q q q
角色:committer和receiver。
committer:对polynomial p ( X ) = ∑ i = 0 d a i X i ∈ F q ≤ d [ X ] p(X)=\sum_{i=0}^{d}a_iX^i\in\mathbb{F}_q^{\leq d}[X] p(X)=i=0daiXiFqd[X]进行commit,相应的commitment值为: C = ∑ i = 0 d a i G i C=\sum_{i=0}^{d}a_iG_i C=i=0daiGi

为了证明the committed polynomial p p p evaluates to v v v at a given point z ∈ F q z\in\mathbb{F}_q zFq,相当于证明 ( C , z , v ) (C,z,v) (C,z,v)满足如下 N P NP NP statement:
∃ a 0 , ⋯   , a d ∈ F   s . t .   v = ∑ i = 0 d a i z i   a n d   C = ∑ i = 0 d a i G i \exists a_0,\cdots,a_d\in\mathbb{F}\ s.t.\ v=\sum_{i=0}^{d}a_iz^i\ and\ C=\sum_{i=0}^{d}a_iG_i a0,,adF s.t. v=i=0daizi and C=i=0daiGi

以上可看成是一种特殊inner product argument (IPA),receiver仅需verify the inner product argument to check the evaluation。[BCCGP16] Bootle等人2016年论文《Efficient Zero-Knowledge Arguments for Arithmetic Circuits in the Discrete Log Setting》是prove the inner product of two committed vectors。不过此处与[BCCGP16]论文中的inner product argument实现略有不同,其中的向量 ( 1 , z , ⋯   , z d ) (1,z,\cdots,z^d) (1,z,,zd)为public info,verifier也知道。所以相应的算法需做调整。

本文所实现的accumulation scheme依赖于一种特殊结构的IPA verifier,该IPA verifier具有如下特点:

  • 使用random oracle生成 O ( log ⁡ d ) O(\log d) O(logd)个challenges;
  • 运行仅需 O ( log ⁡ d ) O(\log d) O(logd)次field 和group operations的cheap checks ;
  • 最终运行需要 Ω d \Omega{d} Ωd次scalar multiplications的expensive check。该check可保证consistency between the challenges and a group element U U U contained in the proof。

以上这种IPA verifier简明扼要地阻止了expensive check,因此为该IPA构建accumulation scheme reduce为了 为包含 U U U的expensive check构建accumulation scheme。

本文基于[BGH19] Bowe等人2019年论文《Halo: Recursive Proof Composition without a Trusted Setup》中的思路:(而Halo又是基于[BBBPWM18] B¨unz等人2018年论文《Bulletproofs: Short Proofs for Confidential Transactions and More》)

  • ξ 1 , ⋯   , ξ log ⁡ 2 d \xi_1,\cdots,\xi_{\log_2d} ξ1,,ξlog2d为protocol challenges;
  • U U U 可看成是对polynomial h ( X ) = ∏ i = 0 log ⁡ 2 ( d ) − 1 ( 1 + ξ log ⁡ 2 ( d ) − i X 2 i ) ∈ F q ≤ d [ X ] h(X)=\prod_{i=0}^{\log_2(d)-1}(1+\xi_{\log_2(d)-i}X^{2^i})\in\mathbb{F}_q^{\leq d}[X] h(X)=i=0log2(d)1(1+ξlog2(d)iX2i)Fqd[X]的commitment,该polynomial具有的特殊属性为:可evaluated at any point in just O ( log ⁡ d ) O(\log d) O(logd) field operations (exponentially smaller than its degree d d d)。从而就运行将expensive check on U U U 转换为 a check that is amenable to bathching:不再直接验证 U U U is a commitment to h h h,改为验证 the polynomial committed inside U U U agrees with h h h at a challenge point z z z sampled via the random oracle。

利用以上思路,转为实现:
有多个polynomials p 1 , ⋯   , p n p_1,\cdots,p_n p1,,pn,需要有 n n n checks of the form “check that the polynomial contained in U i U_i Ui evaluates to h i ( z ) h_i(z) hi(z) at the point z z z”。由于此处针对的相同的evaluation point z z z,因此可以利用标准的同态属性进行accumulate。

需要accumulated的instance为:

  • ( C , z , v , π ) (C,z,v,\pi) (C,z,v,π),其中 π \pi π为an evaluation proof for the claim “p(z)=v” and p p p is the polynomial committed in C C C

具体的accumulation scheme for P C D L PC_{DL} PCDL A S = ( P , V , D ) AS=(P,V,D) AS=(P,V,D)实现方式为:

  • Accumulation prover P P P:根据old accumulator a c c = ( C 1 , z 1 , v 1 , π 1 ) acc=(C_1,z_1,v_1,\pi_1) acc=(C1,z1,v1,π1)和instance ( C 2 , z 2 , v 2 , π 2 ) (C_2,z_2,v_2,\pi_2) (C2,z2,v2,π2) 计算 new accumulator a c c ∗ = ( C , z , v , π ) acc^*=(C,z,v,\pi) acc=(C,z,v,π)
    – 分别从 π 1 , π 2 \pi_1,\pi_2 π1,π2计算 U 1 , U 2 U_1,U_2 U1,U2 U 1 , U 2 U_1,U_2 U1,U2可看成是commitment to polynomials h 1 , h 2 h_1,h_2 h1,h2 defined by the challenges derived from π 1 , π 2 \pi_1,\pi_2 π1,π2
    – 使用random oracle ρ \rho ρ 来计算random challenge: α = ρ ( [ h 1 , U 1 ] , [ h 2 , U 2 ] ) \alpha=\rho([h_1,U_1],[h_2,U_2]) α=ρ([h1,U1],[h2,U2])
    – 计算 C = U 1 + α U 2 C=U_1+\alpha U_2 C=U1+αU2,为commitment to polynomial p ( X ) = h 1 ( X ) + α h 2 ( X ) p(X)=h_1(X)+\alpha h_2(X) p(X)=h1(X)+αh2(X)
    – 计算challenge point: z = ρ ( C , p ) z=\rho(C,p) z=ρ(C,p),其中 p p p为uniquely represented via the tuple ( [ h 1 , h 2 ] , α ) ([h_1,h_2],\alpha) ([h1,h2],α)
    – 构建an evaluation proof π \pi π for the claim “ p ( z ) = v p(z)=v p(z)=v”。(该步骤是唯一expensive的一步)
    – 输出新的accumulator a c c ∗ = ( C , z , v , π ) acc^*=(C,z,v,\pi) acc=(C,z,v,π)

  • Accumulation verifier V V V:验证new accumulator a c c ∗ = ( C , z , v , π ) acc^*=(C,z,v,\pi) acc=(C,z,v,π)确实是由ld accumulator a c c = ( C 1 , z 1 , v 1 , π 1 ) acc=(C_1,z_1,v_1,\pi_1) acc=(C1,z1,v1,π1)和instance ( C 2 , z 2 , v 2 , π 2 ) (C_2,z_2,v_2,\pi_2) (C2,z2,v2,π2) 正确计算而来的。
    – 分别验证 ( C 1 , z 1 , v 1 , π 1 ) (C_1,z_1,v_1,\pi_1) (C1,z1,v1,π1) ( C 2 , z 2 , v 2 , π 2 ) (C_2,z_2,v_2,\pi_2) (C2,z2,v2,π2) pass the cheap checks of the IPA verifier。
    – 分别从 π 1 , π 2 \pi_1,\pi_2 π1,π2计算 U 1 , U 2 U_1,U_2 U1,U2 U 1 , U 2 U_1,U_2 U1,U2可看成是commitment to polynomials h 1 , h 2 h_1,h_2 h1,h2 defined by the challenges derived from π 1 , π 2 \pi_1,\pi_2 π1,π2
    – 使用random oracle ρ \rho ρ 来计算random challenge: α = ρ ( [ h 1 , U 1 ] , [ h 2 , U 2 ] ) \alpha=\rho([h_1,U_1],[h_2,U_2]) α=ρ([h1,U1],[h2,U2])
    – 验证 C = U 1 + α U 2 C=U_1+\alpha U_2 C=U1+αU2 成立。
    – 计算challenge point: z = ρ ( C , p ) z=\rho(C,p) z=ρ(C,p),其中polynomial p ( X ) = h 1 ( X ) + α h 2 ( X ) p(X)=h_1(X)+\alpha h_2(X) p(X)=h1(X)+αh2(X)
    – 验证 h 1 ( z ) + α h 2 ( z ) = v h_1(z)+\alpha h_2(z)=v h1(z)+αh2(z)=v成立。

  • Decider D D D:输入为最终的accumulator a c c ∗ = ( C , z , v , π ) acc^*=(C,z,v,\pi) acc=(C,z,v,π),验证 π \pi π为a valid evaluation proof for the claim that the polynomial committed inside C C C evaluates to v v v at the point z z z

为了在以上accumulation scheme for P C D L PC_{DL} PCDL中增加zero knowledge 属性,即需要引入hiding variant of P C D L PC_{DL} PCDL:在每一步,accumulation prover需要引入新的random polynomial h 0 h_0 h0,从而保证the evaluation claim in a c c ∗ acc^* acc is for a random polynomial,从而hiding all information about the original evaluation claims。而为了让accumulation verifier可验证通过,prover 需为 h 0 h_0 h0引入相应的辅助proof π V \pi_V πV

2.4.2 基于 P C A G M PC_{AGM} PCAGM构建的Accumulation scheme

P C A G M PC_{AGM} PCAGM:基于knowledge assumption in bilinear groups 构建的polynomial commitment scheme。
checking an evaluation proof in P C A G M PC_{AGM} PCAGM 需要1个pairing计算,因此验证 n n n个evaluation proof则需要 n n n个pairing计算。
而accumulation scheme A S = ( P , V , D ) AS=(P,V,D) AS=(P,V,D) for P C A G M PC_{AGM} PCAGM 对此进行了改进:
验证accumulation of n n n个evaluation proofs时,accumulation verifier V V V 仅需 O ( n ) O(n) O(n)次scalar multiplications in G 1 \mathbb{G}_1 G1 ,而decider D D D仅需要运行1次pairing计算来验证the resulting accumulator。

将pairing计算次数由 n n n降为 1 1 1,同时将single pairing计算推迟到了the end of the accumulation (the decider)。若将 P C A G M PC_{AGM} PCAGM-based SNARK和accumulation scheme for P C A G M PC_{AGM} PCAGM结合,则可消除所有的pairings计算from the circuit being verified in the PCD construction。

[CHMMVW20] Chiesa等人2020年论文《Marlin: Preprocessing zkSNARKs with Universal and Updatable SRS》中介绍了如何利用random linear combination来batching pairings,从而实现an accumulation scheme for P C A G M PC_{AGM} PCAGM
借助1.6节的表示,即需要验证 n n n个instance [ C i , z i , v i , π i ] i = 1 n [C_i,z_i,v_i,\pi_i]_{i=1}^{n} [Ci,zi,vi,πi]i=1n,第 i i i个instance的pairing check方程式表示为:
e ( C i − v i G , H ) = e ( π , β ) ⇔ e ( C i − v i G + z i π i , H ) = e ( π i , β H ) e(C_i-v_iG,H)=e(\pi,\beta) \Leftrightarrow e(C_i-v_iG+z_i\pi_i,H)=e(\pi_i,\beta H) e(CiviG,H)=e(π,β)e(CiviG+ziπi,H)=e(πi,βH) ……(1)
经过以上转换,pairing等式左右两侧的 G 2 \mathbb{G}_2 G2 inputs ( H , β H H,\beta H H,βH) 均于所声明的信息无关,从而允许引入random challenge r = ρ ( [ C i , z i , v i , π i ] i = 1 n ) r=\rho([C_i,z_i,v_i,\pi_i]_{i=1}^{n}) r=ρ([Ci,zi,vi,πi]i=1n) 进行random linear combination 来 实现batch pairing check,最终combined方程式为:
e ( ∑ i = 1 n r i ( C i − v i G + z i π i ) , H ) = e ( ∑ i = 1 n r i π i , β H ) e(\sum_{i=1}^{n}r^i(C_i-v_iG+z_i\pi_i),H)=e(\sum_{i=1}^{n}r^i\pi_i,\beta H) e(i=1nri(CiviG+ziπi),H)=e(i=1nriπi,βH) ……(2)
以上pairing方程式中包含了:

  • accumulated commitment: C ∗ = ∑ i = 1 n r i ( C i − v i G + z i π i ) C^*=\sum_{i=1}^{n}r^i(C_i-v_iG+z_i\pi_i) C=i=1nri(CiviG+ziπi)
  • accumulated proof:$\pi*=\sum_{i=1}{n}r^i\pi_i $

从而引申出accumulation scheme A S AS AS for P C A G M PC_{AGM} PCAGM的实现为:
A S AS AS 中的accumulator包含a commitment-proof pair ( C ∗ , π ∗ ) (C^*, \pi^*) (C,π),decider D D D仅需验证 e ( C ∗ , H ) = e ( π ∗ , β H ) e(C^*,H)=e(\pi^*,\beta H) e(C,H)=e(π,βH)是否成立。
观察公式(1)中,验证a claimed evaluation ( C , z , v , π ) (C,z,v,\pi) (C,z,v,π) within P C A G M PC_{AGM} PCAGM 的有效性 相当于 验证 the accumulator ( C − v G + z π , π ) (C-vG+z\pi,\pi) (CvG+zπ,π) is accepted by the decider D D D

  • accumulation prover P P P:输入为a list of old accumulators [ a c c i ] i = 1 n = [ ( C i ∗ , π i ∗ ) ] i = 1 n [acc_i]_{i=1}^{n}=[(C_i^*,\pi_i^*)]_{i=1}^{n} [acci]i=1n=[(Ci,πi)]i=1n,计算random challenge r = ρ ( [ a c c i ] i = 1 n ) r=\rho([acc_i]_{i=1}^{n}) r=ρ([acci]i=1n),构建 C ∗ = ∑ i = 1 n r i C + i ∗ , π ∗ = ∑ i = 1 n r i π i ∗ C^*=\sum_{i=1}^{n}r^iC+i^*,\pi^*=\sum_{i=1}^{n}r^i\pi_i^* C=i=1nriC+i,π=i=1nriπi,输出为 a c c ∗ = ( C ∗ , π ∗ ) ∈ G 1 2 acc^*=(C^*,\pi^*)\in\mathbb{G}_1^2 acc=(C,π)G12
  • accumulation verifier V V V:验证 a c c ∗ acc^* acc accumulates [ a c c i ] i = 1 n [acc_i]_{i=1}^{n} [acci]i=1n,invoke P P P and check that its output matches the claimed new accumulator a c c ∗ acc^* acc

为了在以上accumulation scheme for P C A G M PC_{AGM} PCAGM中增加zero knowledge 属性,即需要在 a c c ∗ acc^* acc中额外引入 对应为random polynomial 的 “old” accumulator,从而statistically hide the accumulated claims。而为了让accumulation verifier可验证通过,prover 需为“old” accumulator引入相应的辅助proof π V \pi_V πV

3. 相关定义

  • indexed relations:
    indexed relation r r r为a set of triples ( i , x , w ) (i,x,w) (i,x,w),其中 i i i为index, x x x为instance, w w w为witness。
    相应的indexed language L ( R ) L(R) L(R)为:对于 ( i , x ) (i,x) (i,x),存在witness w w w,使得 ( i , x , w ) ∈ R (i,x,w)\in R (i,x,w)R
    以satisfiable Boolean circuit的indexed relation为例: i i i表示the description of a boolean circuit, x x x为partial assignment to its input wires, w w w为assignment to the remaining wires that makes the circuit to output 0。

  • Security parameter 和 random oracle:
    在这里插入图片描述

  • non-interactive arguments in the ROM:
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

  • proof-carrying data PCD:(由于目前无法证实基于random oracle model构建的PCD是否安全,本文采用的standard (CRS) model。)
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

4. accumulation scheme

predicate Φ : U ( ∗ ) × ( { 0 , 1 } ∗ ) 3 → { 0 , 1 } \Phi: \mathcal{U}(*)\times (\{0,1\}^*)^3\rightarrow \{0,1\} Φ:U()×({0,1})3{0,1}
Φ ( ρ , p p Φ , i Φ , q ) \Phi(\rho,pp_{\Phi},i_{\Phi},q) Φ(ρ,ppΦ,iΦ,q)简化表示为 Φ ρ ( p p Φ , i Φ , q ) \Phi^{\rho}(pp_{\Phi},i_{\Phi},q) Φρ(ppΦ,iΦ,q)
H \mathcal{H} H为randomized algorithm with access to a (random) oracle,输出为predicate参数 p p Φ pp_{\Phi} ppΦ

accumulation scheme for ( Φ , H ) (\Phi,\mathcal{H}) (Φ,H) 包含的算法有 A S = ( G , I , P , V , D ) AS=(G,I,P,V,D) AS=(G,I,P,V,D),均使用相同的random oracle ρ \rho ρ,各算法基本语义为:

  • Generator:输入为security parameter λ \lambda λ G G G samples 然后输出public parameter p p pp pp
  • Indexer:输入为public parameter p p pp pp、predicate parameter p p Φ pp_{\Phi} ppΦ (由 H \mathcal{H} H生成)、predicate index i Φ i_{\Phi} iΦ I I I 确定性地计算输出triple ( a p k , a v k , d k ) (apk,avk,dk) (apk,avk,dk),其中 a p k apk apk为accumulator proving key, a v k avk avk 为accumulator verification key, d k dk dk 为decision key。
  • Accumulation Prover:输入为accumulator proving key a p k apk apk [ q i ] i = 1 n [q_i]_{i=1}^{n} [qi]i=1n和old accumulators [ a c c j ] j = 1 m [acc_j]_{j=1}^{m} [accj]j=1m P P P 输出new accumulator a c c acc acc 和proof π V \pi_V πV 给accumulation verifier。
  • Accumulation Verifier:输入为 accumulator verification key a v k avk avk [ q i ] i = 1 n [q_i]_{i=1}^{n} [qi]i=1n和accumulator instances [ a c c j ] j = 1 m [acc_j]_{j=1}^{m} [accj]j=1m、new accumulator a c c acc acc 和proof π V \pi_V πV V V V 输出a bit indicating whether a c c acc acc correctly accumulates [ q i ] i = 1 n [q_i]_{i=1}^{n} [qi]i=1n [ a c c j ] j = 1 m [acc_j]_{j=1}^{m} [accj]j=1m
  • Decider:输入为decision key d k dk dk、accumulator a c c acc acc D D D 输出a bit indicating whether a c c acc acc is a valid accumulator。

A S = ( G , I , P , V , D ) AS=(G,I,P,V,D) AS=(G,I,P,V,D) 均应具有completeness和soundness属性。

  • accumulation for non-interactive argument system ARG:
    在这里插入图片描述

  • accumulation for polynomial commitment scheme PC:
    在这里插入图片描述

4.1 基于accumulation scheme构建的Proof-carrying data

本文构建的PCD在[COS20] Chiesa等人2020年论文《Fractal: Post-Quantum and Transparent Recursive Proofs from Holography》的基础上进行了改进:

  • [COS20]中SNARK prover circuit包含了SNARK verifier circuit;而本文为了使verifier succinct,改为要求SNARK prover包含accumulation verifier circuit。
  • PCD proof中包含了a SNARK proof π \pi π和an accumulator a c c acc acc,验证计算需要running the SNARK verifier on π \pi π and the accumulation scheme decider on a c c acc acc
  • accumulation scheme的安全性与SNARK本身的安全性需结合考虑。要求SNARK remain secure with respect to the auxiliary input distribution induced by the public parameters of the accumulation scheme。

详细的PCD构建思路为:
在这里插入图片描述

4.2 为non-interactive arguments构建accumulation scheme

在这里插入图片描述
详细的构建思路为:
在这里插入图片描述

5. accumulation scheme for P C D L PC_{DL} PCDL

本文主要基于 [BGH19] Bowe等人2019年论文《Halo: Recursive Proof Composition without a Trusted Setup》batch思想,将the expensive check 推迟给decider:

  • accumulation verifier V V V仅需 O ( log ⁡ d ) O(\log d) O(logd)次scalar multiplications per accmulation;
  • decider D D D需要 O ( d ) O(d) O(d)次scalar multiplications。

因此,验证 n n n个 evaluation proofs 总共需要 O ( n log ⁡ d + d ) O(n\log d+d) O(nlogd+d)次 scalar multiplications,而如果直接验证的话需要 Θ ( n ⋅ d ) \Theta(n\cdot d) Θ(nd)
详细的accumulation scheme for P C D L PC_{DL} PCDL 构建思路为:
在这里插入图片描述

6. accumulation scheme for P C A G M PC_{AGM} PCAGM

主要借鉴了[CHMMVW20] Chiesa等人2020年论文《Marlin: Preprocessing zkSNARKs with Universal and Updatable SRS》中的batch思想。

直接验证 n n n P C A G M PC_{AGM} PCAGM evaluation proofs需要 O ( n ) O(n) O(n)个pairings,而若借助accumulation scheme,则:

  • Verifier V V V仅需 O ( n ) O(n) O(n)次scalar multiplications in G 1 \mathbb{G}_1 G1
  • decider D D D需要运行一次pairing计算。

详细的accumulation scheme for P C A G M PC_{AGM} PCAGM构建思路为:
在这里插入图片描述

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值