Updateable Inner Product Argument with Logarithmic Verifier and Applications 学习笔记

1. 引言

Vanesa Daza、Carla、RàfolsAlexandros和Zacharakis 2020年论文《Updateable Inner Product Argument with Logarithmic Verifier and Applications》,发表于IACR International Conference on Public-Key Cryptography。

视频介绍:
https://www.youtube.com/watch?v=Rj5JUP2tFRc


– Bulletproofs中的inner product argument 采用的是 U n U_n (uniform distribution),其verify complexity为linear with the vector dimension,Verifier的计算压力主要在于计算每轮递归调用中的新的commitment key;
P W n PW_n distribution为 M L n ML_n distribution的特例情况, x i = x 2 i 1 x_i=x^{2^{i-1}}
– 在本博文3.1和3.2节,借助asymmetric bilinear groups,基于 M L n ML_n P W n PW_n distribution构建了updateable commitment scheme;
– 在本博文4.2节,将Bulletproofs中的commitment key由uniform distribution改为 M L n ML_n distribution,可实现designated verifier,即需要让verifier知道 x 1 , , x v x_1,\cdots,x_v ,可将verifier complexity由linear降为logarithmic;
– 在本博文4.3节,借助updateable commitment scheme,verifier不再需要知道 x 1 , , x v x_1,\cdots,x_v ,改为只需要知道其encoded in G 2 \mathbb{G}_2 相应的值 x 1 g 2 , , x v g 2 x_1g_2,\cdots,x_vg_2 ,对language组合进行证明,从而实现public verifier,同时相应的veriifer complexity也为logarithmic。
在这里插入图片描述


在Bootle等人2016年论文《Efficient zero-knowledge arguments for arithmetic circuits in the discrete log setting》 inner product argument的基础上进行了改进:

  • 将unstructured common reference string (the commitment key) 替换为了 a structured one。

同时在本论文中,针对 two different distributions of the CRS,提出了对 inner product argument的两种不同的实例化方法。
在designated verifier setting下,可 reduce verification from linear to logarithmic in the circuit size。同时利用asymmetric bilinear groups,可转换为 publicly verifiable setting。
本文的inner product argument可直接用于改进Bulletproofs range proofs的verification,并采用了Sonic中的最新技术来构建新的 common reference string。

本文所构建的inner product argument在standard assumption (in the Random Oracle Model)下是安全的,而Sonic/Plonk/Marlin/AuroraLight等方案在提升效率的同时,确需要Algebraic Group Model或Knowledge Type assumptions。

零知识证明常用于:

  • identification schemes;
  • electronic voting;
  • verifiable outsourced computation;
  • CCA secure public-key encryption.

pairing-based zk-SNARKs的主要特点有:

  • succinct:constant size,与witness size无关,且very fast to verify。

pairing-based SNARKs的主要缺点有:

  • efficiency方面——主要是long common reference string 和 costly prover computation;
  • security 方面——基于very strong hardness assumptions,且需要 trusted setup。

为了reduce the trust in the common reference string,近期有大量研究,如:

  • weaker models such as subversion resistant SNARKs [1,4,17];
  • updatable common reference strings [27];
  • transparent setup [5]。

尽管SNAKRs在某些方面是无与伦比的,但是根据实际的应用场景,需要做不同的权衡。

SNARKs替代方案中最著名的方案之一是:【以下简称为Bootle方案】

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Bootle方案的主要优点有:

  • 基于weaker assumption——DLOG assumption 和 Random Oracle(如果想要通过Fiat-Shamir来实现non-interactive的话)。
  • 不需要trusted setup。
  • proof size 为logarithmic。

Bootle方案最主要的缺点是:

  • 即使使用batch技术,verification time仍然是 scales linearly的。

本文的主要目的是在保持Bootle方案优点的基础上,improve the cost of the verifier。

1.1 相关研究

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

1.2 本文主要贡献

在Bootle方案的基础上,构建了 a public-coin Argument of Knowledge in the Universal Updateable Model:

  • verification complexity为 O λ ( x + log C ) \mathcal{O}_{\lambda}(|x|+\log |C|) ,其中 x |x| 为 public input size;
  • communication complexity为 O λ ( log C ) \mathcal{O}_{\lambda}(\log |C|)
  • prover is linear in C |C| ,和Bootle方案一样需要做很多expensive public-key operations。
  • 提供了两种构建方式:一种是基于asymmetric DLOG assumption;另一种是基于asymmetric q q -DLOG assumption;
  • 可通过Fiat-Shamir heuristic转为non-interactive。
  • Updating and verifying updates need time O λ ( C ) \mathcal{O}_{\lambda}(|C|) ,两种构建方式的communication complexity可分别为 O λ ( log C ) \mathcal{O}_{\lambda}(\log |C|) (可reduce为 O λ ( log log C ) \mathcal{O}_{\lambda}(\log\log |C|) ) 和 O λ ( 1 ) \mathcal{O}_{\lambda}(1)
  • 用于实现B¨unz 等人2018年论文《Bulletproofs: short proofs for confidential transactions and more》中的range proof算法时,可通过使用bilinear groups instead of standard groups,来实现exponentially reduce the verification complexity。

