Pointproofs: Aggregating Proofs for Multiple Vector Commitments 学习笔记
作者:互联网
1. 背景知识
Alogrand团队Gorbunov等人2020年论文《Pointproofs: Aggregating Proofs for Multiple Vector Commitments》,配套的代码实现参见:https://github.com/algorand/pointproofs
在该论文中,实现了:
- Pointproofs —— a new vector commitment scheme that supports non-interactive aggregation of proofs across multiple commitments。允许任何第三方 aggregate a collection of proofs with respect to different, independently computed commitments into a single proof represented by an elliptic curve point of 48-bytes。
- 将Pointproofs用于blockchain smart contract。相比于之前的vector commitment方案,Pointproofs可将传输一个区块交易所需的带宽开销降低至少60%。
- 以单线程运行时,generate a proof for 8 values with respect to one commitment的时间为0.08s,aggregate 4000 such proofs across multiple commitments into one proof的时间为0.25s,verify the aggregated proof的时间为23s(0.7ms per value proven)。
Vector commitment可用于减少存储空间:instead of storing a vector of values, one can store only the commitment and receive the values together with their proofs as needed。
Vector commitment可让application 在storage of all value和 bandwidth taken up by revealed values and proofs 之间进行取舍平衡。
为了在减少存储空间的同时尽可能减少带宽,需要 reduce the proof size。但是,由于需要满足cryptographically hard to forge的要求,单个proof的size cannot be reduced too far。改进的方式可为:
- 在单个proof中支持reveal multiple values。最短的单个proof size实现可参见Russell W. F. Lai 和 Giulio Malavolta 在Crypto 2019上发表的论文《Subvector Commitments with Application to Succinct Arguments》中5.2节构建的subvector commitment from Cube Diffie-Hellman Assumption:a proof takes up only 48 bytes (for typical parameter values at conjectured 128-bit security) regardless of how many elements of the vector are being revealed。(参见博客 Subvector Commitments with Application to Succinct Arguments学习笔记)
- 在分布式应用中,存在大量来源不同的commitments/values/proofs,它们相互 not aware of each other’s data。此时存在以下两个问题:
1)不存在可produce a single proof for all the values的单一实体;
2)proofs需要于多个不同的commitments关联。
Pointproofs可有效解决以上问题:a user can independently commit to her variables and provide short proofs for any subset of them; any third party can non-interactively aggregate multiple proofs with respect to different commitments into a single short proof。
Boneh等人2019年论文《Batching techniques for accumulators with applications to IOPs and stateless blockchains》可实现dynamic aggregation for proofs in a single (the same) commitment —— aggregate proofs for elements of a vector into a single proof for a subvector。(参见博客 密码学累加器cryptographic accumulator)
而在本论文中,Gorbunov等人实现了跨多个commitments的aggregate proofs。
具体的各方案对比为:
在本论文中,Gorbunov等人的主要贡献为:
-
实现了proofs for individual elements of a single vector commitment can be aggregated by any third party into a single proof for the subvector;
-
实现了proofs for subvectors of multiple commitments can be aggregated by any third party into a single proof for the multiple subvectors。
-
在实现aggregation的同时,也提供了hiding属性。
-
在Libert和Yung 2010年论文《Concise mercurial vector commitments and independent zero-knowledge sets with short proofs》构建的vector commitment基础上,增加了same-commitment aggregation和cross-commitment aggregation,从而实现了Pointproofs。
1)与此类似,Pointproofs的public parameter size is linear in the size of the committed vector(可将long vector切分为多个短的vectors,多个短的vectors的proofs可以aggregate,但是commitments不能aggregate,从而缩短了public parameter size,但是增加了total size of the commitments);
2)与此类似,Pointproofs也基于q-type assumption。In order to prove security of aggregation, we have to work in the algebraic group model and the random oracle model. We can reduce these assumptions by lowering efficiency and/or security requirements. -
Pointproofs生成的proof为single point on a pairing-friendly curve (48 bytes at 128-bit security),无论是single value for a single commitment,subvector of values for a single commitment,还是set of subvectors for multiple commitments。
-
Pointproofs中实现了支持aggregation的hiding属性,仅需增加an additional exponentiation,commitment size和proof size均无需增加。而Dario Catalano 和 Dario Fiore 2013年论文《Vector Commitments and their Applications[https://eprint.iacr.org/2011/495.pdf]》中提到的给Vector commitment加hiding属性的方法为:add an inner layer of hiding commitments to individual values —— first commit to each message separately using a standard commitment scheme, then apply the VC to the obtained sequence of commitments。但是该方式无法automatically extend to aggregatable vector commitments,因为proofs for the inner layer are not automatically aggregatable。
-
Pointproofs可用于reduce storage requirements for blockchains。主要针对smart contract智能合约场景。假设一个智能合约有多个变量,所有变量当前值(m1,⋯,mN) are committed to a single vector commitment C,每个智能合约有一个commitment。
为了与智能合约交互,one provides a 480byte proof $ \hat{\pi}$ of the current values of the variables needed for the transaction,transaction成功执行后可能会更新这些变量值。当存在多个智能合约时,cross-commitment aggregation允许compress multiple proofs π^1,⋯,π^l into a single 48-byte proof π。从而可从根本上消除the bandwidth overhead due to proofs in a proposed block。
将Pointproofs用于智能合约存储时,针对108千万级accounts,可将validators’ storage requirements降为4.5GB,assuming one open value per transaction 的情况下,仅需增加31KB per block overhead for 1000 transactions。 -
Pointproofs 代码实现https://github.com/algorand/pointproofs 中的实际性能表现为:针对a commitment for 1000 variables of a smart contract at 128-bit security level,生成任意subvector proof的时间为54~123ms;a block proposer对所有proofs进行cross-commitment aggregate的时间约为0.07ms per proof;存储了commitments 的 validator verify the aggregated proofs in a block的时间约为 0.7~1.9ms per value verified;为表示变量值的更新(通过交易执行),需要update commitments的时间约为0.2~0.3ms per variable updated。
cross-commitment aggregation of proofs可用于很多场景,如:
- signature aggregation:compress multiple signatures produced by different users into a short signature。如Jae Hyun Ahn等人2010年论文《Synchronized aggregate signatures: new definitions, constructions and applications》中介绍的sensor networks,KyleBrogle等人2012年论文《Sequential aggregate signatures with lazy verification from trapdoor permutations - (extended abstract)]( https://www.iacr.org/archive/asiacrypt2012/76580637/76580637.pdf)》中介绍的internet routing以及Drijvers等人2020年论文《Pixel: Multi-signatures for consensus》中介绍的POS (Proof-of-Stake) 共识。Aggregating commitment proofs is a natural counterpart to aggregating signatures。
- 多个用户或实体分别独立commit to their databases of records(如public keys, healthcare records, transactions等),然后同时produce proofs to reveal several committed values。在这种场景下,cross-commitment aggregation可用于减少带宽。
vector commitment的相关工作:
- 正式定义了vector commitments:Libert和Yung 2010年论文《Concise mercurial vector commitments and independent zero-knowledge sets with short proofs》,以及Dario Catalano 和 Dario Fiore 2013年论文《Vector Commitments and their Applications[https://eprint.iacr.org/2011/495.pdf]》。
- 实现了constant-size proofs for a subvector of values:Kate等人2010年论文《Constant-size commitments to polynomials and their applications》,以及Thakur 2019年论文《Batching non-membership proofs with bilinear accumulators》。
但是Kate等人2010年论文《Constant-size commitments to polynomials and their applications》第3.4节定义的binding notion is not strong enough to preclude openings to two inconsistent subvectors。
而Libert和Yung 2010年论文《Concise mercurial vector commitments and independent zero-knowledge sets with short proofs》, Dario Catalano 和 Dario Fiore 2013年论文《Vector Commitments and their Applications[https://eprint.iacr.org/2011/495.pdf]》,Benoˆıt Libert, Somindu C. Ramanna 和 Moti Yung 2016年论文 《Functional Commitment Schemes: From Polynomial Commitments to Pairing-Based Accumulators from Simple Assumptions》,以及Chepurnoy等人2018年论文《Edrax: A cryptocurrency with stateless transaction validation》,这些论文中的vector commitment无法实现constant-size proofs for multiple values。 - pairing-based vector commitments:Dario Catalano 和 Dario Fiore 2013年论文《Vector Commitments and their Applications[https://eprint.iacr.org/2011/495.pdf]》,Benoˆıt Libert, Somindu C. Ramanna 和 Moti Yung 2016年论文 《Functional Commitment Schemes: From Polynomial Commitments to Pairing-Based Accumulators from Simple Assumptions》,以及Russell W. F. Lai 和 Giulio Malavolta 在Crypto 2019上发表的论文《Subvector Commitments with Application to Succinct Arguments》。
- polynomial commitments:始于Kate等人2010年论文《Constant-size commitments to polynomials and their applications》,overview信息可参看Benedikt B¨unz等人2019年论文《Proofs for inner pairing products and applications》。
在Boneh等人2020年论文《Efficient polynomial commitment schemes for multiple points and polynomials》中实现了polynomial commitments with batch opening和vector commitments with aggregation,但是其效率要低于本论文实现。
1.1 一些定义
-
Notation:
-
The Algebraic Group Model(AGM) :即adversary输出的group element值应基于其收到的group element进行有效的group operation计算得出的,而不是随意创造的。
Suppose adversary is given group elements X1,⋯,XN∈G1. Then, for every group element Z∈G1 that the adversary outputs, it must also ouput z1,⋯,zN∈Zp such that Z=∏i=1NXizi. -
security assumption:在bilinear pairing group中求解l-wBDHE(weak bilinear Diffie-Hellman exponent problem)很难,即对任意的α←Zp已知g1α,g1(α2),⋯,g1(αl),g1(αl+2),⋯,g1(α3l),g2α,g2(α2),⋯,g2(αl)
求解g1(αl+1)很难。
对于BLS12-381 pairing-friendly curve with l−32,当前best attack has complexity 2112。 -
The Random Oracle Model(ROM):本文的security proofs are in the random oracle model。在本文model a cryptographic hash function as a truly random function, accessible to all parties only via oracle queries。本文使用了两个random oracles H和H‘,both with output space Zp。
2. vector commitment
采用与Libert和Yung 2010年论文《Concise mercurial vector commitments and independent zero-knowledge sets with short proofs》类似的思路,基于非对称bilinear pairing group,相应的实现细节为:
-
Setup: Let (G1,G2,GT) be a group of prime order p,along with pairing e:G1×G2→GT and generators g1,g2,gT=e(g1,g2) for G1,G2,GT respectively. Let α∈Zp be a secret value (known to no one after the initial generation of public parameters). The pulic parameters are given by 2N−1 values in G1, N values in G2, and one value in GT(该值易于计算获得,如gTαN+1=e(g1α,g2αN+1)=e(g1,g2)αN+1):【注意g1αN+1不应包含在public parameters中,否则Prover可伪造证明。】
g1α,⋯,g1αN,g1αN+2,⋯,g1α2N;g2α,⋯,g2αN;gTαN+1 -
Commit:对vector m=(m1,⋯,mN)∈ZpN,
C=g1∑i=1Nmiαi -
Prove:reveal mi,
πi=g1∑j=imjαN+1−I+J=(C/g1miαi)αN+1−i -
Verify:
e(C,g2αN+1−i)=e(πi,g2)⋅gTmiαN+1
2.1 支持aggregation的vector commitment思路集锦
为了实现reveal multiple values mi:i∈S (其中S⊆[N]) for a single commitment C via a very short proof πS。
-
思路一:
直接计算πS=∏i∈Sπi,然后验证e(C,∏i∈Sg2αN+1−i)=e(πS,g2)⋅gTαN+1∑i∈Smi。
该方式不安全,若open S=1,2,可commit to (m1,m2)=(1,3)而open为(m1,m2)=(2,2),违反了binding属性(只bound to ∑i∈Smi,而不是{mi:i∈S}中的每一个值。)。
同时,还需要防止inconsistnent reveals for possibly two different sets,如分别open (m1,m2)为(1,3),(m2,m3)为(2,1)的情况是不允许的。 -
思路二:实现same-commitment aggregation
在verification方程式中引入“随机”scalars ti,
e(C,∏i∈Sg2αN+1−iti)=e(πS,g2)⋅gTαN+1∑i∈Smiti
aggregated proof πS=∏i∈Sπiti
scalars ti的值可通过applying a hash function H on some carefully chosen inputs depending on C,S,{mi:i∈S}。类似的思路在Boneh等人2018年论文《Compact multi-signatures for smaller blockchains》的aggregating signatures中有提及。
怎样选择ti来保证binding属性呢?若ti←Zp为indeed random,则可保证Pr[∑i∈Smiti=∑i∈Smi‘ti‘]=1/p,即对同一位置open为两个不同值的概率可忽略。
可将hash function H 看成是a random oracle。同时,还需要restrict the adversary to the so-called algebraic group model,以便可express adversarially generated commitments C in terms of public parameters。 -
思路三:实现cross-commitment aggregation
对多个不同的vector进行commit,第j个vector 可表示为 mj=(mj,1,⋯,mj,N),对应的commitment为 Cj,对set Sj的open proof为π^j,则满足:
e(Cj,∏i∈Sjg2αN+1−itj,i)=e(π^j,g2)⋅gTαN+1∑i∈Sjmj,itj,i
若直接将多个vector对应的verification equation都一起相乘,则有:
∏je(Cj,∏i∈Sjg2αN+1−itj,i)=e(∏jπ^j,g2)⋅gTαN+1∑j∑i∈Sjmj,itj,i
与思路一类似,上述方式是不安全的,需要在引入额外的random scalars tj‘,相应的aggregated proof为π=∏jπ^j,对应的verification equation调整为:
∏je(Cj,∏i∈Sjg2αN+1−itj,i)tj‘=e(π,g2)⋅gTαN+1∑j∑i∈Sjmj,itj,itj‘
2.2 Same-commitment aggregation
2.3 Cross-commitment aggregation
2.4 hiding属性的实现
标签:Multiple,g2,g1,Aggregating,Pointproofs,commitment,commitments,alpha,proofs 来源: https://blog.csdn.net/mutourend/article/details/106268009