Groth16 学习笔记

本文探讨了如何构建基于配对的简洁非交互式零知识论证(SNARKs)以证明算术电路的正确性,特别是在证明涉及平方项的算术电路时。提出了一种方法,使得证明仅包含3个群元素,显著减少了证明的大小。此外,研究了非交互式论证的下限,表明至少需要2个群元素。最后,讨论了如何将这些论证转化为对等式验证更高效的协议。
摘要由CSDN通过智能技术生成

1. 引言

Groth 2016年论文《On the Size of Pairing-based Non-interactive Arguments》。

相关代码实现有:

  • https://github.com/matter-labs/bellman
  • https://github.com/zkcrypto/bellman
  • https://github.com/arkworks-rs/groth16

非交互式argument 允许Prover convince Verifier that a statement is true。

近期在理论和实践上,构建具有small size和low verification complexity的高效非交互式argument均取得重大进展,具有small size和low verification complexity的非交互式argument也称为SNARGs (succinct non-interactive arguments) 或 SNARKs (succinct non-interactive arguments of knowledge)。

很多SNARGs都是基于pairing 构建的,这种构建方式:

  • proof中包含多个group elements
  • verification中需验证多个pairing product方程式

1.1 相关研究

Goldwasser等人在1989年论文[GMR89]中指出,零知识证明应具有如下属性:

  • Completeness完备性:已知statement和相应的witness,Prover可convince Verifier。
  • Soundness 可靠性:malicious Prover无法convince Verifier of a false statement。
  • Zero-knowledge 零知识性:proof除了说明the truth of the statement,不会泄露任何其它信息,尤其是Prover的witness。

Blum等人在[FBM88]中将以上观点扩展至 non-interactive zero-knowledge (NIZK) proofs in the common reference string model。NIZK proofs可用于构建non-interactive cryptographic schemes,如数字签名和CCA-secure public key encryption。

零知识证明中的communication cost是一个重要的性能指标。Kilian在[Kil92]中提出了第一个sublinear communication cost的方案,其发送的bits数量比 待证明的statement size要小。Micali [Mic00]和Kilian [Kil95]中指出,Prover可利用a cryptographic function来计算Verifier的challenges,从而实现public coin和zero-knowledge。

Groth, Ostrovsky和Sahai [GOS12,GOS06,Gro06,GS12]中介绍了pairing-based NIZK proofs,产生了第一个基于standard assumption的linear size proof。[Gro10]中将这些技术与[Gro09]中的interactive zero-knowledge argument结合,提出了第一个constant size NIZK argument。[Lip12]中基于progression-free sets减少了common reference string的size。

[Gro10]中的constant size NIZK argument中构建了一系列的polynomial方程式,使用pairings来高效验证这些方程式。Gennaro [GGPR13] 中富有见解的采用基于Lagrange interpolation polynomials来构建polynomial 方程式,从而实现了pairing-based NIZK argument,其common reference string size与statement size和witness size呈正比。在[GGPR13]中给出了2种类型的方程式:

  • Quadratic span programs for proving Boolean circuit satisfiability
  • Quadratic arithmetic programs for proving arithmetic circuit satisfiability

Lipmaa [Lip13] 建议使用error correcting codes来构建更高效的quadratic span programs。
Danezis等人 [DFGK14]中优化quadratic span program为square span program,使得boolean circuit satisfiability的proof中仅包含4个group elements。

当前一些研究在理论上也取得了进展,如:
[PHGR13,BCG+13,BFR+13,BCTV14b,KPP+14,BBFR15,CTV15,WSR+15,CFH+15,SVdV16]

大多数高效实现都是将[GGPR13]中改进的quadratic arithmetic program 与 可生成合适quadratic arithmetic program的compiler 结合。如libsnark [BCTV14b, BSCG+14]中也包含基于[DFGK14]中的NIZK argument。

非交互式argument可用于:

  • Verifiable computation:如算力外包等。零知识SNARKs是Pinocchio coin [DFKP13] 和 Zerocash [BCG+14]的核心元素。

1.2 本文主要贡献

本文的主要贡献有:
(1)succinct NIZK
为arithmetic circuit satisfiability构建了pairing-based (preprocessing) SNARK。采用非对称pairing,proof中仅包含3个group element,verification中仅需验证一个paring product方程式,该方程式中一共只有3个pairing计算。
本文的构建方式支持任意类型的pairings,包括Type III pairings,Type III pairings为当前效率最高的pairings。
对boolean circuit satisfiability和arithmetic circuit satisfiability的性能对比如下图所示:【评估的维度有:common reference string (CRS)的size、proof size、Prover的computation、Verifier的computation、验证proof所需的pairing product equations的数量。】
在这里插入图片描述

(2)lower bounds
回答了Bitansky等人(TCC2013)的开放问题,说明2-move linear interactive proofs cannot have a linear decision procedure。对于使用generic asymmetric bilinear group的SNARGs,prover和verifier的group operation操作中不可能仅包含一个group element。这给出了pairing-based SNARGs的下限值。至于是否能在现有3个group elements的基础上进一步优化proof size为2个group elements,目前仍是一个开放问题。

1.3 Bilinear groups

bilinear groups ( p , G 1 , G 2 , G T , e , g , h ) (p,\mathbb{G}_1,\mathbb{G}_2,\mathbb{G}_T,e,g,h) (p,G1,G2,GT,e,g,h) 具有如下属性:

  • G 1 , G 2 , G T \mathbb{G}_1,\mathbb{G}_2,\mathbb{G}_T G1,G2,GT 为groups of prime order p p p
  • pairing e : G 1 × G 2 → G T e:\mathbb{G}_1\times \mathbb{G}_2\rightarrow \mathbb{G}_T e:G1×G2GT 为bilinear map
  • g g g为generator for G 1 \mathbb{G}_1 G1 h h h为generator for G 2 \mathbb{G}_2 G2 e ( g , h ) e(g,h) e(g,h)为generator for G T \mathbb{G}_T GT
  • 存在高效的算法来计算group operations、evaluate bilinear map、decide membership of the groups、decide equality of group elements以及sample generators of the groups。将这些计算统称为generic group operations。

基于的安全假设为DLP。
做了如下约定:

  • [ a ] 1 [a]_1 [a]1表示 g a g^a ga [ b ] 2 [b]_2 [b]2表示 h b h^b hb [ c ] T [c]_T [c]T表示 e ( g , h ) c e(g,h)^c e(g,h)c
  • g = [ 1 ] 1 , h = [ 1 ] 2 , e ( g , h ) = [ 1 ] T g=[1]_1,h=[1]_2,e(g,h)=[1]_T g=[1]1,h=[1]2,e(g,h)=[1]T
  • [ a ] T + [ b ] T = [ a + b ] T [a]_T+[b]_T=[a+b]_T [a]T+[b]T=[a+b]T
  • [ a ⃗ ] i + [ b ⃗ ] i = [ a ⃗ + b ⃗ ] i [\vec{a}]_i+[\vec{b}]_i=[\vec{a}+\vec{b}]_i [a ]i+[b ]i=[a +b ]i为a vector of group elements

