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 采用的是
(uniform distribution),其verify complexity为linear with the vector dimension,Verifier的计算压力主要在于计算每轮递归调用中的新的commitment key;
–
distribution为
distribution的特例情况,
;
– 在本博文3.1和3.2节,借助asymmetric bilinear groups,基于
和
distribution构建了updateable commitment scheme;
– 在本博文4.2节,将Bulletproofs中的commitment key由uniform distribution改为
distribution,可实现designated verifier,即需要让verifier知道
,可将verifier complexity由linear降为logarithmic;
– 在本博文4.3节,借助updateable commitment scheme,verifier不再需要知道
,改为只需要知道其encoded in
相应的值
,对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等人2016年论文《Efficient zero-knowledge arguments for arithmetic circuits in the discrete log setting》中的argument of knowledge for Arithmetic Circuit Satisfiability。
- B¨unz 等人2018年论文《Bulletproofs: short proofs for confidential transactions and more》在Bootle 2016方案的基础上,进行了改进。communication complexity of argument由 降为了 ,其中 为the dimension of the two vectors。
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 相关研究
-
Bootle方案的核心思想是通过递归方式来实现argument for an inner product relation of committed values。该方案具有的最有趣的特性是transparent,无需trusted setup。其communication complexity为 ,verification cost为 ,prover complexity为 但是大量使用了expensive public-key operations。
-
Muggle-proofs based proof systems:Wahby等人2018年论文 Hydrax《 Doubly-efficient zkSNARKs without trusted setup》(为 DLOG-based transparent instantiation),Xie等人2019年论文 Libra《Libra: succinct zero-knowledge proofs with optimal prover computation》,Zhang等人2017年论文《 vSQL: veriifying arbitrary SQL queries over dynamic outsourced databases》和Zhang等人2017年论文《A zero-knowledge version of vSQL》都是Muggle-proofs based proof systems,基于Goldwasser等人2008年论文《 Delegating computation: interactive proofs for muggles》中的delegation scheme构建的。这些Muggle-proofs based proof systems在low depth computation场景下是高效的,其verification和communication complexity为 ,其中 为circuit depth, 为circuit width+一些额外的communication开销depending on the specific instantiation。所有这些机制要么需要per-circuit setup,要么需要log-space uniform computations。
-
PCP (Probabilistically Checkable Proofs) based proof systems:
Ben-Sasson等人2019年论文《 Scalable zero knowledge with no trusted setup》和Ben-Sasson等人2019年论文《Aurora: transparent succinct arguments for R1CS》都是PCP based proof systems,基于Ben-Sasson等人2016年论文《Interactive oracle proofs》中将classical PCP proofs generalize为Interactive Oracle Proofs。They are based on symmetric primitives which results in transparent, plausibly post-quantum secure constructions. 主要的缺点是效率不高,且prover complexity也较大。相类似的,一些基于MPC-in-the-head paradigm (Ishai等人2007年论文《 Zero-knowledge from secure multiparty computation》)的成果有:Ames等人2017年论文《Ligero: lightweight sublinear arguments without a trusted setup》,Giacomelli等人2016年论文《ZKBoo: faster zero-knowledge for boolean circuits》和Katz等人2018年论文《 Improved non-interactive zero knowledge with applications to post-quantum signatures》。其中Ames等人2017年论文《Ligero: lightweight sub-linear arguments without a trusted setup》的效率最高,具有good concrete efficiency,communication complexity为 。 -
Linear PCP based proof systems:考虑到verification time和communication的话,是效率最高的。Danezis等人2014年论文《 Square span programs with applications to succinct NIZK arguments》、Gennaro等人2013年论文《 Quadratic span programs and succinct NIZKs without PCPs》、Groth 2016年论文《On the size of pairing-based non-interactive arguments》和Parno等人 2013年论文《Pinocchio: nearly practical verifiable computation》,均为Linear PCP based proof systems,并在Bitansky等人2013年论文《 Succinct non-interactive arguments via linear interactive proofs》中进行了抽象。Linear PCP based proof systems的proof size为constant,且verification cost为 ,其中 为public inupt。最大的缺陷 是需要trusted setup。
- Updateable Linear PCP based proof system:为了在efficiency和trust之间进行平衡,Groth等人在2018年论文《Updatable and universal common reference strings with applications to zk-SNARKs》中提出了 Updateable model。在 Updateable model 场景下,每个人可非交互地更新setup parameters,只要其中一个是honest的,则soundness可保证。同时在该论文中还提出了 a scheme which is updateable, but it has a universal common reference string of size quadratic in the maximal size of all supported circuits (although from the global setup a linear, circuit-specific string can be derived). Maller等人在2019年论文 Sonic 《Sonic: zero-knowledge SNARKs from linear-size universal and updatable structured reference strings》中借助Bootle等人2016年论文《Efficient zero-knowledge arguments for arithmetic circuits in the discrete log setting》中的reduction算法对此进行了改进,实现了 linear CRS。后续又在Sonic的基础上进行了效率提升,具体的工作有:Chiesa等人2019年论文《Marlin: Preprocessing zkSNARKs with universal and updatable SRS》、Gabizon等人2019年论文《AuroraLight: improved prover efficiency and SRS size in a sonic-like system》和Gabizon等人2019年论文《PLONK: permutations over Lagrange-bases for oecumencial noninteractive arguments of knowledge》。但是所有这些(包括Sonic),都是 secure either in the Algebraic Group Model, or under knowledge type assumptions (apart from the Random Oracle Model)。最近的B¨unz等人2019年论文《Transparent snarks from dark compilers》中基于groups of unkown order构建了SNARK,当采用class groups来实例化时,可实现transparent setup并且可改进 Ben-Sasson等人2019年论文 STARKs 《Scalable zero knowledge with no trusted setup》by a logarithmic factor。
相应的性能对比为:
1.2 本文主要贡献
在Bootle方案的基础上,构建了 a public-coin Argument of Knowledge in the Universal Updateable Model:
- verification complexity为 ,其中 为 public input size;
- communication complexity为 ;
- prover is linear in ,和Bootle方案一样需要做很多expensive public-key operations。
- 提供了两种构建方式:一种是基于asymmetric DLOG assumption;另一种是基于asymmetric -DLOG assumption;
- 可通过Fiat-Shamir heuristic转为non-interactive。
- Updating and verifying updates need time ,两种构建方式的communication complexity可分别为 (可reduce为 ) 和 。
- 用于实现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:
-
group表示:(generator )
– 表示:
–
– 对于bilinear group ,则 -
Vector Pedersen commitment表示:
Let be a group of order ,
即为a Vector Pedersen commitment of w.r.t. to commitment key 。
其中 为public info, 为偶数。
-
递归构建vector :
let
其实最终构建的 -
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 .
– 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 ,如 。
- commitment key中包含group encodings of all multilinear monomials of a secret ,如 。
以上这两种commitment key 结构均支持non-interactively update the parameters。相应的trapdoor 信息如
或
需要废弃。 encoded in
。【如下文
中的
或
中的
。】
若借助bilinear groups特性,可将这些commiment key 大小压缩为
。这样就允许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 和
- private info:
- 待证明:
Bootle方案中的inner product protocol中,verifier的开销主要在于:
- 计算new commitment key in each of the rounds of the protocol,其中 为vector dimension。新commitment key的计算依赖于previous key和verifier’s challenges。
在本文中,Verifier不需要自己在每一轮计算新的commitment key,而改由Prover给Verifier提供compressed key (which is logarithmic in ) 同时提供proof证明该key 计算正确。(即相当于把Verifier的部分计算压力转移给了Prover。)【博客 Proofs for Inner Pairing Products and Applications 学习笔记 中5.2.1节通过巧妙构建commitment key ,可在4.4节GIPA实现的基础上,借助polynomial commitment,进一步优化Verifier的算力。】
2.3 Universally Updateable NIZK AoK
当将inner product 用于表述circuit时,其中的
为public info,不需要对
实现zero knowledge,因为
对Prover和Verifier均已知。
借助Sonic技术,可实现由prover提供相应的来证明最终
的计算是正常的,同时可进行pre-processing。【???】
2.4 相关密码学假设
2.4.1 DLOG Assumption
其实即是已知
,求
。
2.4.2 -DLOG Assumption
其实即是已知 ,求 。
2.4.3 Asymmetric DLOG Assumption in asymmetric bilinear groups
其实即是已知 ,求 。
2.4.4 Asymmetric -DLOG Assumption in asymmetric bilinear groups
其实即是已知 ,求 。
Bootle方案的inner product argument均是基于DLOG Assumption的。
2.4.5 Dn-Find-Rep Assumption
其中
的选择可为
(uniform distribution)、
(
-Power distribution)以及
(multilinear monomial distribution)。
Bulletproofs中采用的即为基于
(uniform distribution) 构建的Pedersen Vector Commitment。
本文将基于
(
-Power distribution)和
(multilinear monomial distribution)构建的Updateable Inner Product Argument。
以上Dn-Find-Rep Assumption假设成立的证明为:
3. Distribution Parameterized Vector Commitment
接下来将基于Dn-Find-Rep Assumption来构建Updateable Commitment Scheme。
主要算法有:
其中的Setup
和Com
算法与classical Pedersen Commitment一样。
Distribution类型分为: (uniform distribution)、 ( -Power distribution)以及 (multilinear monomial distribution)。
(uniform distribution) Commitment Scheme对应为Pedersen Vector Commitment,由于其Setup
为transparent的,原则上也是支持updateable属性。
本文主要考虑asymmetric
和asymmetric
distribution parameterized vector commitment。
3.1 基于asymmetric 的distribution parameterized vector commitment
-
:输入为 security parameter 和vector dimension ,输出为commitment key 。【 ,即 】
– ;(其实即为 )
– ;(对应 )
– 输出 。(对应 ,即 域内的key数量(为 个)少于 域内的key数量(为 个)。)【存在 exponentiations in 。】 -
:
– 验证 成立;(因为采用的是 distribution,第一个元素为 。)
– For , for ,验证 成立。【存在 次 pairing operations。】
– 如果以上验证都成立,则输出 ,否则输出 。 -
:输出为新的commitment key 和 a proof of correct update 。
– 随机数 ;( ,对应地 。 为私有变量。)
– 计算新的commitment key: ;(其中 )【存在 exponentiations in 。】
– 提供proof,证明新的commitment key计算正确:For ,let 。【Proof size 为 个proofs。】
– 输出为 -
:
若 均验证通过,则输出 。【存在 次 pairing operations。】 -
:
– 选择随机数 ;
– 计算commitment ;【存在1次multi-exponentiation of size in 。】
– 输出 ,其中 为辅助信息。 -
:【此处相当于open所有的 。】
– Parse ;
– Output iff and 。【存在1次multi-exponentiation of size in 。】
以上 Commitment scheme具有Updateably Computationally Binding属性 under assumption 和 存在 a NIZK AoK for the relation 。
3.2 基于asymmetric 的distribution parameterized vector commitment
-
:输入为 security parameter 和vector dimension ,输出为commitment key 。
– ;(其实即为 )
– ;(对应 )
– 输出 。(对应 ,即 域内的key数量(为 个)少于 域内的key数量(为 个)。)【存在 exponentiations in 。】 -
:
– 验证 成立;(因为采用的是 distribution,第一个元素为 。)
– For ,验证 成立。【存在 次 pairing operations。】
– 如果以上验证都成立,则输出 ,否则输出 。 -
:输出为新的commitment key 和 a proof of correct update 。
– 随机数 ;( ,对应地 。 为私有变量。)
– 计算新的commitment key: ;(其中 )【存在 exponentiations in 。】
– 提供proof,证明新的commitment key计算正确:let 。【Proof size 为 个proof。】
– 输出为 -
:
若 验证通过,则输出 。【存在 次 pairing operations。】 -
:
– 选择随机数 ;
– 计算commitment ;【存在1次multi-exponentiation of size in 。】
– 输出 ,其中 为辅助信息。 -
:【此处相当于open所有的 。】
– Parse ;
– Output iff and 。【存在1次multi-exponentiation of size in 。】
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 and where we know and respectively。这些计算量与vector dimension成线性关系,接下来需要将其reduce 为 sublinear (logarithmic in ) time。
注意:
通过设置
可转换为
。
可看成是
的特例情况(
)。
所以,接下来主要考虑 distribution。
需要两个不同的settings:
-
第一种情况:let be a commitment key。Prover拥有的是完整的commitment key ,用于计算 the commitment to w.r.t ,然后将该commitment 以及相应的proof 给Verifier。Verifier拥有的是压缩版的 。
3.1节中,commitment key ,其中 ,则对 的commitment可表示为:
利用以上结构,Prover 可构建proof为:【Prover需要做 个 multi-exponentiations,每个 size 为 ,最终需要 个 exponentiations.】
for , ,其中 。
对应的,Verifier可进行如下pairing check:【Verifier需要做 次pairing operations和 次 exponentiations。】
-
第二种情况:已知 a commitment to w.r.t. some commitment key (which can be precomputed once),Verifier可derive a commitment to w.r.t. a new commitment key in logarithmic time in 。
即相当于在第一种情况的基础上,设置 。
初始commitment key 为 ,Verifier已知相应的commitment 。
Verifier和Prover可构建新的commtiment key:
于是有:
实际上,Verifier仅需计算 ,对应有 次 exponentiations,而对于Prover来说,不需要做任意的新commitment key 运算,当需要Prover commit to 时,可以简单地用 进行commit to 操作,从而节约expensive group operations,因为有:
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
(uniform distribution)。主要证明的language
为:
Bootle方案的核心思想是将以上statement reduce为an equivalent one of roughly half the size。
同时,也需要基于verifier challenge
构建新的commitment key
。详细的实现细节为:【借助递归调用】
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
,若
采用
distribution,则有
。
因此,in the first round, the key for the next round is:
可将以上新key理解为由
和新generator
决定。
对于designated verifier,该verifier可知道
,则其不再需要在每一轮都计算
,只需要在最后一轮验证
,其中
为第
轮的challenge,
为最后一轮的key只有一个element。对于
同理。因此整个verification只需要 a logarithmic number of operations。
若 采用 distribution,则有 。 可看成是 的特殊情况—— 。
4.3 Inner Product Argument with Logarithmic Verifier
4.2节中为达成logarithmic verifier,需要让verifier知道
,从而限制为了designated verifier模式。若想将其推广为public verifiability,则可借助asymmetric bilinear groups 来实现。
Verifier不再需要计算
,而改为由Prover在每一轮都计算相应的中间值(尽管Prover不知道
值),Verifier use pairing as a DDH orcale 来验证Prover的中间值计算都是正确的。
3.1节构建的 基于asymmetric
的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》中相关技术,进行了改进: