Vector Commitment Techniques and Applications to Verifiable Decentralized Storage学习笔记

1. 引言

Campanelli等人 2020年论文《Vector Commitment Techniques and Applications to Verifiable Decentralized Storage》,介绍视频参看:https://www.youtube.com/watch?v=MFJMWA0Pk1s
代码实现:
https://github.com/nicola/rust-yinyan

与同期VMware research和以太坊团队2020年论文《Aggregatable Subvector Commitments for Stateless Cryptocurrencies》有相互引用。


针对vector m = { m 1 , , m n } \vec{m}=\{m_1,\cdots,m_n\} ,每个元素 m i m_i k k -bits组成,根据位置 i [ n ] i\in[n] 映射为co-prime vector p = { p 1 , , p n } \vec{p}=\{p_1,\cdots,p_n\}

  • Boneh 等人 [BBF19] 2018年论文《Batching Techniques for Accumulators with Applications to IOPs and Stateless Blockchains》(可参见博客 密码学累加器cryptographic accumulator)中,主要是通过对 0 0 -bit提供non-membership proof,对 1 1 -bit提供membership proof,然后对 ( a k , a [ n ] ) (ak,a\in[n]) 个位置进行batch open,从而实现subvector commitment;
  • 本论文第一种方式所构建的SVC,在[BBF19]的基础上,主要做了如下改进:
    – 1)弃用了non-membership proof。
    – 2)对每个位置 j [ k ] j\in[k] ,分别拆分为 0 0 -bit 累加器 a c c j 0 acc_{j0} 1 1 -bit累加器 a c c j 1 acc_{j1} 。一共有 2 k 2k 个累加器。对所有的 i [ n ] i\in[n] ,若 j j -th bit of m i m_i 0 0 ,则将 p i p_i 分配至累加器 a c c j 0 acc_{j0} ;否则分配至累加器 a c c j 1 acc_{j1}
    – 3)对于任意位置 j [ k ] j\in[k] a c c j 0 acc_{j0} 内的co-prime元素乘积 a j a_j a c c j 1 acc_{j1} 内的co-prime元素乘积 b j b_j ,则有 a j b j = i = 1 n p i a_j\cdot b_j=\prod_{i=1}^{n}p_i 。借助 P o P r o d 2 PoProd_2 protocol即可实现相应的证明。(参见6.1.1节内容。)

  • SVC对比:
    在这里插入图片描述
  • VDS对比:
    在这里插入图片描述

1.1 背景知识