1.4 non-interactive zero-knowledge arguments of knowledge

relation ( ϕ , w ) ∈ R (\phi,w)\in R (ϕ,w)R,其中 ϕ \phi ϕ为statement, w w w为witness。
publicly verifiable non-interactive argument包含了4个probabilistic polynomial algorithms ( S e t u p , P r o v e , V f y , S i m ) (Setup, Prove, Vfy, Sim) (Setup,Prove,Vfy,Sim)

  • ( σ , τ ) ← S e t u p ( R ) (\sigma,\tau)\leftarrow Setup(R) (σ,τ)Setup(R):setup算法,输入为relation R R R,输出为common reference string σ \sigma σ和相应的simulation trapdoor τ \tau τ
  • π ← P r o v e ( R , σ , ϕ , w ) \pi\leftarrow Prove(R,\sigma,\phi,w) πProve(R,σ,ϕ,w):Prover算法,输入为common reference string σ \sigma σ ( ϕ , w ) ∈ R (\phi,w)\in R (ϕ,w)R,输出为argument π \pi π
  • 0 / 1 ← V f y ( R , σ , ϕ , π ) 0/1\leftarrow Vfy(R,\sigma,\phi,\pi) 0/1Vfy(R,σ,ϕ,π):Verification算法,输入为common reference string σ \sigma σ、statement ϕ \phi ϕ、argument π \pi π,输出为0(reject) 或 1(accept)。
  • π ← S i m ( R , τ , ϕ ) \pi\leftarrow Sim(R,\tau,\phi) πSim(R,τ,ϕ):Simulator算法,输入为simulation trapdoor τ \tau τ、statement ϕ \phi ϕ,输出为argument π \pi π

可将common reference σ \sigma σ分为两部分:

  • σ P \sigma_P σP,给Prover用
  • σ V \sigma_V σV,给Veriifier用

σ V \sigma_V σV可根据 σ P \sigma_P σP推导获得,则可称为public verifiable non-interactive argument。

2. Quadratic arithmetic programs

考虑只有加法和乘法门的arithmetic circuit over finite field F \mathbb{F} F,存在statements和witnesses满足所有 n n n个方程式( n n n个乘法gates, m m m个wires):
∑ a i u i , q ⋅ ∑ a i v i , q = ∑ a i w i , q \sum a_iu_{i,q}\cdot \sum a_iv_{i,q}=\sum a_i w_{i,q} aiui,qaivi,q=aiwi,q
其中, a 0 = 1 a_0=1 a0=1 a 1 , ⋯   , a m ∈ F a_1,\cdots,a_m\in\mathbb{F} a1,,amF u i , q , v i , q , w i , q u_{i,q},v_{i,q},w_{i,q} ui,q,vi,q,wi,q为constants in F \mathbb{F} F specifying the q q qth equation。

对于某乘法门 a i ⋅ a j = a k a_i\cdot a_j=a_k aiaj=ak,设置相应行的 u i = 1 , v j = 1 , w k = 1 u_i=1,v_j=1,w_k=1 ui=1,vj=1,wk=1,设置该行其他元素为0。
对于加法门,不计入方程式数量中。即,若 a i + a j = a k a_i+a_j=a_k ai+aj=ak a k ⋅ a l a_k\cdot a_l akal,则表示为 ( a i + a j ) ⋅ a l (a_i+a_j)\cdot a_l (ai+aj)al,跳过 a k a_k ak的计算。

根据[GGPR13]中的规则,假设 F \mathbb{F} F足够大,将arithmetic constraints 表示为quadratic arithmetic program。
取任意不同的值 r 1 , ⋯   , r n ∈ F r_1,\cdots,r_n\in\mathbb{F} r1,,rnF,定义 t ( x ) = ∏ q = 1 n ( x − r q ) t(x)=\prod_{q=1}^{n}(x-r_q) t(x)=q=1n(xrq)
u i ( x ) , v i ( x ) , w i ( x ) u_i(x),v_i(x),w_i(x) ui(x),vi(x),wi(x)为degree n − 1 n-1 n1多项式,满足:
u i ( r q ) = u i , q , v i ( r q ) = v i , q , w i ( r q ) = w i , q u_i(r_q)=u_{i,q},v_i(r_q)=v_{i,q},w_i(r_q)=w_{i,q} ui(rq)=ui,q,vi(rq)=vi,q,wi(rq)=wi,q for i = 0 , ⋯   , m , q = 1 , ⋯   , n i=0,\cdots,m,q=1,\cdots,n i=0,,m,q=1,,n

于是有,对于 a 0 = 1 , a 1 , ⋯   , a m ∈ F a_0=1,a_1,\cdots,a_m\in\mathbb{F} a0=1,a1,,amF 满足 n n n个方程式,当且仅当,对于每一个 r 1 , ⋯   , r q r_1,\cdots,r_q r1,,rq,以下等式成立:
∑ i = 0 m a i u i ( r q ) ⋅ ∑ i = 0 m a i v i ( r q ) = ∑ i = 0 m a i w i ( r q ) \sum_{i=0}^{m}a_iu_i(r_q)\cdot \sum_{i=0}^{m}a_iv_i(r_q)=\sum_{i=0}^{m}a_iw_i(r_q) i=0maiui(rq)i=0maivi(rq)=i=0maiwi(rq)

由于 t ( X ) t(X) t(X)为the lowest degree monomial with t ( r q ) = 0 t(r_q)=0 t(rq)=0 in each point,可表示为:
∑ i = 0 m a i u i ( X ) ⋅ ∑ i = 0 m a i v i ( X ) = ∑ i = 0 m a i w i ( X ) m o d    t ( X ) \sum_{i=0}^{m}a_iu_i(X)\cdot \sum_{i=0}^{m}a_iv_i(X)=\sum_{i=0}^{m}a_iw_i(X)\mod t(X) i=0maiui(X)i=0maivi(X)=i=0maiwi(X)modt(X)