1.3 主要定义

  • pairwise product:
    a b = ( a 1 b 1 , , a n b n ) \vec{a}\circ\vec{b}=(a_1\cdot b_1,\cdots,a_n\cdot b_n)

  • group表示:(generator g G g\in\mathbb{G}
    [ r ] [r] 表示: r g rg
    [ r ] = ( [ r 1 ] , , [ r n ] ) [\vec{r}]=([r_1],\cdots,[r_n])
    – 对于bilinear group g 1 , g 2 , g T = e ( g 1 , g 2 ) g_1,g_2,g_T=e(g_1,g_2) ,则 e ( [ r ] 1 , [ s ] 2 ) = [ r s ] T e([r]_1,[s]_2)=[rs]_T

  • Vector Pedersen commitment表示:
    Let G \mathbb{G} be a group of order q q r = ( r 1 , , r n ) Z q n a = ( a 1 , , a n ) Z q n \vec{r}=(r_1,\cdots,r_n)\in\mathbb{Z}_q^n,\vec{a}=(a_1,\cdots,a_n)\in\mathbb{Z}_q^n
    [ a T r ] = i = 1 n a i [ r i ] [\vec{a}^T\vec{r}]=\sum_{i=1}^{n}a_i[r_i] 即为a Vector Pedersen commitment of a \vec{a} w.r.t. to commitment key [ r ] [\vec{r}]
    其中 r = ( r 1 , , r n ) \vec{r}=(r_1,\cdots,r_n) 为public info, n n 为偶数。
    r 1 2 = ( r 1 , , r n / 2 ) , r 2 2 = ( r n / 2 + 1 , , r n ) , x n = ( 1 , x , , x n 1 ) \vec{r}_{\frac{1}{2}}=(r_1,\cdots,r_{n/2}),\vec{r}_{\frac{2}{2}}=(r_{n/2+1},\cdots,r_{n}),\vec{x}^{\vec{n}}=(1,x,\cdots,x^{n-1})

  • 递归构建vector x ˉ \bar{\vec{x}}
    let x 1 , , x v Z q v x_1,\cdots,x_v\in\mathbb{Z}_q^v
    x ˉ ( 1 ) , { x ˉ ( x ˉ , x i x ˉ ) } i [ v ] \bar{\vec{x}}\leftarrow (1),\{\bar{\vec{x}}\leftarrow(\bar{\vec{x}},x_i\bar{\vec{x}})\}_{i\in[v]}
    其实最终构建的 x ˉ = ( 1 , x 1 , x 2 , x 1 x 2 , , x 1 x 2 x v ) \bar{\vec{x}}=(1,x_1,x_2,x_1x_2,\cdots,x_1x_2\cdots x_v)

  • zero knowledge argument相关定义:
    在这里插入图片描述
    在这里插入图片描述

  • Updateable Non-interactive (Zero Knowledge) Arguments of Knowledge:
    目前最高效的general NP statements 构建方式均需要 a very expensive and inefficient trusted setup(如Groth 2016年论文《On the size of pairing-based non-interactive arguments》)。
    Groth等人在2018年论文《[Updatable and universal common reference strings with applications to zk-SNARKs](https://doi.org/10.1007/978-3-319-96878-0 24)》中引入了an Updateable Setup,所有参与方可update the parameters non-interactively,而且可保证:只要有一个honest update,则 no PPT adversary can break soundness。在该论文中,同时证明了在以下场景下的安全性:
    – The adversary creates setup parameters.
    – An honest update on these parameters takes place.
    – The adversary updates the parameters.
    – Circuit specific parameters are derived publicly for a circuit C C .
    – Knowledge soundness is challenged w.r.t. these parameters.
    此处强调了circuit-specific setup是public运行的,no secret is involved in it. 任何人都可以通过universal parameter deterministically确定 circuit-specific CRS。
    在这里插入图片描述
    以上Updateable Non-interactive (Zero Knowledge) Arguments of Knowledge定义具有Perfectly Complete,Knowledge Sound和Statistically Zero Knowledge特性。
    在这里插入图片描述
    在这里插入图片描述

  • Updateable Commitment Scheme:
    即commitment scheme具有updateability属性。
    在这里插入图片描述
    以上Updateable Commitment Scheme具有Correct,Updateable Computationally Binding和Perfectly Hiding属性。
    在这里插入图片描述

2. 关键技术点

2.1 Distribution Parameterized Vector Commitments

不同于classical Pedersen commitment中的commiment key是uniformly sampled,增加了some limited structure 从而同时运行 more efficient representation of the key 和 efficient updateability。当与bilinear groups的特点结合时,仅需要 a compressed version就足够 allow a verifier to perform verification tasks exponentially faster。

本文中提供了2种实例化方案:

  • commitment key中包含 group encodings of all monomials of a secrett x x ,如 [ 1 ] , [ x ] , [ x 2 ] , , [ x n 1 ] [1],[x],[x^2],\cdots,[x^{n-1}]
  • commitment key中包含group encodings of all multilinear monomials of a secret x 1 , , x v x_1,\cdots,x_v ,如 [ 1 ] , [ x 1 ] , [ x 2 ] , [ x 1 x 2 ] , , [ x 1 x 2 x v ] [1],[x_1],[x_2],[x_1x_2],\cdots,[x_1x_2\cdots x_v]

以上这两种commitment key 结构均支持non-interactively update the parameters。相应的trapdoor 信息如 x x x 1 , , x v x_1,\cdots,x_v 需要废弃。 encoded in G 2 \mathbb{G}_2 。【如下文 M L 2 v ML_{2^v} 中的 [ x ] 2 = ( x 1 g 2 , x 2 g 2 , x 3 g 2 , , x v g 2 ) [\vec{x}]_2=(x_1g_2,x_2g_2,x_3g_2,\cdots, x_{v}g_2) P W n PW_n 中的 [ x ] 2 = ( x g 2 ) [\vec{x}]_2=(xg_2) 。】
若借助bilinear groups特性,可将这些commiment key 大小压缩为 log n \log n 。这样就允许verifier to verify statements with the help of the prover without reading the whole commitment key。同时leads to exponentially faster verification of proofs with minimal overhead for the prover, at the price of moving to bilinear instead of plain DLOG groups。【也就是说可拆分出size更小的verification key?】

2.2 Inner Program Argument with Logarithmic Verifier

对Bootle方案中的inner product protocol进行了改进:

  • public info:commitments c 1 = C o m ( a ) c 2 = C o m ( b ) c_1=Com(\vec{a}),c_2=Com(\vec{b}) z F z\in\mathbb{F}
  • private info: a , b \vec{a},\vec{b}
  • 待证明: a T b = z \vec{a}^T\vec{b}=z

Bootle方案中的inner product protocol中,verifier的开销主要在于:

  • 计算new commitment key in each of the log n \log n rounds of the protocol,其中 n n 为vector dimension。新commitment key的计算依赖于previous key和verifier’s challenges。

在本文中,Verifier不需要自己在每一轮计算新的commitment key,而改由Prover给Verifier提供compressed key (which is logarithmic in n n ) 同时提供proof证明该key 计算正确。(即相当于把Verifier的部分计算压力转移给了Prover。)【博客 Proofs for Inner Pairing Products and Applications 学习笔记 中5.2.1节通过巧妙构建commitment key v , w \vec{v},\vec{w} ,可在4.4节GIPA实现的基础上,借助polynomial commitment,进一步优化Verifier的算力。】

2.3 Universally Updateable NIZK AoK

当将inner product 用于表述circuit时,其中的 b \vec{b} 为public info,不需要对 b \vec{b} 实现zero knowledge,因为 b \vec{b} 对Prover和Verifier均已知。
借助Sonic技术,可实现由prover提供相应的来证明最终 b b' 的计算是正常的,同时可进行pre-processing。【???】

2.4 相关密码学假设

2.4.1 DLOG Assumption

其实即是已知 g , r g g,r\cdot g ,求 r Z q r\in\mathbb{Z}_q
在这里插入图片描述

2.4.2 n n -DLOG Assumption

其实即是已知 g , r g , r 2 g , , r n g g,r\cdot g,r^2\cdot g,\cdots,r^n\cdot g ,求 r Z q r\in\mathbb{Z}_q

2.4.3 Asymmetric DLOG Assumption in asymmetric bilinear groups

其实即是已知 g 1 , g 2 , r g 1 , r g 2 g_1,g_2,r\cdot g_1,r\cdot g_2 ,求 r Z q r\in\mathbb{Z}_q

2.4.4 Asymmetric n n -DLOG Assumption in asymmetric bilinear groups

其实即是已知 g 1 , r g 1 , r 2 g 1 , , r n g 1 , g 2 , r g 2 , r 2 g 2 , , r n g 2 g_1,r\cdot g_1,r^2\cdot g_1,\cdots,r^n\cdot g_1,g_2,r\cdot g_2,r^2\cdot g_2,\cdots,r^n\cdot g_2 ,求 r Z q r\in\mathbb{Z}_q

Bootle方案的inner product argument均是基于DLOG Assumption的。

2.4.5 Dn-Find-Rep Assumption

其中 D n D_n 的选择可为 U n U_n (uniform distribution)、 P W n PW_n n n -Power distribution)以及 M L 2 v ML_{2^v} (multilinear monomial distribution)。
Bulletproofs中采用的即为基于 U n U_n (uniform distribution) 构建的Pedersen Vector Commitment。
本文将基于 P W n PW_n n n -Power distribution)和 M L 2 v ML_{2^v} (multilinear monomial distribution)构建的Updateable Inner Product Argument。
在这里插入图片描述
以上Dn-Find-Rep Assumption假设成立的证明为:
在这里插入图片描述