Russell W. F. Lai 和 Giulio Malavolta 在Crypto 2019上发表的论文《Subvector Commitments with Application to Succinct Arguments》中主要关注的是subvector commitment (SVC) —— 允许open a committed vector at a set of positions,且opening size与vector的size以及要open的位置数均无关。(具体参见博客 Subvector Commitments with Application to Succinct Arguments学习笔记
本文在SVC的基础上,提出了2个目标:

  • 改进效率improving efficiency;
  • 使SVC更适用于decentralized settings。

为实现这2个目标,提出了:

  • 支持incremental aggregation的VC:允许merge openings in a succinct way an unbounded number of times。

  • 同时对比了直接generate openings in a distributed way算法和通过preprocessing使用incremental aggregation来更快生成openings的算法。

  • 为支持incremental aggregation SVC,基于groups of unknown order,提出了2种实现。与Boneh 等人2018年论文《Batching Techniques for Accumulators with Applications to IOPs and Stateless Blockchains》类似(可参见博客 密码学累加器cryptographic accumulator),但是Boneh只支持one-hop aggregation。两者均有constant-size public parameters,commitments and openings。但是本文构建的第1个方法支持将subvector openings证明用于keyless proof of storage with compact proofs。

  • 将SVC用于:storing a file efficiently in completely decentralized networks。本文介绍了verifiable decentralized storage (VDS) cryptographic primitive,允许用于检查 the integrity of a file stored by a network of nodes in a distributed and decentralized way。

值得注意的是,[Mer88] Merkle tree 可看成是具有 O ( log n ) O(\log_{}{n}) -size openings的vector commitment。
在这里插入图片描述

1.2 vector commitment历史

  • 2010年,[LY10] Benoît Libert和Moti Yung 的论文《Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs》在[CFM] qTMC的基础上,提出 了 a concise mercurial vector commitment,具有如下特性:
    (1)hard and soft position-wise openings both have constant size(independent of q q )。
    (2)the committer can hard-open the commitment at position i { 1 , , q } i\in\{1,\cdots,q\} without revealing anything on messages at other positions in the vector。
    (3)membership proof和non-membership proof的长度均较短, O ( λ / log ( q ) ) O(\lambda/\log(q)) 。取 q = 128 q=128 ,proof可不超过2KB。
    (4)可转化为concise multi-trapdoor qTMC scheme,以支持构建independent zero-knowledge databases,从而实现ZK-EDB的independence和short proof。(参见博客 Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs 学习笔记

  • 2013年,[CF13] Dario Catalano 和 Dario Fiore 2013年论文《Vector Commitments and their Applications》中提出了两种Vector Commitment实现:基于RSA-assumption的Vector Commitment实现;基于Computational Diffie-Hellman (in bilinear groups) CDH-assumption的Vector Commitment实现。(参见博客 Vector Commitments and their Applications学习笔记

  • 在这里插入图片描述

  • 2019年,[BBF19] 和 [LM19] 均支持subvector openings,在[BBF19]中称为batch openings。A VC with subvector openings (called SVC, for short) allows one to open a commitment at a collection of positions I = { i 1 , . . . , i m } I = \{i_1, . . . , i_m\} with a constant-size proof, namely of size independent of the vector’s length n n and the subvector length m m . subvector openings属性,可用于降低communication complexity,如PCP/IOP-based succinct arguments以及keyless Proofs of Retrievability (PoR) [Fis18]。
    [BBF19] Boneh等人论文《Batching Techniques for Accumulators with Applications to IOPs and Stateless Blockchains》中提出的VC算法,其subvector openings为constant size,public parameters也为constant size(与vector的长度无关)。(参见博客 密码学累加器cryptographic accumulator
    2019年,[LM19] Russell W. F. Lai 和 Giulio Malavolta 在Crypto 2019上发表的论文《Subvector Commitments with Application to Succinct Arguments》中主要关注的是subvector commitment (SVC):
    (1)SVC允许open a committed vector at a set of positions,且opening size与vector的size以及要open的位置数均无关。
    (2)subvector commitment based on root assumption (RSA assumption),同时将其推广到work over modules over Euclidean rings。
    (3)subvector commitment based on CubeDH assumption。
    (4)Linear map commitment (LMC):allow to open a committed vector to its images under linear maps with a single short message, and propose a construction over pairing groups。
    (5)CS proof:使用Fiat-Shamir transform in the random oracle model 来构建non-interactive argument。
    (6)本文提出使用SVC来实现将PCP转换为non-interactive argument。
    (7)在该文第8章提出了一些可供被选定module families。
    (参见博客 Subvector Commitments with Application to Succinct Arguments学习笔记
    在这里插入图片描述

  • 本文研究的重点是支持subvector openings的vector commitment (SVC),主要目标是提升效率以及扩展其在分布式系统的应用。
    现有的SVC最主要的特性是constant size of their opening proofs,最大的缺陷是每次generating each opening takes at least time O ( n ) O(n) (i.e., as much as committing)。
    [BBF19]中指出,VC可用于解决分布式账本(如account model blockchain)完整性的问题:commitment is a succinct representation of the ledger,and a user responsible for the i i -th entry can hold the corresponding opening and use it to prove validity of v i v_i 。但是,在[BBF19]中并未明确指出 how to create a succinct subvector opening for, say, m m positions held by different users each responsible only of its own position/s in the vector。【Pointproofs 有关注proof of correctness/binding for cross-commitment aggregation (参见博客 Pointproofs: Aggregating Proofs for Multiple Vector Commitments 学习笔记1)】
    在这里插入图片描述
    在这里插入图片描述

1.3 SVC + incremental aggregation/disaggregation

SVC + incremental aggregation:即支持不同的subvector openings (如, sets of positions I I J J ) 可merged together into a single concise (如,constant-size) opening (for positions I J I\cup J ),而整个merge或aggregate的过程中,不需要知道整个committed vector。
aggregation is incremental 可递增的,是指:aggregated proofs can be further aggregated(如,two openings for I J I\cup J and K K can be merged into one for I J K I\cup J\cup K ,以此类推,无次数现在),同时也支持disaggregate(如,given an opening for set I I , one can create one for any K I K\subset I )。

[BBF19]中VC算法支持aggregation,但是can be performed only once。而本文构建的第一个VC Scheme支持无限次数的aggregate。

incremental属性是解决SVC效率和分布式应用的关键。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • incremental aggregation for efficiency:之前每次生成opening的时间均为线性的 O λ ( n ) O_{\lambda}(n) 。本文通过在commitment时进行precompute 计算包含 n / B n/B openings 的辅助信息( B B 为每次batch open的位置数。)

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

1.4 构建支持incremental aggregation的SVC

  • 支持incremental aggregation的VC:本文构建了2种方式:(均需要hidden-order groups [DK02](如classical RSA groups, class groups [BH01]以及最近的proposed groups from Hyperelliptic Curves [DG20]。))
    (1)一种是类似于[BBF19],基于Strong RSA assumption in groups of unknown order,借助preprocessing,本文算法的open速度要远远高于[BBF19]。In a file of 1 Mibit ( 2 20 2^{20} bits), preprocessing reduces the time to open 2048 bits from one hour to less than 5 seconds!
    (2)在[LM19]和[CF13]的RSA-based SVC的基础上,使其具有constant-size parameters并实现incremental aggregation。与第一种方法相比,本方法效率更高,且based on more standard assumption, in the standard model。
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

1.5 用于Verifiable Decentralized Storage的incremental aggregation SVC

Incremental aggregation for decentralization:
decentralized storage networks (DSNs):a decentralized and open alternative to traditional cloud storage and hosting services。如Filecoin(built on top of IPFS),Storj,Dat,Freenet以及general-purpose blockchains like Ethereum均关注这个领域。
VDS:Verifiable Decentralized Storage。
在这里插入图片描述
在这里插入图片描述

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

2. unknown order group下的假设

根据 [BBF18,BBF19,LM19] 里的讨论,实际可用的group有:

  • class groups [BH01];
  • the quotient group Z N \mathbb{Z}_N^* /{1,-1} of an RSA group [Wes18]。

注意不可以直接使用整个RSA group,因为 1 Z N -1\in\mathbb{Z}_N^* 的order是known的,这样adaptive root assumption就不成立了。在quotient group中, { 1 , 1 } \{1,-1\} 为identity element,因此,知道 1 -1 的order并不有助于找到任何non-identity element的root,因此adpative root assumption仍然成立。

2.1 Low Oder Assumption [BBF18]

在这里插入图片描述

2.2 Adaptive Root Assumption [Wes18]

在这里插入图片描述

2.3 Strong-RSA Assumption [BP97]

在这里插入图片描述

2.4 Strong Distinct-Prime-Product Root assumption [LM19]

在这里插入图片描述

3. Shamir’s Trick [Sha83]

Shamir’s Trick:具体是指,已知 ρ x x = ρ x y = g \rho_x^x=\rho_x^y=g ,求 g g x y xy -th root的方法:
x , y x,y 的最大公约数为 d = g c d ( x , y ) d=gcd(x,y) ,则存在相应的 a , b a,b ,使得 a x + b y = d ax+by=d 成立,于是 g g x y xy -th root为 ρ x b ρ y b \rho_x^b\rho_y^b

在[BBF19] Boneh等人论文《Batching Techniques for Accumulators with Applications to IOPs and Stateless Blockchains》中要求的是 x , y x,y 互为素数,则有 d = g c d ( x , y ) = 1 d=gcd(x,y)=1 。(参见博客 密码学累加器cryptographic accumulator
在这里插入图片描述

4. hidden order group下的succinct arguments of knowledge

可参看博客 Proof (of knowledge) of exponentiation

4.1 Protocol PoE

在这里插入图片描述

4.2 Protocol PoKE*

在这里插入图片描述

4.3 Protocol PoKE2

在这里插入图片描述

5. VC+subvector openings

[LM19] Russell W. F. Lai 和 Giulio Malavolta 在Crypto 2019上发表的论文《Subvector Commitments with Application to Succinct Arguments》中(参见博客 Subvector Commitments with Application to Succinct Arguments学习笔记)提出的 VC with subvector openings 是基于Benoˆıt Libert, Somindu C. Ramanna 和 Moti Yung 2016年论文 《Functional Commitment Schemes: From Polynomial Commitments to Pairing-Based Accumulators from Simple Assumptions》(参见博客 Functional Commitment Schemes: From Polynomial Commitments to Pairing-Based Accumulators学习笔记)的 functional vector commitments 的基础上的specialization。

functional vector commitments 是在普通vector commitment的基础上,额外增加了:opening the commitment to a function of the committed vector,如 f ( v ) f(\vec{v})

vector commitment with subvector openings简称为SVC。

  • subvectors定义为:
    在这里插入图片描述
  • SVC基本算法组成:
    在这里插入图片描述

5.1 VC+Specializable Universal CRS

通常vector commitment的public parameters(又称为CRS, common reference string),会依赖于committed vector的长度 n n ,即为length-specific CRS。
而本文的VC.Setup算法,是与 n n 无关的,受[GKM+18] 2018年Groth等人论文《 Updatable and Universal Common Reference Strings with Applications to zk-SNARKs》启发,将这样的称为VC with Specializable (Universal ) CRS。

由于VC.Com, VC.OpenVC.Ver等算法都是work on input a length-specific CRS c r s n crs_n 。因此,对于VC with Specializable CRS, c r s n crs_n 的生成会拆分为2步:

  • a length-independent, probabilistic setup c r s V C . S e t u p ( 1 λ , M ) crs\leftarrow VC.Setup(1^{\lambda},M)
  • a length-dependent, deterministic specialization c r s n V C . S p e c i a l i z e ( c r s , n ) crs_n\leftarrow VC.Specialize(crs,n)

这种模式的优点是:由于VC.Specialize为deterministic的,可以由任何人执行,且对于不同长度的vectors可以复用相同的 c r s crs

  • VC+Specializable Universal CRS定义为:
    在这里插入图片描述

5.2 incremental aggregation subvector openings

  • aggregation的定义为:
    different proofs of different subvector openings can be merged together into a single short proof which can be created without knowing the entire committed vector。

  • incremental aggregation的定义为:
    支持再次组合,即aggregated proofs可以再次被aggregate。与aggregate signature类似,将支持再次组合的aggregate属性称为incremental aggregation或者multi-hop aggregation。

  • disaggregation的定义为:
    即from an opening of positions in the set I I one can create an opening for positions in a set K I K\subset I

本文对aggregation和disaggregation提了2个要求:(而不再是将单个位置的opening简单的拼接在一起。)

  • all openings must remain short(即与open的位置数无关);
  • aggregation和/或disaggregation must be computable locally,即可在不知道整个committed vector的情况下执行。

Aggregatable Subvector Openings的定义为:(主要分为VC.AggVC.Disagg 两个算法)
在这里插入图片描述
当需要aggregate several openings for sets of positions I 1 , , I m I_1,\cdots,I_m into a single opening for j = 1 k I j \cup_{j=1}^kI_j 时,直观的方法是依次调用VC.Agg算法进行Sequential aggregation,,相应的复杂度为 Θ ( m 2 ) \Theta(m^2)
在这里插入图片描述
而借助Divide-and-Conquer 分治法(递归),aggregate m m 个openings的复杂度可降为 Θ ( s m log m ) \Theta(s\cdot m\log m) 。(其中 s s I j I_j 的size bound。)
在这里插入图片描述
而当需要disaggregate an opening for a set I I into several openings for sets I 1 , , I m I_1,\cdots,I_m that from a partition of I I ,仍然可借助Divide-and-Conquer 分治法(递归),复杂度为 Θ ( m log ( m / B ) ) \Theta(m\log (m/B))
在这里插入图片描述

5.3 precomputation for committing and opening

在这里插入图片描述
在这里插入图片描述
若vector size为 n n B B 值的取值范围可为 1 1 n n B B 值越大,则所需的memory越小,但是opening time会增加;而 B B 值越小(极限情况为 B = 1 B=1 )时,需要的存储空间越大,而opening time将更少。

正常 B B 应为an integer that divides n n ,设置 n = n / B n'=n/B
在这里插入图片描述

6. incremental aggregatable SVC的算法实现

6.1 第一种SVC实现——基于RSA accumulators

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在[BBF19] Boneh等人论文《Batching Techniques for Accumulators with Applications to IOPs and Stateless Blockchains》(参见博客 密码学累加器cryptographic accumulator)的基础上,做了如下改进:

  • 不再使用non-membership proof来表示0值,而是将以二进制表示的vector S S 拆分为了ones S 1 S_1 zeros S 0 S_0 两组集合。
  • 为了防止同一index被分配到了2组集合中,需要proof π S \pi_S 保证 each index i i is in either S 0 S_0 or S 1 S_1 ,即不允许adversary对同一位置 i i open为 b b 1 b 1-b 2个值。

6.1.1 P o P r o d 2 PoProd_2 protocol

P o P r o d 2 PoProd_2 protocol:【基本思想为模运算。】
在这里插入图片描述
在这里插入图片描述

6.1.2 关键定义

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

其中:

  • v i j v_{ij} 表示the j j -th bit in position i i 。其中message space M = { 0 , 1 } k M=\{0,1\}^k ,vector v M n \vec{v}\in M^n i [ n ] i\in[n] j [ k ] j\in [k]。 即vector内每个元素以 k k 个二进制位表示。

  • PrimProd(I)是对indices集合 I I 中的所有prime值求乘积—— P r i m e P r o d ( I ) = u I = i I p i PrimeProd(I)=u_I=\prod_{i\in I}p_i 。当 I = [ n ] I=[n] 时, P r i m e P r o d ( [ n ] ) = u n PrimeProd([n])=u_n

  • PrimeGen用于map integers to primes。与[BBF19]的实现类似。

  • P a r t n d P r i m e P r o d ( I , y ) ( ( a I 1 , b I 1 ) , , ( a I k , b I k ) ) PartndPrimeProd(I,\vec{y})\rightarrow ((a_{I1},b_{I1}),\cdots,(a_{Ik},b_{Ik})) :即输入为set of indices I = { i 1 , , i m } [ n ] I=\{i_1,\cdots,i_m\}\subseteq [n] 和vector y M m \vec{y}\in M^m ,将每个元素bit为1对应的素数相乘记为 b I j b_{Ij} ,将每个元素bit为0对应的素数相乘记为 a I j a_{Ij}
    ( a I j , b I j ) = ( l = 1 ; y l j = 0 m p i l , l = 1 ; y l j = 1 m p i l ) ,   f o r   j = 1 , , k (a_{Ij},b_{Ij})=(\prod_{l=1;y_{lj}=0}^{m}p_{i_l},\prod_{l=1;y_{lj}=1}^{m}p_{i_l}),\ for \ j=1,\cdots,k
    其中 p i l P r i m G e n ( i l )   f o r   a l l   i l p_{i_l}\leftarrow PrimGen(i_l)\ for\ all\ i_l

  • 对于任意的 I I y \vec{y} ,总是有 a I j b I j = u I a_{Ij}\cdot b_{Ij}=u_I 恒成立。

6.1.3 SVC+incremental aggregation详细实现

详细算法实现如下:
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

6.2 第二种SVC实现——基于RSA assumption

主要基于[LM19] Russell W. F. Lai 和 Giulio Malavolta 在Crypto 2019上发表的论文《Subvector Commitments with Application to Succinct Arguments
(参见博客 Subvector Commitments with Application to Succinct Arguments学习笔记 第3节内容“subvector commitment based on root assumption over Euclidean ring”)和 [CF13] Dario Catalano 和 Dario Fiore 2013年论文《Vector Commitments and their Applications》(参见博客 Vector Commitments and their Applications学习笔记 第2.2节内容“2.2 基于RSA的Vector Commitment实现”)。

在这里插入图片描述

基于RSA assumption构建的SVC算法细节为:
在这里插入图片描述
在这里插入图片描述

7. VDS算法实现

7.1 第一种VDS算法实现

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

7.2 第二种VDS算法实现

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

猜你喜欢

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