最终,整个quadratic arithmetic programs R R R 可表示为:
R = ( F , a u x , l , { u i ( X ) , v i ( X ) , w i ( X ) } i = 0 m , t ( X ) ) R=(\mathbb{F},aux,l,\{u_i(X),v_i(X),w_i(X)\}_{i=0}^{m},t(X)) R=(F,aux,l,{ui(X),vi(X),wi(X)}i=0m,t(X))
其中, F \mathbb{F} F为finite field, a u x aux aux为some auxiliary information, 1 ≤ l ≤ m 1\leq l\leq m 1lm u i ( X ) , v i ( X ) , w i ( X ) , t ( X ) ∈ F [ X ] u_i(X),v_i(X),w_i(X),t(X)\in\mathbb{F}[X] ui(X),vi(X),wi(X),t(X)F[X],且 u i ( X ) , v i ( X ) , w i ( X ) u_i(X),v_i(X),w_i(X) ui(X),vi(X),wi(X)的degree严格低于 t ( X ) t(X) t(X)的degree, t ( X ) t(X) t(X)的degree为 n n n

定义 a 0 = 1 a_0=1 a0=1,以上description可表示为如下binary relation:
在这里插入图片描述

3. non-interactive linear proofs (NILP)

Bitansky [BCI+13] 中提出了基于2-move algebraic input-oblivious linear interactive proofs构建SNARK的方法,为了便于区分,本文将该方法称为non-interactive linear proof (NILP)。

NILP的运行流程为:

  • ( σ ⃗ , τ ⃗ ) ← S e t u p ( R ) (\vec{\sigma},\vec{\tau})\leftarrow Setup(R) (σ ,τ )Setup(R):setup算法,为probabilistic polynomial time算法,输入为relation R R R,输出为向量 σ ⃗ ∈ F m , τ ⃗ ∈ F n \vec{\sigma}\in\mathbb{F}^m,\vec{\tau}\in\mathbb{F}^n σ Fm,τ Fn。为了简化描述, σ ⃗ \vec{\sigma} σ 中总是包含1 as an entry,使得affine和linear functions of σ \sigma σ是无区别的。

  • π ⃗ ← P r o v e ( R , σ ⃗ , ϕ , w ) \vec{\pi}\leftarrow Prove(R,\vec{\sigma},\phi,w) π Prove(R,σ ,ϕ,w):Prover算法,主要分为2个阶段:
    1)运行 Π ← P r o o f M a t r i x ( R , ϕ , w ) \mathbf{\Pi}\leftarrow ProofMatrix(R,\phi,w) ΠProofMatrix(R,ϕ,w),其中 P r o o f M a t r i x ProofMatrix ProofMatrix为probabilistic polynomial time 算法,输出为矩阵 Π ∈ F k × m \mathbf{\Pi}\in\mathbb{F}^{k\times m} ΠFk×m
    2)计算proof π ⃗ = Π σ ⃗ \vec{\pi}=\mathbf{\Pi}\vec{\sigma} π =Πσ

  • 0 / 1 ← V f y ( R , σ ⃗ , ϕ , π ) 0/1\leftarrow Vfy(R,\vec{\sigma},\phi,\pi) 0/1Vfy(R,σ ,ϕ,π):为Verifier算法,主要分为以下2个阶段:
    1)运行deterministic polynomial time algorithm t ⃗ ← T e s t ( R , ϕ ) \vec{t}\leftarrow Test(R,\phi) t Test(R,ϕ),以获得arithmetic circuit t ⃗ : F m + k → F η \vec{t}:\mathbb{F}^{m+k}\rightarrow \mathbb{F}^{\eta} t :Fm+kFη,对应为the evaluation of a vector of multi-variate polynomials of total degree d d d
    2)当且仅当 t ⃗ ( σ ⃗ , π ⃗ ) = 0 ⃗ \vec{t}(\vec{\sigma},\vec{\pi})=\vec{0} t (σ ,π )=0 时,accept the proof。

NILP的价值:

  • 借助pairings,可将NILP转换为publicly verifiable non-interactive arguments
  • 借助a variant of Paillier encryption [BCI+13],可将NILP转换为designated verifier non-interactive arguments。

基于Type III pairing,基于DLP假设构建NILP,需对其进行split切分:

  • common reference string切分: σ ⃗ = ( σ ⃗ 1 , σ ⃗ 2 ) \vec{\sigma}=(\vec{\sigma}_1,\vec{\sigma}_2) σ =(σ 1,σ 2)
  • proof切分: π ⃗ = ( π ⃗ 1 , π ⃗ 2 ) \vec{\pi}=(\vec{\pi}_1,\vec{\pi}_2) π =(π 1,π 2),切分的proof与切分的crs存在对应关系。
  • 对proof进行verify时,对应的quadratic equation中每个变量的degree应为1。

3.1 split NILP

split NILP的运行流程为:

  • ( σ ⃗ , τ ⃗ ) ← S e t u p ( R ) (\vec{\sigma},\vec{\tau})\leftarrow Setup(R) (σ ,τ )Setup(R):setup算法,为probabilistic polynomial time算法,输入为relation R R R,输出为向量 σ ⃗ = ( σ 1 , σ 2 ) ∈ F m 1 × F m 2 , τ ⃗ ∈ F n \vec{\sigma}=(\sigma_1,\sigma_2)\in\mathbb{F}^{m_1}\times\mathbb{F}^{m_2},\vec{\tau}\in\mathbb{F}^n σ =(σ1,σ2)Fm1×Fm2,τ Fn。为了简化描述, σ ⃗ 1 和 σ ⃗ 2 \vec{\sigma}_1和\vec{\sigma}_2 σ 1σ 2中总是包含1 as an entry,使得affine和linear functions of σ \sigma σ是无区别的。

  • π ⃗ ← P r o v e ( R , σ ⃗ , ϕ , w ) \vec{\pi}\leftarrow Prove(R,\vec{\sigma},\phi,w) π Prove(R,σ ,ϕ,w):Prover算法,主要分为2个阶段:
    1)运行 Π ← P r o o f M a t r i x ( R , ϕ , w ) \mathbf{\Pi}\leftarrow ProofMatrix(R,\phi,w) ΠProofMatrix(R,ϕ,w),其中 P r o o f M a t r i x ProofMatrix ProofMatrix为probabilistic polynomial time 算法,输出为矩阵 Π = ( Π 1 0 0 Π 2 ) \mathbf{\Pi}=\begin{pmatrix} \mathbf{\Pi}_1 & 0\\ 0 & \mathbf{\Pi}_2 \end{pmatrix} Π=(Π100Π2),其中 Π 1 ∈ F k 1 × m 1 , Π 2 ∈ F k 2 × m 2 \mathbf{\Pi}_1\in\mathbb{F}^{k_1\times m_1},\mathbf{\Pi}_2\in\mathbb{F}^{k_2\times m_2} Π1Fk1×m1,Π2Fk2×m2
    2)计算proof π ⃗ 1 = Π 1 σ ⃗ 1 , π ⃗ 2 = Π 2 σ ⃗ 2 \vec{\pi}_1=\mathbf{\Pi}_1\vec{\sigma}_1,\vec{\pi}_2=\mathbf{\Pi}_2\vec{\sigma}_2 π 1=Π1σ 1π 2=Π2σ 2,返回 π ⃗ = ( π ⃗ 1 , π ⃗ 2 ) \vec{\pi}=(\vec{\pi}_1,\vec{\pi}_2) π =(π 1,π 2)

  • 0 / 1 ← V f y ( R , σ ⃗ , ϕ , π ) 0/1\leftarrow Vfy(R,\vec{\sigma},\phi,\pi) 0/1Vfy(R,σ ,ϕ,π):为Verifier算法,主要分为以下2个阶段:
    1)运行deterministic polynomial time algorithm t ⃗ ← T e s t ( R , ϕ ) \vec{t}\leftarrow Test(R,\phi) t Test(R,ϕ),以获得arithmetic circuit t ⃗ : F m 1 + k 1 + m 2 + k 2 → F η \vec{t}:\mathbb{F}^{m_1+k_1+m_2+k_2}\rightarrow \mathbb{F}^{\eta} t :Fm1+k1+m2+k2Fη,对应矩阵 T 1 , ⋯   , T η ∈ F ( m 1 + k 1 ) × ( m 2 + k 2 ) T_1,\cdots,T_{\eta}\in\mathbb{F}^{(m_1+k_1)\times(m_2+k_2)} T1,,TηF(m1+k1)×(m2+k2)
    2)当且仅当对所有的矩阵 T 1 , ⋯   , T η T_1,\cdots,T_{\eta} T1,,Tη,都有 ( σ ⃗ 1 π ⃗ 1 ) ⋅ T i ( σ ⃗ 2 π ⃗ 2 ) = 0 \begin{pmatrix} \vec{\sigma}_1 \\ \vec{\pi}_1 \end{pmatrix}\cdot T_i \begin{pmatrix} \vec{\sigma}_2 \\ \vec{\pi}_2 \end{pmatrix}=0 (σ 1π 1)Ti(σ 2π 2)=0时,accept the proof。