3. Distribution Parameterized Vector Commitment

接下来将基于Dn-Find-Rep Assumption来构建Updateable Commitment Scheme。
在这里插入图片描述

主要算法有: ( S e t u p , V r f y S e t u p , U p d a t e , V r f y U p d a t e , C o m , O p e n ) (Setup, VrfySetup, Update, VrfyUpdate, Com, Open)
其中的SetupCom算法与classical Pedersen Commitment一样。

D n D_n Distribution类型分为: U n U_n (uniform distribution)、 P W n PW_n ( n n -Power distribution)以及 M L 2 v ML_{2^v} (multilinear monomial distribution)。

U n U_n (uniform distribution) Commitment Scheme对应为Pedersen Vector Commitment,由于其Setup为transparent的,原则上也是支持updateable属性。

本文主要考虑asymmetric M L 2 v ML_{2^v} 和asymmetric P W n PW_n distribution parameterized vector commitment。
在这里插入图片描述

3.1 基于asymmetric M L 2 v ML_{2^v} 的distribution parameterized vector commitment

在这里插入图片描述

  • S e t u p ( 1 λ , n ) Setup(1^{\lambda},n) :输入为 security parameter λ \lambda 和vector dimension n n ,输出为commitment key c k ck 。【 2 v = n 2^v=n ,即 v = log 2 n v=\log_{2}n
    p p G r o u p G e n ( 1 λ ) \vec{pp}\leftarrow GroupGen(1^{\lambda}) ;(其实即为 g 1 , g 2 g_1,g_2
    r M L n \vec{r}\leftarrow ML_n ;(对应 r = ( 1 , x 1 , x 2 , x 1 x 2 , x 3 , x 1 x 3 , x 2 x 3 , x 1 x 2 x 3 , , x 1 x 2 x v ) = ( r 1 , r 2 , r 3 , , r n ) \vec{r}=(1,x_1,x_2,x_1x_2,x_3,x_1x_3,x_2x_3,x_1x_2x_3,\cdots,x_1x_2\cdots x_v)=(r_1,r_2,r_3,\cdots,r_n)
    – 输出 p p , [ r ] 1 , [ x ] 2 ( x 1 g 2 , x 2 g 2 , x 3 g 2 , , x v g 2 ) \vec{pp},[\vec{r}]_1,[\vec{x}]_2\leftarrow (x_1g_2,x_2g_2,x_3g_2,\cdots, x_{v}g_2) 。(对应 [ r ] 1 = ( r 1 g 1 , r 2 g 1 , , r n g 1 ) [ x ] 2 = ( x 1 g 2 , x 2 g 2 , x 3 g 2 , , x v g 2 ) [\vec{r}]_1=(r_1g_1,r_2g_1,\cdots,r_ng_1),[\vec{x}]_2=(x_1g_2,x_2g_2,x_3g_2,\cdots, x_{v}g_2) ,即 G 2 \mathbb{G}_2 域内的key数量(为 v v 个)少于 G 1 \mathbb{G}_1 域内的key数量(为 2 v 2^v 个)。)【存在 n n exponentiations in G 1 \mathbb{G}_1 。】

  • V r f y S e t u p ( p p , [ x ] 2 , [ r ] 1 ) VrfySetup(\vec{pp},[\vec{x}]_2,[\vec{r}]_1)
    – 验证 r 1 g 1 = g 1 r_1g_1=g_1 成立;(因为采用的是 M L 2 v ML_{2^v} distribution,第一个元素为 1 1 。)
    – For 1 i v 1\leq i\leq v , for 1 j 2 i 1 1\leq j\leq 2^{i-1} ,验证 e ( [ r 2 i 1 + j ] 1 , [ 1 ] 2 ) = e ( [ r j ] 1 , [ x i ] 2 ) e([r_{2^{i-1}+j}]_1,[1]_2)=e([r_j]_1,[x_i]_2) 成立。【存在 n n 次 pairing operations。】
    – 如果以上验证都成立,则输出 1 1 ,否则输出 0 0

  • U p d a t e ( p p , [ x ] 2 , [ r ] 1 ) Update(\vec{pp},[\vec{x}]_2,[\vec{r}]_1) :输出为新的commitment key c k ck' 和 a proof of correct update π c k \pi_{ck'}
    – 随机数 y Z q v \vec{y}\leftarrow \mathbb{Z}_q^v ;( y = ( y 1 , y 2 , , y v ) \vec{y}=(y_1,y_2,\cdots,y_v) ,对应地 y ˉ = ( 1 , y 1 , y 2 , y 1 y 2 , y 3 , y 1 y 3 , y 2 y 3 , y 1 y 2 y 3 , , y 1 y 2 y v ) \bar{\vec{y}}=(1,y_1,y_2,y_1y_2,y_3,y_1y_3,y_2y_3,y_1y_2y_3,\cdots,y_1y_2\cdots y_v) y i y_i 为私有变量。)
    – 计算新的commitment key: [ r ] 1 y ˉ [ r ] 1 , [ x ] 2 y [ x ] 2 [\vec{r}']_1\leftarrow \bar{\vec{y}}\circ [\vec{r}]_1,[\vec{x}']_2\leftarrow \vec{y}\circ [\vec{x}]_2 ;(其中 [ r ] 1 = ( 1 , x 1 y 1 g 1 , x 2 y 2 g 1 , x 1 x 2 y 1 y 2 g 1 , x 3 g 1 , x 1 x 3 y 1 y 3 g 1 , x 2 x 3 y 2 y 3 g 1 , x 1 x 2 x 3 y 1 y 2 y 3 g 1 , , x 1 x 2 x v y 1 y 2 y v g 1 ) [ x ] 2 = ( x 1 y 1 g 2 , x 2 y 2 g 2 , x 3 y 3 g 2 , , x v y v g 2 ) [\vec{r}']_1=(1,x_1y_1g_1,x_2y_2g_1,x_1x_2y_1y_2g_1,x_3g_1,x_1x_3y_1y_3g_1,x_2x_3y_2y_3g_1,x_1x_2x_3y_1y_2y_3g_1,\cdots,x_1x_2\cdots x_vy_1y_2\cdots y_vg_1),[\vec{x}]_2=(x_1y_1g_2,x_2y_2g_2,x_3y_3g_2,\cdots, x_{v}y_vg_2) )【存在 n n exponentiations in G 1 \mathbb{G}_1 。】
    – 提供proof,证明新的commitment key计算正确:For 1 i v 1\leq i\leq v ,let π i N I Z K A o K { ( [ x i ] 2 , [ x i ] 2 ) , ( y i ) : [ x i ] 2 = y i [ x i ] 2 } \pi_i\leftarrow NIZKAoK\{([x_i]_2,[x_i']_2),(y_i):[x_i']_2=y_i[x_i]_2\} 。【Proof size 为 log n \log n 个proofs。】
    – 输出为 ( p p , [ r ] 1 , [ x ] 2 , π 1 , , π v ) (\vec{pp},[\vec{r}']_1, [\vec{x}']_2,\pi_1,\cdots,\pi_v)

  • V r f y U p d a t e ( p p , [ x ] 2 , [ x ] 2 , [ r ] 1 , π 1 , , π v ) VrfyUpdate(\vec{pp}, [\vec{x}]_2, [\vec{x}']_2,[\vec{r}']_1,\pi_1,\cdots,\pi_v)
    π 1 , , π v \pi_1,\cdots,\pi_v 均验证通过,则输出 V r f y S e t u p ( p p , [ x ] 2 , [ r ] 1 ) VrfySetup(\vec{pp},[\vec{x}']_2,[\vec{r}']_1) 。【存在 n n 次 pairing operations。】

  • C o m ( p p , [ r ] 1 , m ) Com(\vec{pp},[\vec{r}]_1,\vec{m})
    – 选择随机数 ρ Z q \rho \leftarrow \mathbb{Z}_q
    – 计算commitment c [ ( m , ρ ) T r ] c\leftarrow [(\vec{m},\rho)^T\vec{r}] ;【存在1次multi-exponentiation of size n n in G 1 \mathbb{G}_1 。】
    – 输出 ( c , τ ) (c,\tau) ,其中 τ = ( [ r ] 1 , ρ ) \tau=([\vec{r}]_1,\rho) 为辅助信息。

  • O p e n ( p p , [ x ] 2 , m , c , τ ) Open(\vec{pp},[\vec{x}]_2,\vec{m},c,\tau) :【此处相当于open所有的 m \vec{m} 。】
    – Parse τ = ( [ r ] 1 , ρ ) \tau=([\vec{r}]_1,\rho)
    – Output 1 1 iff V r f y S e t u p ( p p , [ x ] 2 , [ r ] 1 ) VrfySetup(\vec{pp},[\vec{x}]_2,[\vec{r}]_1) and c = [ ( m , ρ ) T r ] c= [(\vec{m},\rho)^T\vec{r}] 。【存在1次multi-exponentiation of size n n in G 1 \mathbb{G}_1 。】

以上 M L n F i n d R e p ML_n-Find-Rep Commitment scheme具有Updateably Computationally Binding属性 under M L n F i n d R e p ML_n-Find-Rep assumption 和 存在 a NIZK AoK for the relation R = { ( ( [ x ] , [ x ] ) , y ) [ x ] = y [ x ] } R=\{(([x],[x']),y) | [x']=y[x]\}

3.2 基于asymmetric P W n PW_n 的distribution parameterized vector commitment

在这里插入图片描述

  • S e t u p ( 1 λ , n ) Setup(1^{\lambda},n) :输入为 security parameter λ \lambda 和vector dimension n n ,输出为commitment key c k ck
    p p G r o u p G e n ( 1 λ ) \vec{pp}\leftarrow GroupGen(1^{\lambda}) ;(其实即为 g 1 , g 2 g_1,g_2
    r P W n \vec{r}\leftarrow PW_n ;(对应 r = ( 1 , x , x 2 , , x n 1 ) = ( r 1 , r 2 , r 3 , , r n ) \vec{r}=(1,x,x^2,\cdots,x^{n-1})=(r_1,r_2,r_3,\cdots,r_n)
    – 输出 p p , [ r ] 1 , [ x ] 2 ( x g 2 ) \vec{pp},[\vec{r}]_1,[\vec{x}]_2\leftarrow (xg_2) 。(对应 [ r ] 1 = ( r 1 g 1 , r 2 g 1 , , r n g 1 ) [ x ] 2 = ( x g 2 ) [\vec{r}]_1=(r_1g_1,r_2g_1,\cdots,r_ng_1),[\vec{x}]_2=(xg_2) ,即 G 2 \mathbb{G}_2 域内的key数量(为 1 1 个)少于 G 1 \mathbb{G}_1 域内的key数量(为 n n 个)。)【存在 n n exponentiations in G 1 \mathbb{G}_1 。】

  • V r f y S e t u p ( p p , [ x ] 2 , [ r ] 1 ) VrfySetup(\vec{pp},[\vec{x}]_2,[\vec{r}]_1)
    – 验证 r 1 g 1 = g 1 r_1g_1=g_1 成立;(因为采用的是 P W n PW_{n} distribution,第一个元素为 1 1 。)
    – For 2 i n 2\leq i\leq n ,验证 e ( [ r i ] 1 , [ 1 ] 2 ) = e ( [ r i 1 ] 1 , [ x ] 2 ) e([r_{i}]_1,[1]_2)=e([r_{i-1}]_1,[x]_2) 成立。【存在 n n 次 pairing operations。】
    – 如果以上验证都成立,则输出 1 1 ,否则输出 0 0

  • U p d a t e ( p p , [ x ] 2 , [ r ] 1 ) Update(\vec{pp},[\vec{x}]_2,[\vec{r}]_1) :输出为新的commitment key c k ck' 和 a proof of correct update π c k \pi_{ck'}
    – 随机数 y Z q \vec{y}\leftarrow \mathbb{Z}_q ;( y = ( y ) \vec{y}=(y) ,对应地 y ˉ = ( 1 , y , y 2 , , y n ) \bar{\vec{y}}=(1,y,y^2,\cdots,y^n) y y 为私有变量。)
    – 计算新的commitment key: [ r ] 1 y ˉ [ r ] 1 , [ x ] 2 y [ x ] 2 [\vec{r}']_1\leftarrow \bar{\vec{y}}\circ [\vec{r}]_1,[\vec{x}']_2\leftarrow \vec{y}\circ [\vec{x}]_2 ;(其中 [ r ] 1 = ( 1 , x y g 1 , x 2 y 2 g 1 , , x n y n g 1 ) [ x ] 2 = ( x y g 2 ) [\vec{r}']_1=(1,xyg_1,x^2y^2g_1,\cdots,x^ny^ng_1),[\vec{x}]_2=(xyg_2) )【存在 n n exponentiations in G 1 \mathbb{G}_1 。】
    – 提供proof,证明新的commitment key计算正确:let π N I Z K A o K { ( [ x ] 2 , [ x ] 2 ) , ( y ) : [ x ] 2 = y [ x ] 2 } \pi\leftarrow NIZKAoK\{([x]_2,[x']_2),(y):[x']_2=y[x]_2\} 。【Proof size 为 1 1 个proof。】
    – 输出为 ( p p , [ r ] 1 , [ x ] 2 , π ) (\vec{pp},[\vec{r}']_1, [\vec{x}']_2,\pi)

  • V r f y U p d a t e ( p p , [ x ] 2 , [ x ] 2 , [ r ] 1 , π ) VrfyUpdate(\vec{pp}, [\vec{x}]_2, [\vec{x}']_2,[\vec{r}']_1,\pi)
    π \pi 验证通过,则输出 V r f y S e t u p ( p p , [ x ] 2 , [ r ] 1 ) VrfySetup(\vec{pp},[\vec{x}']_2,[\vec{r}']_1) 。【存在 n n 次 pairing operations。】

  • C o m ( p p , [ r ] 1 , m ) Com(\vec{pp},[\vec{r}]_1,\vec{m})
    – 选择随机数 ρ Z q \rho \leftarrow \mathbb{Z}_q
    – 计算commitment c [ ( m , ρ ) T r ] c\leftarrow [(\vec{m},\rho)^T\vec{r}] ;【存在1次multi-exponentiation of size n n in G 1 \mathbb{G}_1 。】
    – 输出 ( c , τ ) (c,\tau) ,其中 τ = ( [ r ] 1 , ρ ) \tau=([\vec{r}]_1,\rho) 为辅助信息。

  • O p e n ( p p , [ x ] 2 , m , c , τ ) Open(\vec{pp},[\vec{x}]_2,\vec{m},c,\tau) :【此处相当于open所有的 m \vec{m} 。】
    – Parse τ = ( [ r ] 1 , ρ ) \tau=([\vec{r}]_1,\rho)
    – Output 1 1 iff V r f y S e t u p ( p p , [ x ] 2 , [ r ] 1 ) VrfySetup(\vec{pp},[\vec{x}]_2,[\vec{r}]_1) and c = [ ( m , ρ ) T r ] c= [(\vec{m},\rho)^T\vec{r}] 。【存在1次multi-exponentiation of size n n in G 1 \mathbb{G}_1 。】

3.3 计算复杂度

3.1和3.2节构建的distribution parameterized vector commitment,主要的计算开销在于group exponentiations和verifier的pairing operations。

3.4 Commitments to Monomial Vectors

当需要 compute (non-hiding) commtiments to t n \vec{t}^{\vec{n}} and t ˉ \bar{\vec{t}} where we know t t and t 1 , t 2 , , t v t_1,t_2,\cdots,t_v respectively。这些计算量与vector dimension成线性关系,接下来需要将其reduce 为 sublinear (logarithmic in n n ) time。

注意: M L 2 v , 2 v = n ML_{2^v},2^v=n 通过设置 t i = t 2 i 1 t_i=t^{2^{i-1}} 可转换为 P W n PW_n
P W n PW_n 可看成是 M L 2 v , 2 v = n ML_{2^v},2^v=n 的特例情况( t i = t 2 i 1 t_i=t^{2^{i-1}} )。

所以,接下来主要考虑 M L 2 v ML_{2^v} distribution。

需要两个不同的settings:

  • 第一种情况:let c k = ( c k P , c k V ) ck=(ck_P,ck_V) be a commitment key。Prover拥有的是完整的commitment key c k P ck_P ,用于计算 the commitment to x ˉ \bar{\vec{x}} w.r.t c k ck ,然后将该commitment 以及相应的proof 给Verifier。Verifier拥有的是压缩版的 c k V ck_V
    3.1节中,commitment key c k = ( p p , [ x ] 2 , [ r ] 1 ) ck=(\vec{pp},[\vec{x}]_2,[\vec{r}]_1) ,其中 [ r ] 1 = [ x ˉ ] [\vec{r}]_1=[\bar{\vec{x}}] ,则对 t ˉ \bar{\vec{t}} 的commitment可表示为:
    C o m c k ( t ˉ ) = [ t ˉ T r ] 1 = i = 1 v ( 1 + t i x i ) [ 1 ] 1 = ( 1 + t v x v ) i = 1 v 1 ( 1 + t i x i ) [ 1 ] 1 Com_{ck}(\bar{\vec{t}})=[\bar{\vec{t}}^T\vec{r}]_1=\prod_{i=1}^{v}(1+t_ix_i)[1]_1=(1+t_vx_v)\prod_{i=1}^{v-1}(1+t_ix_i)[1]_1
    利用以上结构,Prover 可构建proof为:【Prover需要做 log 2 n \log_2 n G 1 \mathbb{G}_1 multi-exponentiations,每个 size 为 2 i , i { 1 , , n 2 } 2^i,i\in\{1,\cdots,\frac{n}{2}\} ,最终需要 n n G 1 \mathbb{G}_1 exponentiations.】
    for i { 1 , , v } i\in\{1,\cdots,v\} [ τ i ] 1 j = 1 i ( 1 + t j x j ) [ 1 ] 1 = ( 1 + t i x i ) [ τ i 1 ] 1 [\tau_i]_1\leftarrow \prod_{j=1}^{i}(1+t_jx_j)[1]_1=(1+t_ix_i)[\tau_{i-1}]_1 ,其中 [ τ 0 ] 1 = [ 1 ] 1 [\tau_0]_1=[1]_1
    对应的,Verifier可进行如下pairing check:【Verifier需要做 log 2 n \log_2 n 次pairing operations和 2 log 2 n 2\log_2 n G 1 \mathbb{G}_1 exponentiations。】
    e ( t i [ τ i 1 ] 1 , [ x i ] 2 ) = e ( [ τ i τ i 1 ] 1 , [ 1 ] 2 ) e(t_i[\tau_{i-1}]_1,[x_i]_2)=e([\tau_i-\tau_{i-1}]_1,[1]_2)

  • 第二种情况:已知 a commitment to 1 n \vec{1}^{\vec{n}} w.r.t. some commitment key c k = ( c k P , c k V ) ck=(ck_P,ck_V) (which can be precomputed once),Verifier可derive a commitment to t ˉ \bar{\vec{t}} w.r.t. a new commitment key c k = ( c k P , c k V ) ck'=(ck_P',ck_V') in logarithmic time in n n
    即相当于在第一种情况的基础上,设置 t ˉ = 1 n = ( 1 , 1 , , 1 ) \bar{\vec{t}}=\vec{1}^{\vec{n}}=(1,1,\cdots,1)
    初始commitment key 为 c k 1 = ( c k 1 P , c k 1 V ) = ( [ r ] 1 , [ x ] 2 ) ck_1=(ck_1^P,ck_1^V)=([\vec{r}]_1,[\vec{x}]_2) ,Verifier已知相应的commitment C o m c k 1 ( 1 ) = [ 1 T r ] 1 Com_{ck_1}(\vec{1})=[\vec{1}^T\vec{r}]_1
    Verifier和Prover可构建新的commtiment key:
    ( c k 2 P , c k 2 V ) = ( ( r t ˉ 1 ) , ( t 1 1 [ x 1 ] 2 , , t v 1 [ x v ] 2 ) ) (ck_2^P,ck_2^V)=((\vec{r}\circ \bar{\vec{t}}^{-1}),(t_1^{-1}[x_1]_2,\cdots,t_v^{-1}[x_v]_2))
    于是有:
    [ 1 T r ] 1 = [ ( 1 t ˉ ) T ( r t ˉ 1 ) ] 1 = [ t ˉ T ( r t ˉ 1 ) ] 1 = C o m c k 2 ( t ˉ ) [\vec{1}^T\vec{r}]_1=[(\vec{1}\circ \bar{\vec{t}})^T(\vec{r}\circ\bar{\vec{t}}^{-1})]_1=[\bar{\vec{t}}^T(\vec{r}\circ\bar{\vec{t}}^{-1})]_1=Com_{ck_2}(\bar{\vec{t}})
    实际上,Verifier仅需计算 c k 2 V ck_2^V ,对应有 log 2 n \log_2 n G 2 \mathbb{G}_2 exponentiations,而对于Prover来说,不需要做任意的新commitment key 运算,当需要Prover commit to m \vec{m} 时,可以简单地用 c k 1 ck_1 进行commit to m t ˉ 1 \vec{m}\circ \bar{\vec{t}}^{-1} 操作,从而节约expensive group operations,因为有:
    C o m c k 2 ( m T ) = [ m T ( r t ˉ 1 ) ] 1 = [ ( m t ˉ 1 ) T r ] 1 = C o m c k 1 ( m t ˉ 1 ) Com_{ck_2}(\vec{m}^T)=[\vec{m}^T(\vec{r}\circ\bar{\vec{t}}^{-1})]_1=[(\vec{m}\circ\bar{\vec{t}}^{-1})^T\vec{r}]_1=Com_{ck_1}(\vec{m}\circ\bar{\vec{t}}^{-1})

4. Improved Inner Product Argument

在Bootle等人2016年论文《Efficient zero-knowledge arguments for arithmetic circuits in the discrete log setting》 中的inner product argument具有linear verification cost。
仍然基于DLOG Assumption,可将verification complexity reduce to logarithmic in the designated verifier setting in the CRS model by changing the distribution of the commitment keys;若采用asymmetric bilinear groups,可将其“compiled” to achieve public verifiability。

4.1 Bootle方案中的Inner Product Argument

Bootle方案中的Inner Product Argument 是 a Proof of Knowledge of the openings of two (non-hiding) Vector Pedersen Commitments that satisfy an inner product relation。
Bootle方案中的commtment key是 sampled from U n U_n (uniform distribution)。主要证明的language L I P L_{IP} 为:
( p p , [ r ] , [ s ] G 2 v , [ α ] , [ β ] G , z Z q ) L I P a , b Z q 2 v   s . t .   [ α ] = [ a T r ] [ β ] = [ b T s ] a T b = z (\vec{pp},[\vec{r}],[\vec{s}]\in\mathbb{G}^{2v},[\alpha],[\beta]\in\mathbb{G},z\in\mathbb{Z}_q)\in L_{IP}\Leftrightarrow \exist \vec{a},\vec{b}\in\mathbb{Z}_q^{2^v}\ s.t.\ [\alpha]=[\vec{a}^T\vec{r}]\wedge [\beta]=[\vec{b}^T\vec{s}]\wedge\vec{a}^T\vec{b}=z

Bootle方案的核心思想是将以上statement reduce为an equivalent one of roughly half the size。
同时,也需要基于verifier challenge c c 构建新的commitment key [ r ] = c 1 [ r 1 2 ] + c 2 [ r 2 2 ] [\vec{r}']=c^{-1}[\vec{r}_{\frac{1}{2}}]+c^{-2}[\vec{r}_{\frac{2}{2}}] 。详细的实现细节为:【借助递归调用】
在这里插入图片描述

4.2 DV Inner Product Argument with Logarithmic Verifier

在4.1节 Bootle方案中的Inner Product Argument 其verification complexity为linear with the vector dimension,接下来,对此进行改进,以实现logarithmic verifier。

4.1节中,verifier的主要计算开销在于计算new key r \vec{r}' ,若 r \vec{r} 采用 M L n ML_n distribution,则有 r = ( r 1 2 , r 2 2 ) = ( r 1 2 , x v r 1 2 ) \vec{r}=(\vec{r}_{\frac{1}{2}},\vec{r}_{\frac{2}{2}})=(\vec{r}_{\frac{1}{2}},x_v\vec{r}_{\frac{1}{2}})
因此,in the first round, the key for the next round is:
[ r ] = c 1 [ r 1 2 ] + c 2 [ r 2 2 ] = ( c 1 + x v c 2 ) [ r 1 2 ] [\vec{r}']=c^{-1}[\vec{r}_{\frac{1}{2}}]+c^{-2}[\vec{r}_{\frac{2}{2}}]=(c^{-1}+x_vc^{-2})[\vec{r}_{\frac{1}{2}}]
可将以上新key理解为由 [ x 1 ] , , [ x v ] [x_1],\cdots,[x_v] 和新generator ( c 1 + x v c 2 ) [ 1 ] (c^{-1}+x_vc^{-2})[1] 决定。
对于designated verifier,该verifier可知道 x 1 , , x v x_1,\cdots, x_v ,则其不再需要在每一轮都计算 r \vec{r}' ,只需要在最后一轮验证 [ r ] = i = 1 v ( c i 1 + x v i + 1 c i 2 ) [ 1 ] [r']=\prod_{i=1}^{v}(c_i^{-1}+x_{v-i+1}c_i^{-2})[1] ,其中 c i c_i 为第 i i 轮的challenge, [ r ] [r'] 为最后一轮的key只有一个element。对于 [ s ] [s'] 同理。因此整个verification只需要 a logarithmic number of operations。

r \vec{r} 采用 P W n PW_n distribution,则有 r = ( r 1 2 , r 2 2 ) = ( r 1 2 , x 2 V 1 r 1 2 ) \vec{r}=(\vec{r}_{\frac{1}{2}},\vec{r}_{\frac{2}{2}})=(\vec{r}_{\frac{1}{2}},x^{2^{V-1}}\vec{r}_{\frac{1}{2}}) P W n PW_n 可看成是 M L n ML_n 的特殊情况—— x i = x 2 i 1 x_i=x^{2^{i-1}}

4.3 Inner Product Argument with Logarithmic Verifier

4.2节中为达成logarithmic verifier,需要让verifier知道 x 1 , , x v x_1,\cdots, x_v ,从而限制为了designated verifier模式。若想将其推广为public verifiability,则可借助asymmetric bilinear groups 来实现。
Verifier不再需要计算 i = 1 v ( c i 1 + x v i + 1 c i 2 ) [ 1 ] \prod_{i=1}^{v}(c_i^{-1}+x_{v-i+1}c_i^{-2})[1] ,而改为由Prover在每一轮都计算相应的中间值(尽管Prover不知道 x i x_i 值),Verifier use pairing as a DDH orcale 来验证Prover的中间值计算都是正确的。

3.1节构建的 基于asymmetric M L 2 v ML_{2^v} 的distribution parameterized vector commitment ,对应的language可表示为:
在这里插入图片描述
为实现public verifier,对应的language组合为:【即在4.2节的基础上增加了两组key 的vector commitment 证明】
在这里插入图片描述
详细的思路为:
在这里插入图片描述
对应的计算复杂度为:
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

5. Updateable Zero Knowledge SNARK for CSAT

Bootle方案中verifier的inefficiency主要来自于两方面:

  • 1)the linear time needed in verifiying the inner product argument;
  • 2)some computation needed for the specific circuit。

其中第二条是inherent to universal arguments since the verifier needs to, at least, read the circuit. 解决办法之一是:增加a circuit setup phase,以使verifier仅需read the circuit only once。对于universal argument,该circuit setup应不包含任何secrets,必须为deterministic algorithm with input the Universal CRS and the circuit description。
借助 Maller等人在2019年论文 Sonic 《Sonic: zero-knowledge SNARKs from linear-size universal and updatable structured reference strings》中相关技术,进行了改进:
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

6. 用于证明vector permutation

6.1 Proof of Grand Product

在这里插入图片描述

6.2 Proof of Known Permutation

在这里插入图片描述

7. 用于Range proofs with logarithmic verifier

在这里插入图片描述

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/mutourend/article/details/107228558