3.2 基于pairing 由split NILP构建的non-interactive argument

基于pairing 由split NILP构建的non-interactive argument ( S e t u p ′ , P r o v e ′ , V f y ′ , S i m ′ ) (Setup', Prove', Vfy',Sim') (Setup,Prove,Vfy,Sim)为:

  • ( σ ⃗ , τ ⃗ ) ← S e t u p ′ ( R ) (\vec{\sigma},\vec{\tau})\leftarrow Setup'(R) (σ ,τ )Setup(R):运行 ( σ ⃗ 1 , σ ⃗ 2 , τ ⃗ ) ← S e t u p ( R ) (\vec{\sigma}_1,\vec{\sigma}_2,\vec{\tau})\leftarrow Setup(R) (σ 1,σ 2,τ )Setup(R) ,输入为relation R R R,输出为向量 σ ⃗ = ( [ σ 1 ] 1 , [ σ 2 ] 2 ) ∈ G 1 m 1 × G 2 m 2 , τ ⃗ ∈ F n \vec{\sigma}=([\sigma_1]_1, [\sigma_2]_2)\in\mathbb{G}_1^{m_1}\times\mathbb{G}_2^{m_2},\vec{\tau}\in\mathbb{F}^n σ =([σ1]1,[σ2]2)G1m1×G2m2,τ Fn

  • π ⃗ ← P r o v e ′ ( R , σ ⃗ , ϕ , w ) \vec{\pi}\leftarrow Prove'(R,\vec{\sigma},\phi,w) π Prove(R,σ ,ϕ,w):Prover算法,主要分为2个阶段:
    1)运行 Π ← P r o o f M a t r i x ( R , ϕ , w ) \mathbf{\Pi}\leftarrow ProofMatrix(R,\phi,w) ΠProofMatrix(R,ϕ,w),其中 P r o o f M a t r i x ProofMatrix ProofMatrix为probabilistic polynomial time 算法,输出为矩阵 Π = ( Π 1 0 0 Π 2 ) \mathbf{\Pi}=\begin{pmatrix} \mathbf{\Pi}_1 & 0\\ 0 & \mathbf{\Pi}_2 \end{pmatrix} Π=(Π100Π2),其中 Π 1 ∈ F k 1 × m 1 , Π 2 ∈ F k 2 × m 2 \mathbf{\Pi}_1\in\mathbb{F}^{k_1\times m_1},\mathbf{\Pi}_2\in\mathbb{F}^{k_2\times m_2} Π1Fk1×m1,Π2Fk2×m2
    2)计算proof π ⃗ 1 = Π 1 σ ⃗ 1 , π ⃗ 2 = Π 2 σ ⃗ 2 \vec{\pi}_1=\mathbf{\Pi}_1\vec{\sigma}_1,\vec{\pi}_2=\mathbf{\Pi}_2\vec{\sigma}_2 π 1=Π1σ 1π 2=Π2σ 2,返回 π ⃗ = ( [ π ⃗ 1 ] 1 , [ π ⃗ 2 ] 2 ) ∈ G 1 k 1 × G 2 k 2 \vec{\pi}=([\vec{\pi}_1]_1,[\vec{\pi}_2]_2)\in\mathbb{G}_1^{k_1}\times \mathbb{G}_2^{k2} π =([π 1]1,[π 2]2)G1k1×G2k2

  • 0 / 1 ← V f y ′ ( R , σ ⃗ , ϕ , π ) 0/1\leftarrow Vfy'(R,\vec{\sigma},\phi,\pi) 0/1Vfy(R,σ ,ϕ,π):为Verifier算法,主要分为以下2个阶段:
    1)运行deterministic polynomial time algorithm t ⃗ ← T e s t ( R , ϕ ) \vec{t}\leftarrow Test(R,\phi) t Test(R,ϕ),以获得arithmetic circuit t ⃗ : F m 1 + k 1 + m 2 + k 2 → F η \vec{t}:\mathbb{F}^{m_1+k_1+m_2+k_2}\rightarrow \mathbb{F}^{\eta} t :Fm1+k1+m2+k2Fη,对应矩阵 T 1 , ⋯   , T η ∈ F ( m 1 + k 1 ) × ( m 2 + k 2 ) T_1,\cdots,T_{\eta}\in\mathbb{F}^{(m_1+k_1)\times(m_2+k_2)} T1,,TηF(m1+k1)×(m2+k2)
    2)当且仅当对所有的矩阵 T 1 , ⋯   , T η T_1,\cdots,T_{\eta} T1,,Tη,都有 [ σ ⃗ 1 π ⃗ 1 ] 1 ⋅ T i [ σ ⃗ 2 π ⃗ 2 ] 2 = [ 0 ] T \begin{bmatrix} \vec{\sigma}_1 \\ \vec{\pi}_1 \end{bmatrix}_1\cdot T_i \begin{bmatrix} \vec{\sigma}_2 \\ \vec{\pi}_2 \end{bmatrix}_2=[0]_T [σ 1π 1]1Ti[σ 2π 2]2=[0]T时,accept the proof。

  • π ← S i m ′ ( R , τ ⃗ , ϕ ) \pi\leftarrow Sim'(R,\vec{\tau},\phi) πSim(R,τ ,ϕ):Simulate ( π ⃗ 1 , π ⃗ 2 ) ← S i m ( R , τ ⃗ , ϕ ) (\vec{\pi}_1,\vec{\pi}_2)\leftarrow Sim(R,\vec{\tau},\phi) (π 1,π 2)Sim(R,τ ,ϕ),返回 π ⃗ = ( [ π ⃗ 1 ] 1 , [ π ⃗ 2 ] 2 ) \vec{\pi}=([\vec{\pi}_1]_1, [\vec{\pi}_2]_2) π =([π 1]1,[π 2]2)

4. 构建non-interactive arguments

接下来,将为quadratic arithmetic programs构建pairing-based NIZK argument,其proof中仅包含3个group elements。
具体的构建步骤分为2步:

  • 1)为quadratic arithmetic programs构建NILP
  • 2)该NILP为split NILP,可利用之前提到的compilation技术将其转换为pairing-based NIZK argument。

4.1 NILP for quadratic arithmetic programs

quadratic arithmetic program对应的Relation表示为:
R = ( F , a u x , l , { u i ( X ) , v i ( X ) , w i ( X ) } i = 0 m , t ( X ) ) R=(\mathbb{F},aux,l,\{u_i(X),v_i(X),w_i(X)\}_{i=0}^{m},t(X)) R=(F,aux,l,{ui(X),vi(X),wi(X)}i=0m,t(X))

其中 ( a 1 , ⋯   , a l ) ∈ F l (a_1,\cdots,a_l)\in\mathbb{F}^l (a1,,al)Fl为statement, ( a l + 1 , ⋯   , a m ) ∈ F m − l (a_{l+1},\cdots, a_m)\in\mathbb{F}^{m-l} (al+1,,am)Fml 为witness, a 0 = 1 a_0=1 a0=1

满足:
∑ i = 0 m a i u i ( X ) ⋅ ∑ i = 0 m a i v i ( X ) = ∑ i = 0 m a i w i ( X ) + h ( X ) t ( X ) \sum_{i=0}^{m}a_iu_i(X)\cdot\sum_{i=0}^{m}a_iv_i(X)=\sum_{i=0}^{m}a_iw_i(X)+h(X)t(X) i=0maiui(X)i=0maivi(X)=i=0maiwi(X)+h(X)t(X)

其中, t ( X ) t(X) t(X)的degree为 n n n,quotient polynomial h ( X ) h(X) h(X)的degree 为 n − 2 n-2 n2

相应的 ( S e t u p , P r o v e , V f y , S i m ) (Setup, Prove, Vfy,Sim) (Setup,Prove,Vfy,Sim) 算法为:

  • ( σ ⃗ , τ ⃗ ) ← S e t u p ( R ) (\vec{\sigma},\vec{\tau})\leftarrow Setup(R) (σ ,τ )Setup(R):选择 α , β , γ , δ , x ← F ∗ \alpha,\beta,\gamma,\delta,x\leftarrow \mathbb{F}^* α,β,γ,δ,xF,设置 τ ⃗ = ( α , β , γ , δ , x ) \vec{\tau}=(\alpha,\beta,\gamma,\delta,x) τ =(α,β,γ,δ,x) σ ⃗ = ( α , β , γ , δ , { x i } i = 0 n − 1 , { β u i ( x ) + α v i ( x ) + w i ( x ) γ } i = 0 l ) , { β u i ( x ) + α v i ( x ) + w i ( x ) δ } i = l + 1 m , { x i t ( x ) δ } i = 0 n − 2 \vec{\sigma}=(\alpha,\beta,\gamma,\delta,\{x^i\}_{i=0}^{n-1},\{\frac{\beta u_i(x)+\alpha v_i(x)+w_i(x)}{\gamma}\}_{i=0}^{l}), \{\frac{\beta u_i(x)+\alpha v_i(x)+w_i(x)}{\delta}\}_{i=l+1}^{m}, \{\frac{x^it(x)}{\delta}\}_{i=0}^{n-2} σ =(α,β,γ,δ,{xi}i=0n1,{γβui(x)+αvi(x)+wi(x)}i=0l),{δβui(x)+αvi(x)+wi(x)}i=l+1m,{δxit(x)}i=0n2

  • π ← P r o v e ( R , σ ⃗ , a 1 , ⋯   , a m ) \pi\leftarrow Prove(R,\vec{\sigma}, a_1,\cdots,a_m) πProve(R,σ ,a1,,am):选择 r , s ← F r,s\leftarrow \mathbb{F} r,sF,计算 3 × ( m + 2 n + 4 ) 3\times(m+2n+4) 3×(m+2n+4)矩阵 Π \mathbf{\Pi} Π,使得 π ⃗ = Π σ ⃗ = ( A , B , C ) \vec{\pi}=\mathbf{\Pi}\vec{\sigma}=(A,B,C) π =Πσ =(A,B,C),其中:
    A = α + ∑ i = 0 m a i u i ( x ) + r δ A=\alpha+\sum_{i=0}^{m}a_iu_i(x)+r\delta A=α+i=0maiui(x)+rδ
    B = β + ∑ i = 0 m a i v i ( x ) + s δ B=\beta+\sum_{i=0}^{m}a_iv_i(x)+s\delta B=β+i=0maivi(x)+sδ
    C = ∑ i = l + 1 m a i ( β u i ( x ) + α v i ( x ) + w i ( x ) ) + h ( x ) t ( x ) δ + A s + r B − r s δ C=\frac{\sum_{i=l+1}^{m}a_i(\beta u_i(x)+\alpha v_i(x)+w_i(x))+h(x)t(x)}{\delta}+As+rB-rs\delta C=δi=l+1mai(βui(x)+αvi(x)+wi(x))+h(x)t(x)+As+rBrsδ

  • 0 / 1 ← V f y ( R , σ ⃗ , a 1 , ⋯   , a l , π ⃗ ) 0/1\leftarrow Vfy(R,\vec{\sigma}, a_1,\cdots,a_l, \vec{\pi}) 0/1Vfy(R,σ ,a1,,al,π ):计算a quadratic multi-variate polynomial t t t,使得 t ( σ ⃗ , π ⃗ ) = 0 t(\vec{\sigma},\vec{\pi})=0 t(σ ,π )=0,对应的test为:
    A ⋅ B = α ⋅ β + ∑ i = 0 l a i ( β u i ( x ) + α v i ( x ) + w i ( x ) ) γ ⋅ γ + C ⋅ δ A\cdot B= \alpha \cdot \beta + \frac{\sum_{i=0}^{l}a_i(\beta u_i(x)+\alpha v_i(x)+w_i(x))}{\gamma}\cdot \gamma + C\cdot \delta AB=αβ+γi=0lai(βui(x)+αvi(x)+wi(x))γ+Cδ
    若以上test成立,则accept the proof。

  • π ⃗ ← S i m ( R , τ ⃗ , a 1 , ⋯   , a l ) \vec{\pi}\leftarrow Sim(R,\vec{\tau}, a_1,\cdots,a_l) π Sim(R,τ ,a1,,al):选择 A , B ← F A,B\leftarrow \mathbb{F} A,BF,计算 C = A B − α β − ∑ i = 0 l a i ( β u i ( x ) + α v i ( x ) + w i ( x ) ) δ C=\frac{AB-\alpha\beta-\sum_{i=0}^{l}a_i(\beta u_i(x)+\alpha v_i(x)+w_i(x))}{\delta} C=δABαβi=0lai(βui(x)+αvi(x)+wi(x)),返回 π ⃗ = ( A , B , C ) \vec{\pi}=(A,B,C) π =(A,B,C)

以上:

  • α , β \alpha,\beta α,β:用于保证 A , B , C A,B,C A,B,C are consistent with each other in the choice of a 0 , ⋯   , a m a_0,\cdots, a_m a0,,am
    verification equation中的 α ⋅ β \alpha\cdot \beta αβ product用于保证 A A A and B B B involve non-trivial α \alpha α and β \beta β components。即意味着 A ⋅ B A\cdot B AB product中包含了a linear dependence on α \alpha α and β \beta β,稍后将证明该linear dependence can only be balanced out by C C C with a consistent choice of a 0 , ⋯   , a m a_0,\cdots, a_m a0,,am in all three of A , B A,B A,B and C C C

  • γ , δ \gamma, \delta γ,δ:用于使verification equation中的后2个product 与 第一个product 无关,通过分别相应除以 γ , δ \gamma,\delta γ,δ
    这可以避免mixing and mathching of elements intended for different products in the verification equation。

  • r , s r,s r,s:用于randomize the proof来实现zero-knowledge。

以上NILP构建的proof具有3个field element,具有如下特性:

  • perfect completeness
  • perfect zero-knowledge
  • statistical knowledge soundness against affine prover strategies

4.1.1 是否可进一步将proof reduce为2个Field element?

以上NILP构建的proof具有3个field element,是否可进一步将其reduce为2个field element呢?

Danezis等人[DFGK14] 中实现了2 field element NILP for boolean circuit satisfiability。

同时,通过将circuit改造为只有squaring gates,也可能实现2-element NILP for arithmetic circuit satisfiability。因为,对于每个multiplication gate a ⋅ b = c a\cdot b =c ab=c,可将其改造为 ( a + b ) 2 − ( a − b ) 2 = 4 c (a+b)^2-(a-b)^2=4c (a+b)2(ab)2=4c

当arithmetic circuit中仅有squaring gate时,对于所有的 i i i,具有 u i ( x ) = v i ( x ) u_i(x)=v_i(x) ui(x)=vi(x)
选择NILP中 r = s r=s r=s,则有 B = A + β − α B=A+\beta-\alpha B=A+βα,Prover仅需发送2个elements A 和 C A和C AC 来make a convincing proof。

将arithmetic circuit 改造为仅有squaring gate 可能会使gate数量翻倍,同时,需要引入额外的wires来表达the subtraction of the squares。

因此,这种reduction是以牺牲significant computational cost为代价的。

4.2 NIZK arguments for quadratic arithmetic programs

本节将为arithmetic program relation:
R = ( p , G 1 , G 2 , G T , e , g , h , l , { u i ( X ) , v i ( X ) , w i ( X ) } i = 0 m , t ( X ) ) R=(p,\mathbb{G}_1,\mathbb{G}_2,\mathbb{G}_T,e,g,h,l,\{u_i(X),v_i(X),w_i(X)\}_{i=0}^{m},t(X)) R=(p,G1,G2,GT,e,g,h,l,{ui(X),vi(X),wi(X)}i=0m,t(X))

构建pairing-based NIZK argument。

其中:

  • ∣ p ∣ = λ |p|=\lambda p=λ,对应的field为 Z p \mathbb{Z}_p Zp
  • ( a 1 , ⋯   , a l ) ∈ F l (a_1,\cdots,a_l)\in\mathbb{F}^l (a1,,al)Fl为statement,即public info。
  • ( a l + 1 , ⋯   , a m ) ∈ F m − l (a_{l+1},\cdots,a_m)\in\mathbb{F}^{m-l} (al+1,,am)Fml为witness,即private info。
  • a 0 = 1 a_0=1 a0=1

满足:
∑ i = 0 m a i u i ( X ) ⋅ ∑ i = 0 m a i v i ( X ) = ∑ i = 0 m a i w i ( X ) + h ( X ) t ( X ) \sum_{i=0}^{m}a_iu_i(X)\cdot\sum_{i=0}^{m}a_iv_i(X)=\sum_{i=0}^{m}a_iw_i(X)+h(X)t(X) i=0maiui(X)i=0maivi(X)=i=0maiwi(X)+h(X)t(X)
其中quotient polynomial h ( X ) h(X) h(X)的degree为 n − 2 n-2 n2

在以上3.2节中指出了:
NILP的一个重要的设计特征是——其很容易就可实现a split NILP。

proof elements A , B , C A,B,C A,B,C 在verification equation中仅使用一次,因此很容易assign them to different sides of the bilinear test。

通过将common reference string split为2部分,可enable the computation of each side of the proof,从而实现split NILP。该split NILP同时是disclosure-free的,因此可compiled into a NIZK argument in the generic group model(具体参见3.2节)。

通常的pairing-friendly elliptic curve,其 G 1 \mathbb{G}_1 G1的group element representation要小于 G 2 \mathbb{G}_2 G2的 [GPS08]。因此,取 A , C ∈ G 1 , B ∈ G 2 A,C\in\mathbb{G}_1,B\in\mathbb{G}_2 A,CG1,BG2来使效率最优。
基于Pairing的详细实现为:

  • ( σ ⃗ , τ ⃗ ) ← S e t u p ( R ) (\vec{\sigma},\vec{\tau})\leftarrow Setup(R) (σ ,τ )Setup(R):选择 α , β , γ , δ , x ← F ∗ \alpha,\beta,\gamma,\delta,x\leftarrow \mathbb{F}^* α,β,γ,δ,xF,设置 τ ⃗ = ( α , β , γ , δ , x ) \vec{\tau}=(\alpha,\beta,\gamma,\delta,x) τ =(α,β,γ,δ,x) σ ⃗ = ( [ σ ⃗ 1 ] 1 , [ σ ⃗ 2 ] 2 ) \vec{\sigma}=([\vec{\sigma}_1]_1,[\vec{\sigma}_2]_2) σ =([σ 1]1,[σ 2]2),其中:
    σ ⃗ 1 = ( α , β , γ , δ , { x i } i = 0 n − 1 , { β u i ( x ) + α v i ( x ) + w i ( x ) γ } i = 0 l , { β u i ( x ) + α v i ( x ) + w i ( x ) δ } i = l + 1 m , { x i t ( x ) δ } i = 0 n − 2 ) , σ ⃗ 2 = ( β , γ , δ , { x i } i = 0 n − 1 ) \vec{\sigma}_1 = (\alpha,\beta,\gamma,\delta,\{x^i\}_{i=0}^{n-1},\{\frac{\beta u_i(x)+\alpha v_i(x)+w_i(x)}{\gamma}\}_{i=0}^{l}, \{\frac{\beta u_i(x)+\alpha v_i(x)+w_i(x)}{\delta}\}_{i=l+1}^{m}, \{\frac{x^it(x)}{\delta}\}_{i=0}^{n-2}), \vec{\sigma}_2=(\beta,\gamma,\delta,\{x^i\}_{i=0}^{n-1}) σ 1=(α,β,γ,δ,{xi}i=0n1,{γβui(x)+αvi(x)+wi(x)}i=0l,{δβui(x)+αvi(x)+wi(x)}i=l+1m,{δxit(x)}i=0n2),σ 2=(β,γ,δ,{xi}i=0n1)

  • π ← P r o v e ( R , σ ⃗ , a 1 , ⋯   , a m ) \pi\leftarrow Prove(R,\vec{\sigma}, a_1,\cdots,a_m) πProve(R,σ ,a1,,am):选择 r , s ← F r,s\leftarrow \mathbb{F} r,sF,计算 π ⃗ = ( [ A ] 1 , [ C ] 1 , [ B ] 2 ) \vec{\pi}=([A]_1,[C]_1,[B]_2) π =([A]1,[C]1,[B]2),其中:
    A = α + ∑ i = 0 m a i u i ( x ) + r δ A=\alpha+\sum_{i=0}^{m}a_iu_i(x)+r\delta A=α+i=0maiui(x)+rδ
    B = β + ∑ i = 0 m a i v i ( x ) + s δ B=\beta+\sum_{i=0}^{m}a_iv_i(x)+s\delta B=β+i=0maivi(x)+sδ
    C = ∑ i = l + 1 m a i ( β u i ( x ) + α v i ( x ) + w i ( x ) ) + h ( x ) t ( x ) δ + A s + r B − r s δ C=\frac{\sum_{i=l+1}^{m}a_i(\beta u_i(x)+\alpha v_i(x)+w_i(x))+h(x)t(x)}{\delta}+As+rB-rs\delta C=δi=l+1mai(βui(x)+αvi(x)+wi(x))+h(x)t(x)+As+rBrsδ

  • 0 / 1 ← V f y ( R , σ ⃗ , a 1 , ⋯   , a l , π ⃗ ) 0/1\leftarrow Vfy(R,\vec{\sigma}, a_1,\cdots,a_l, \vec{\pi}) 0/1Vfy(R,σ ,a1,,al,π ):解析 π ⃗ = ( [ A ] 1 , [ C ] 1 , [ B ] 2 ) ∈ G 1 2 × G 2 \vec{\pi}=([A]_1,[C]_1,[B]_2)\in\mathbb{G}_1^2\times \mathbb{G}_2 π =([A]1,[C]1,[B]2)G12×G2,对应的test为:
    [ A ] 1 ⋅ [ B ] 2 = [ α ] 1 ⋅ [ β ] 2 + ∑ i = 0 l a i [ ( β u i ( x ) + α v i ( x ) + w i ( x ) ) γ ] 1 ⋅ [ γ ] 2 + [ C ] 1 ⋅ [ δ ] 2 [A]_1\cdot [B]_2= [\alpha]_1 \cdot [\beta]_2 + \sum_{i=0}^{l}a_i[\frac{(\beta u_i(x)+\alpha v_i(x)+w_i(x))}{\gamma}]_1\cdot [\gamma]_2 + [C]_1\cdot [\delta]_2 [A]1[B]2=[α]1[β]2+i=0lai[γ(βui(x)+αvi(x)+wi(x))]1[γ]2+[C]1[δ]2
    若以上test成立,则accept the proof。

  • π ⃗ ← S i m ( R , τ ⃗ , a 1 , ⋯   , a l ) \vec{\pi}\leftarrow Sim(R,\vec{\tau}, a_1,\cdots,a_l) π Sim(R,τ ,a1,,al):选择 A , B ← F A,B\leftarrow \mathbb{F} A,BF,计算simulated proof π ⃗ = ( [ A ] 1 , [ C ] 1 , [ B ] 2 ) \vec{\pi}=([A]_1,[C]_1,[B]_2) π =([A]1,[C]1,[B]2),其中 C = A B − α β − ∑ i = 0 l a i ( β u i ( x ) + α v i ( x ) + w i ( x ) ) δ C=\frac{AB-\alpha\beta-\sum_{i=0}^{l}a_i(\beta u_i(x)+\alpha v_i(x)+w_i(x))}{\delta} C=δABαβi=0lai(βui(x)+αvi(x)+wi(x))

以上算法构建的proof具有3个Group elements (2个 G 1 \mathbb{G}_1 G1和1个 G 2 \mathbb{G}_2 G2),具有如下特性:

  • perfect completeness
  • perfect zero-knowledge
  • statistical knowledge soundness against adversaries that only use a polynomial number of generic bilinear group operations

整个算法的效率分析为:

  • proof π ⃗ \vec{\pi} π 中包含3个Group elements (2个 G 1 \mathbb{G}_1 G1和1个 G 2 \mathbb{G}_2 G2

  • common reference string中包含: n n n Z p \mathbb{Z}_p Zp m + 2 n + 3 m+2n+3 m+2n+3 G 1 \mathbb{G}_1 G1 n + 3 n+3 n+3 G 2 \mathbb{G}_2 G2

  • 根据以上 V f y Vfy Vfy算法中的公式可知,Verifier无需知悉整个common reference string,仅需知悉以下内容就足够:
    σ ⃗ V = ( p , G 1 , G 2 , G T , e , [ 1 ] 1 , { [ ( β u i ( x ) + α v i ( x ) + w i ( x ) ) γ ] 1 } i = 0 l , [ 1 ] 2 , [ γ ] 2 , [ δ ] 2 , [ α β ] T ) \vec{\sigma}_V=(p,\mathbb{G}_1,\mathbb{G}_2,\mathbb{G}_T,e,[1]_1,\{[\frac{(\beta u_i(x)+\alpha v_i(x)+w_i(x))}{\gamma}]_1\}_{i=0}^{l},[1]_2,[\gamma]_2,[\delta]_2,[\alpha\beta]_T) σ V=(p,G1,G2,GT,e,[1]1,{[γ(βui(x)+αvi(x)+wi(x))]1}i=0l,[1]2,[γ]2,[δ]2,[αβ]T)
    以上Verifier的reference string中仅包含了 l + 2 l+2 l+2 G 1 \mathbb{G}_1 G1 3 3 3 G + 2 \mathbb{G}+2 G+2 1 1 1 G T \mathbb{G}_T GT

  • V f y Vfy Vfy算法中,Verifier需验证 ( [ A ] 1 , [ C ] 1 , [ B ] 2 ) ([A]_1,[C]_1,[B]_2) ([A]1,[C]1,[B]2)为有效的group elements,同时验证single pairing product equation:
    [ A ] 1 ⋅ [ B ] 2 = [ α ] 1 ⋅ [ β ] 2 + ∑ i = 0 l a i [ ( β u i ( x ) + α v i ( x ) + w i ( x ) ) γ ] 1 ⋅ [ γ ] 2 + [ C ] 1 ⋅ [ δ ] 2 [A]_1\cdot [B]_2= [\alpha]_1 \cdot [\beta]_2 + \sum_{i=0}^{l}a_i[\frac{(\beta u_i(x)+\alpha v_i(x)+w_i(x))}{\gamma}]_1\cdot [\gamma]_2 + [C]_1\cdot [\delta]_2 [A]1[B]2=[α]1[β]2+i=0lai[γ(βui(x)+αvi(x)+wi(x))]1[γ]2+[C]1[δ]2
    成立。
    在验证以上方程式成立过程中,Verifier的计算量为:
    1) l l l次exponentiations in G 1 \mathbb{G}_1 G1
    2)少量的group multiplication
    3)3次pairing计算。假设 [ α β ] T = [ α ] 1 ⋅ [ β ] 2 [\alpha\beta]_T=[\alpha]_1\cdot [\beta]_2 [αβ]T=[α]1[β]2以根据Verifier的reference string预计算了。

  • P r o v e Prove Prove算法中,Prover需计算polynomial h ( X ) h(X) h(X)
    Prover可计算以下polynomial evaluations:
    ∑ i = 0 m a i u i ( r q ) = ∑ i = 0 m a i u i , q \sum_{i=0}^{m}a_iu_i(r_q)=\sum_{i=0}^{m}a_iu_{i,q} i=0maiui(rq)=i=0maiui,q
    ∑ i = 0 m a i v i ( r q ) = ∑ i = 0 m a i v i , q \sum_{i=0}^{m}a_iv_i(r_q)=\sum_{i=0}^{m}a_iv_{i,q} i=0maivi(rq)=i=0maivi,q
    ∑ i = 0 m a i w i ( r q ) = ∑ i = 0 m a i w i , q \sum_{i=0}^{m}a_iw_i(r_q)=\sum_{i=0}^{m}a_iw_{i,q} i=0maiwi(rq)=i=0maiwi,q
    for q = 1 , ⋯   , n q=1,\cdots,n q=1,,n
    具体计算量取决于relation,若arithmetic circuit中的每个乘法门连接了a constant number of wires,则该relation为sparse的,相应的计算为linear in n n n
    由于这些polynomial的degree为 n − 1 n-1 n1,以上 n n n个evaluations可完全确定该多项式。若 r 1 , ⋯   , r n r_1,\cdots,r_n r1,,rn为root of unity for a suitable prime p p p,则Prover可使用标准的FFT技术来计算 h ( X ) h(X) h(X),仅需要 O ( n log ⁡ n ) O(n\log n) O(nlogn) operations in Z p \mathbb{Z}_p Zp。同时,Prover还可使用FFT技术来计算 ∑ i = 0 m a i u i ( X ) \sum_{i=0}^{m}a_iu_i(X) i=0maiui(X) ∑ i = 0 m a i v i ( X ) \sum_{i=0}^{m}a_iv_i(X) i=0maivi(X)的系数。为了获得所有的系数,Prover需 m + 3 n − l + 3 m+3n-l+3 m+3nl+3次exponentiation in G 1 \mathbb{G}_1 G1 n + 1 n+1 n+1次exponentiation in G 2 \mathbb{G}_2 G2
    随着security parameter增长,这些exponentiation将为主要开销。但是,对于中等security parameter和large statement,通过FFT来计算multiplication的开销将更大。此时,通过用更大的common reference string,其中包含了precomputed [ u i ( x ) ] 1 , [ v i ( x ) ] 1 , [ v i ( x ) ] 2 [u_i(x)]_1,[v_i(x)]_1,[v_i(x)]_2 [ui(x)]1,[vi(x)]1,[vi(x)]2 elements for i = 0 , ⋯   , m i=0,\cdots,m i=0,,m,使得 A , B A,B A,B可直接构建,而Prover不再需要计算 ∑ i = 0 m a i u i ( X ) \sum_{i=0}^{m}a_iu_i(X) i=0maiui(X) ∑ i = 0 m a i v i ( X ) \sum_{i=0}^{m}a_iv_i(X) i=0maivi(X),也就不需要做相应exponentiation运算。
    对于boolean circuit,有 a i ∈ { 0 , 1 } a_i\in\{0,1\} ai{0,1},通过这些precomputed elements,Prover仅需分别做 m m m个group multiplication来计算 A A A B B B。因此,让CRS更长可让Prover具有lower computational cost。

5. Lower bounds for non-interactive arguments

有一个有趣的问题是,non-interactive argument的efficiency极限是多少?
本文证明了,对于pairing-based non-interactive arguments,proof中至少应包含2个group elements。

参考资料

[1] Groth16 is not dead —— Exploring the tradeoff space of zero knowledge proof systems
[2] Prover time comparison of GKR+Groth16 vs. Groth16 for proving MiMC hashes
[3] Groth16

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值