A (Zero-Knowledge) Vector Commitment with Sum Binding and its Applications学习笔记

1. 引言

Qiang Wang等人2019年发表于Oxford University Press on behalf of the Institute of Mathematics and its Applications 的论文《A (Zero-Knowledge) Vector Commitment with Sum Binding and its Applications》中,主要内容为:

  • 在Vector commitment的基础上,提出了增加了sum binding属性的VCS。
  • 现有的vector commitment在提供position-binding属性的同时,无法提供隐私保护——即client可能可以通过proofs和commiments获取额外的committed sequence信息。本文提出了zero-knowledge VCS (ZKVCS)—— in which commitments and proofs constructed during the protocol execution leak nothing about the committed sequence。
  • 使用(ZK)VCS构建了一个支持 sum 求和运算的(zero-knowledge) verifiable database。

Commitment为密码学中的独立primitive,在zero-knowledge proof,secure computation,e-voting和verifiable secret sharing中均有重要作用。

Commitment具有hiding和binding属性,通常包含2个阶段:

  • Committing阶段;
  • Opening阶段。

Commitment中通常有2个角色:

  • committer:计算commitment C C
  • client:接收commitment C C 和opening信息。

1.1 commitment发展史

但是,以上方法存在以下缺陷:

  • Expressiveness:现有的VC scheme仅支持open 位置信息,但是无法满足现实世界的使用需求。如,当已知每个月降雨量的commitment值,现有VC scheme无法支持open全年的降雨量值。因此,除了open位置信息外,也应支持open更多形式的信息。
  • Privacy:现有VC scheme的position binding属性仅能保证committer无法对同一位置open出2个不同的值,但是并没有提供隐私保护,a malicious client may learn extra information about the sequence from the proofs and the commitments。

本文提出的VCS (VC with sum binding),额外支持:

  • open the sum of all elements in committed sequence。

本文提出的ZKVCS (zero-knowledge VCS),无论是open to sum 还是open at position,client都无法获取any information about the committed sequence。hiding property仅能保证malicious client cannot learn any information from the commitments,而ZKVCS可保证malicious client cannot learn any information about the committed squences from the proofs and commitments。

本文的VCS或ZKVCS用于verifiable database时,仍然存在 forward automatic update attack问题,可借助Chen, X.等人2015年论文《New publicly verifiable databases with efficient updates》中的方法进行改进。

1.2 一些定义

  • Bilinear pairing:
    在这里插入图片描述

  • 多项式分解Polynomial decomposition:
    根据Papamanthou等人2013年论文《Signatures of correct computation》中的Lemma 1, n n -变量多项式具有如下分解属性:
    在这里插入图片描述
    即polynomial commitment的根本是:
    对于有 n n 个变量( x = ( x 1 , , x n ) \vec{x}=(x_1,\cdots,x_n) )的多项式 f ( x ) Z p [ x ] f(\vec{x})\in\mathbb{Z}_p[\vec{x}] ,对任意取值 a Z p n \vec{a}\in\mathbb{Z}_p^n ,存在有效的算法,可找到 n n 个多项式 Q i ( x ) Q_i(\vec{x}) ,使得 f ( x ) f ( a ) = i = 1 n ( x i a i ) Q i ( x ) f(\vec{x})-f(\vec{a})=\sum_{i=1}^{n}(x_i-a_i)\cdot Q_i(\vec{x}) 成立。
    在这里插入图片描述

  • 相关符号定义:
    在这里插入图片描述

1.3 安全假设

  • Bilinear inverse assumption:
    在这里插入图片描述
  • Bilinear q q -strong Diffie-Hellman assumption:
    在这里插入图片描述

1.4 属性及性能对比

在这里插入图片描述

2. VCS基本定义

详情参见博客 Vector Commitments and their Applications学习笔记
VC由以下6个算法组成:

  • VC.KeyGen
  • VC.Com
  • VC.Open
  • VC.Ver
  • VC.Update
  • VC.ProofUpdate

VCS为了支持sum binding 属性,在VC的基础上,额外增加了2个算法:

  • VC.OpenSum
  • VC.VerSum

2.1 VCS算法定义

VCS由8个算法(VC.KeyGen,VC.Com,VC.Open,VC.Ver,VC.Update,VC.ProofUpdate,VC.OpenSum,VC.VerSum)组成,各算法定义如下:

  • p p V C . K e y G e n ( 1 k , q ) pp\leftarrow VC.KeyGen(1^k,q) :key generation算法,输入为security parameter k k c o m m i t t e d v e c t o r committed vector 的size q q q = p o l y ( k ) q=poly(k) )。输出为public parameters p p pp (which implicitly define the message space M M )。

  • ( C , a u x ) V C . C o m p p ( m 1 , , m q ) (C,aux)\leftarrow VC.Com_{pp}(m_1,\cdots,m_q) :committing算法,由committer运行。输入为a sequence of q q messages m 1 , , m q M m_1,\cdots,m_q\in M 和public parameters p p pp ,输出为commitment值 C C 和auxiliary information a u x aux 。( a u x aux 为committer的私有信息。)

  • Λ i V C . O p e n p p ( m i , i , a u x ) \Lambda_i\leftarrow VC.Open_{pp}(m_i,i,aux) :opening算法,由committer运行。输入为public parameters p p pp 、位置 i i 、消息 m i m_i 以及辅助信息 a u x aux ,输出为proof Λ i \Lambda_i (用于证明 m i m_i is the i i -th committed message)。

  • { 0 , 1 } V C . V e r p p ( C , m , i , Λ i ) \{0,1\}\leftarrow VC.Ver_{pp}(C,m,i,\Lambda_i) :verification算法,由任意client运行。输入为public parameters p p pp 、commitment值 C C 、位置 i i 、opened消息 m m 以及proof Λ i \Lambda_i 。若 Λ i \Lambda_i 为a valid proof that C C is a commitment to the sequence ( m 1 , , m q ) (m_1,\cdots,m_q) such that m = m i m=m_i ,则输出为 1 1 ,否则输出为 0 0

  • ( C , U ) V C . U p d a t e p p ( C , m , m , i ) (C',U)\leftarrow VC.Update_{pp}(C,m,m',i) :update算法,由生成 C C 的原始committer运行,用于update C C by changing the i i -th message m m to m m' 。输入为public parameters p p pp 、commitment值 C C 、位置 i i 、老的消息 m m 、新消息 m m' ,输出为新的commitment C C' 和update information U U

  • ( C , Λ j ) V C . P r o o f U p d a t e p p ( C , Λ j , m , U ) (C', \Lambda_j')\leftarrow VC.ProofUpdate_{pp}(C,\Lambda_j,m',U) :proof update 算法,由任何拥有proof Λ j \Lambda_j (for some message at position j j ) client运行。输入为public parameters p p pp 、老的commitment值 C C 、proof Λ j \Lambda_j (for some message at position j j )、新的消息 m m' (at position i i )和update information U U 。输出为新的commitment C C' 和新的updated proof Λ j \Lambda_j for m j m_j ,均对应新的sequence ( m 1 , , m i 1 , m , m i + 1 , , m q ) (m_1,\cdots,m_{i-1},m',m_{i+1},\cdots,m_q)

  • Λ s u m V C . O p e n S u m p p ( s u m , a u x ) \Lambda_{sum}\leftarrow VC.OpenSum_{pp}(sum,aux) :sum opening算法,由committer运行。输入为public parameters p p pp 、sum( ( m 1 , , m q ) (m_1,\cdots,m_q) 所有值之和)以及辅助信息 a u x aux 。输出为proof Λ s u m \Lambda_{sum} (用于证明 s u m = i = 1 q m i sum=\sum_{i=1}^{q}m_i )。

  • { 0 , 1 } V C . V e r S u m p p ( C , s u m , Λ s u m ) \{0,1\}\leftarrow VC.VerSum_{pp}(C,sum,\Lambda_{sum}) :sum verification算法,可由任意client运行。输入为public parameters p p pp 、commitment值 C C 、opened和值 s u m sum 以及proof Λ s u m \Lambda_{sum} 。当 Λ s u m \Lambda_{sum} is a valid proof that C C is a commitment to the sequence ( m 1 , , m q ) (m_1,\cdots,m_q) such that s u m = i = 1 q m i sum=\sum_{i=1}^{q}m_i 时,输出为 1 1 ,否则输出为 0 0

2.2 VCS correctness定义

即只要算法是honestly executed的,a valid proof should never be rejected。
以下定义为:对vector中的每个位置都依次进行了替换,保证最终的OpenOpenSum均可验证通过。
在这里插入图片描述

2.3 VCS position binding 定义

即不允许对同一位置open出2个不同的值。
以下定义为:

  • A 0 \mathcal{A}_0 生成任意长度为 q = p o l y ( k ) q=poly(k) 的vector。
  • 进行 l + 1 l+1 次:对vector中的任意位置 j j A 1 \mathcal{A}_1 )进行update,对任意位置 i i A 2 \mathcal{A}_2 )进行Open
  • 根据所获取的 l + 1 l+1 ( U a , C a , Λ a ) (U_a,C_a,\Lambda_a) 信息, A 3 \mathcal{A}_3 选取任意的位置 i i^*
  • 根据 i i^* l + 1 l+1 ( U a , C a , Λ a ) (U_a,C_a,\Lambda_a) 信息, A 4 \mathcal{A}_4 生成相应的 ( m i , Λ i ) (m_{i^*}',\Lambda_{i^*}') ,使得当 m i m i m_{i^*}'\neq m_{i^*} 时对 Λ i ) \Lambda_{i^*}') Ver通过的概率可忽略,即不大于 n e g l ( k ) negl(k)
    在这里插入图片描述
    在这里插入图片描述
    注意以上新的辅助信息 a u x a aux_a 可由updated information U a U_a 和老的辅助信息 a u x a 1 aux_{a-1} 生成。

2.4 VCS sum binding 定义

即不允许open a commitment to two different sums with respect to the committed sequence。
以下定义为:

  • A 0 \mathcal{A}_0 生成任意长度为 q = p o l y ( k ) q=poly(k) 的vector。
  • 进行 l + 1 l+1 次:对vector中的任意位置 j j A 1 \mathcal{A}_1 )进行update,对该vector进行OpenSum
  • 根据所获取的 l + 1 l+1 ( U a , C a , Λ s u m a ) (U_a,C_a,\Lambda_{sum_a}) 信息, A 2 \mathcal{A}_2 选取其中任意一组vector,生成相应的 ( s u m l , Λ s u m l ) (sum_{l}',\Lambda_{sum_l}') ,使得当 s u m l s u m l sum_{l}'\neq sum_l 时对 Λ s u m l ) \Lambda_{sum_l}') VerSum通过的概率可忽略,即不大于 n e g l ( k ) negl(k)
    在这里插入图片描述
    在这里插入图片描述

2.5 concise定义

Λ i \Lambda_i Λ s u m \Lambda_{sum} 与vector的长度 q q 无关。
在这里插入图片描述

3. VCS的具体实现

3.1 基于Bilinear pairing的VCS具体实现

  • p p V C . K e y G e n ( 1 k , q ) pp\leftarrow VC.KeyGen(1^k,q) :key generation算法, c o m m i t t e d v e c t o r committed vector 的size最大为 q q ,security parameter 为 k k 。选择具有相同order p p o l y ( k ) p\in poly(k) 的two groups G 1 \mathcal{G}_1 G 2 \mathcal{G}_2 满足bilinear map e : G 1 × G 1 G 2 e:\mathcal{G}_1\times \mathcal{G}_1\rightarrow \mathcal{G}_2 。设置 G 1 \mathcal{G}_1 的generator为 g g 。选择2个随机数 α , β Z p \alpha,\beta \leftarrow \mathbb{Z}_p ,计算public parameter为:
    p p = { g , { g α i } i [ q ] , { g β i } i [ q ] , { g α i β j } i [ 2 q 1 ] { q } , j [ q ] } pp=\{g, \{g^{\alpha^i}\}_{i\in [q]} , \{g^{\beta^i}\}_{i\in [q]}, \{g^{\alpha^i\beta^j}\}_{i\in [2q-1]\setminus \{q\},j\in [q]} \} 【长度为 2 q 2 + 1 2q^2+1 即为 Θ ( q 2 ) \Theta(q^2)
    message space为 M = Z p M=\mathbb{Z}_p

  • ( C , a u x ) V C . C o m p p ( m 1 , , m q ) (C,aux)\leftarrow VC.Com_{pp}(m_1,\cdots,m_q) :committing算法,由committer运行。输入为a sequence of q q messages m 1 , , m q M m_1,\cdots,m_q\in M 和public parameters p p pp ,计算commitment C = i = 1 q ( g α i ) m i = i = 1 q g m i α i C=\prod_{i=1}^{q}(g^{\alpha^i})^{m_i}=\prod_{i=1}^{q}g^{m_i\alpha^i} ,辅助信息 a u x = ( m 1 , , m q ) aux=(m_1,\cdots,m_q)
    a u x aux 为committer的私有信息。)

  • Λ i V C . O p e n p p ( m i , i , a u x ) \Lambda_i\leftarrow VC.Open_{pp}(m_i,i,aux) :opening算法,由committer运行。
    基本思路为通过构建2个多项式 R ( x ) \mathcal{R}(x) Q ( x , y ) \mathcal{Q}(x,y)
    R ( x ) = j = 1 q m j x j \mathcal{R}(x)=\sum_{j=1}^{q}m_j\cdot x^j
    R ( x ) x q i y i = m i x q y i + Q ( x , y ) \mathcal{R}(x)\cdot x^{q-i}y^i=m_i\cdot x^q\cdot y^i+\mathcal{Q}(x,y) 公式(1)
    对应的有:
    Q ( x , y ) = ( j = 1 , j i q m j x j ) x q i y i = j = 1 , j i q ( m j x q i + j y i ) \mathcal{Q}(x,y)=(\sum_{j=1,j\neq i}^{q}m_jx^j)\cdot x^{q-i}y^i=\sum_{j=1,j\neq i}^{q}(m_j\cdot x^{q-i+j}y^i)
    为证明 m i m_i is the i i -th committed message,committer可根据public parameters p p 计算对应的proof为 Λ i = g Q ( α , β ) \Lambda_i=g^{\mathcal{Q}(\alpha,\beta)}

  • { 0 , 1 } V C . V e r p p ( C , m i , i , Λ i ) \{0,1\}\leftarrow VC.Ver_{pp}(C,m_i,i,\Lambda_i) :verification算法,由任意client运行。输入为public parameters p p pp 、commitment值 C C 、位置 i i 、opened消息 m i m_i 以及proof Λ i \Lambda_i
    直接根据公式(1)验证:
    e ( C , g α q i β i ) = e ( g m i β i , g α q ) e ( Λ i , g ) e(C,g^{\alpha^{q-i}\beta^i})=e(g^{m_i\cdot \beta^i}, g^{\alpha^q})\cdot e(\Lambda_i,g) 公式(2)
    若公式(2)成立,则输出 1 1 ,否则输出 0 0

  • ( C , U ) V C . U p d a t e p p ( C , m , m , i ) (C',U)\leftarrow VC.Update_{pp}(C,m,m',i) :update算法,由生成 C C 的原始committer运行,用于update C C by changing the i i -th message m m to m m'
    输出的updated commitment C = C ( g α i ) m m C'=C\cdot (g^{\alpha^i})^{m'-m} ,updated information U = ( m , m , i ) U=(m,m',i)

  • ( C , Λ j ) V C . P r o o f U p d a t e p p ( C , Λ j , m , U ) (C', \Lambda_j')\leftarrow VC.ProofUpdate_{pp}(C,\Lambda_j,m',U) :proof update 算法,由任何拥有proof Λ j \Lambda_j (for some message at position j j ) client运行。输入为public parameters p p pp 、老的commitment值 C C 、proof Λ j \Lambda_j (for some message at position j j )、新的消息 m m' (at position i i )和update information U U 。输出为新的commitment C C' 和新的updated proof Λ j \Lambda_j for m j m_j ,均对应新的sequence ( m 1 , , m i 1 , m , m i + 1 , , m q ) (m_1,\cdots,m_{i-1},m',m_{i+1},\cdots,m_q) 。根据 i i j j 的关系分为如下2中情况:
    1)当 j i j\neq i 时,updated commitment C = C ( g α i ) m m C'=C\cdot (g^{\alpha^i})^{m'-m} ,updated proof为 Λ j = Λ j g ( m m ) α q j + i β j \Lambda_j'=\Lambda_j\cdot g^{(m'-m)\cdot \alpha^{q-j+i}\beta^j}
    2)当 j = i j=i 时,updated commitment C = C ( g α i ) m m C'=C\cdot (g^{\alpha^i})^{m'-m} ,updated proof仍然为 Λ j \Lambda_j 保持不变。

  • Λ s u m V C . O p e n S u m p p ( s u m , a u x ) \Lambda_{sum}\leftarrow VC.OpenSum_{pp}(sum,aux) :sum opening算法,由committer运行。输入为public parameters p p pp 、sum( ( m 1 , , m q ) (m_1,\cdots,m_q) 所有值之和)以及辅助信息 a u x aux 。输出为proof Λ s u m \Lambda_{sum} (用于证明 s u m = i = 1 q m i sum=\sum_{i=1}^{q}m_i )。
    基本思路为:
    构建多项式 R ( x ) = j = 1 q m j x j \mathcal{R}(x)=\sum_{j=1}^{q}m_jx^j ,当取 x = 1 x=1 时,有 R ( 1 ) = j = 1 q m j = s u m \mathcal{R}(1)=\sum_{j=1}^{q}m_j=sum 。同时,利用polynomial decomposition有:
    R ( x ) R ( 1 ) = ( x 1 ) Q ( x ) \mathcal{R}(x)-\mathcal{R}(1)=(x-1)\cdot \mathcal{Q}(x)
    计算OpenSum proof 为 Λ s u m = g Q ( α ) \Lambda_{sum}=g^{\mathcal{Q}(\alpha)}

  • { 0 , 1 } V C . V e r S u m p p ( C , s u m , Λ s u m ) \{0,1\}\leftarrow VC.VerSum_{pp}(C,sum,\Lambda_{sum}) :sum verification算法,可由任意client运行。输入为public parameters p p pp 、commitment值 C C 、opened和值 s u m sum 以及proof Λ s u m \Lambda_{sum}
    验证:
    e ( C / g s u m , g ) = e ( Λ s u m , g α 1 ) = e ( Λ s u m , g α / g ) e(C/g^{sum},g)=e(\Lambda_{sum},g^{\alpha-1})=e(\Lambda_{sum},g^{\alpha}/g)
    是否成立,若成立,则输出 1 1 ,否则输出 0 0

3.2 基于Bilinear pairing VCS的security analysis

分别呼应第2节中的correctness定义、position binding定义、sum binding定义和concise定义有correctness security、position binding security、sum binding security和concise security。

  • correctness security:
    由3.1节内容很容易验证correctness。

  • position binding security:
    采用归谬法来证明。
    假设adversary A \mathcal{A} 可构建算法 B \mathcal{B} ,使得2.3节中的position binding的概率不可忽略,从而使position binding security不成立。
    即存在 m i m i m_{i^*}'\neq m_{i^*} ,使得 V C . V e r p p ( C l , m i , i , Λ i ) = 1 VC.Ver_{pp}(C_l, m_{i^*}',i^*,\Lambda_{i^*}')=1 成立。
    也就是说以下两个等式同时成立:
    e ( C , g α q i β i ) = e ( g m i β i , g α q ) e ( Λ i , g ) e(C,g^{\alpha^{q-i^*}\beta^{i^*}})=e(g^{m_{i^*}'\cdot \beta^i}, g^{\alpha^q})\cdot e(\Lambda_{i^*}',g)
    e ( C , g α q i β i ) = e ( g m i β i , g α q ) e ( Λ i , g ) e(C,g^{\alpha^{q-i^*}\beta^{i^*}})=e(g^{m_{i^*}\cdot \beta^i}, g^{\alpha^q})\cdot e(\Lambda_{i^*},g)
    两个公式结合有:
    e ( g m i β i , g α q ) e ( Λ i , g ) = e ( g m i β i , g α q ) e ( Λ i , g ) e(g^{m_{i^*}'\cdot \beta^i}, g^{\alpha^q})\cdot e(\Lambda_{i^*}',g)= e(g^{m_{i^*}\cdot \beta^i}, g^{\alpha^q})\cdot e(\Lambda_{i^*},g)
    对应有:【假设 c = m i m i c= m_{i^*}'- m_{i^*}
    e ( Λ i , g ) = e ( g m i β i , g α q ) e ( Λ i , g ) / e ( g m i β i , g α q ) = e ( g ( m i m i ) α q β i , g ) e ( Λ i , g ) = e ( g ( m i m i ) α q β i Λ i , g ) = e ( g c α q β i Λ i , g ) e(\Lambda_{i^*}',g)= e(g^{m_{i^*}\cdot \beta^i}, g^{\alpha^q})\cdot e(\Lambda_{i^*},g)/ e(g^{m_{i^*}'\cdot \beta^i}, g^{\alpha^q})= e(g^{(m_{i^*}- m_{i^*}')\cdot \alpha^q\beta^i}, g)\cdot e(\Lambda_{i^*},g)= e(g^{(m_{i^*}- m_{i^*}')\cdot \alpha^q\beta^i}\cdot \Lambda_{i^*}, g)= e(g^{c\cdot \alpha^q\beta^i}\cdot \Lambda_{i^*}, g)
    也就是说,已知 g g e ( Λ i , g ) e(\Lambda_{i^*}',g) 值,adversary A \mathcal{A} 可找到相应的 Λ i \Lambda_{i^*}' 值。而这与bilinear inverse assumption冲突。
    所以在bilinear inverse assumption条件下,position binding security可保证。

  • sum binding security
    仍然采用归谬法来证明。
    假设adversary A \mathcal{A} 可构建算法 B \mathcal{B} ,使得2.4节中的sum binding的概率不可忽略,从而使sum binding security不成立。
    即存在 s u m l s u m l sum_{l}'\neq sum_l ,使得 V C . V e r S u m p p ( C l , s u m l , Λ s u m l ) = 1 VC.VerSum_{pp}(C_l,sum_l',\Lambda_{sum_l}')=1 成立。
    也就是说以下两个等式同时成立:
    e ( C l / g s u m l , g ) = e ( Λ s u m l , g α 1 ) e(C_l/g^{sum_l'},g)=e(\Lambda_{sum_l}',g^{\alpha-1})
    e ( C l / g s u m l , g ) = e ( Λ s u m l , g α 1 ) e(C_l/g^{sum_l},g)=e(\Lambda_{sum_l},g^{\alpha-1})
    两个公式结合有:【 ( Λ s u m l = g Q l ( α ) ( Λ s u m l = g Q l ( α ) \because (\Lambda_{sum_l}=g^{\mathcal{Q}_l(\alpha)},(\Lambda_{sum_l}'=g^{\mathcal{Q}_l'(\alpha)}
    e ( g Q l ( α ) , g α 1 ) e ( g s u m l , g ) = e ( g Q l ( α ) , g α 1 ) e ( g s u m l , g ) e(g^{\mathcal{Q}_l'(\alpha)},g^{\alpha-1})\cdot e(g^{sum_l'},g)= e(g^{\mathcal{Q}_l(\alpha)},g^{\alpha-1})\cdot e(g^{sum_l},g)
    对应有:
    e ( g , g ) s u m l s u m l = e ( g , g ) ( Q l ( α ) Q l ( α ) ) ( α 1 ) e(g,g)^{sum_l'-sum_l}=e(g,g)^{(\mathcal{Q}_l(\alpha)-\mathcal{Q}_l'(\alpha))\cdot (\alpha-1)}
    由于 s u m l s u m l sum_l'\neq sum_l ,于是有:
    e ( g , g ) 1 / α 1 = e ( g , g ) Q l ( α ) Q l ( α ) s u m l s u m l e(g,g)^{1/{\alpha-1}}=e(g,g)^{\frac{\mathcal{Q}_l(\alpha)-\mathcal{Q}_l'(\alpha)}{sum_l'-sum_l}}
    也就是说,已知 g , g α , , g α q G 1 g,g^{\alpha},\cdots,g^{\alpha^q}\in \mathcal{G}_1 ,adversary A \mathcal{A} 可找到 c = 1 c=-1 并计算出 e ( g , g ) 1 / ( α + c ) e(g,g)^{1/(\alpha+c)} 的值。而这与bilinear q q -strong Diffie-Hellman assumption冲突。
    所以在bilinear q q -strong Diffie-Hellman assumption条件下,sum binding security可保证。

  • concise security
    观察3.1节的具体实现VC.Com的输出 C C VC.Open的输出 Λ i \Lambda_i VC.OpenSum的输出 Λ s u m \Lambda_{sum} 均为one single element in G 1 \mathcal{G}_1
    所以满足concise定义。

4. ZKVCS

ZKVCS,即zero-knowledge vector commitments with sum binding。
ZKVCS在VCS的基础上,额外增加了zero-knowledge属性。
VCS的position binding和sum binding仅可保证针对同一commitment,不能对同一position open出2个不同的值,不能对同一vector open出2个sum值。并没有考虑到隐私的问题,即 What does the client may learn about the committed sequence from the commitments and proofs。
ZKVCS可保证a malicious client gets no information about the committed sequence beyond what is opened during the protocol execution。

受限于文章篇幅,主要针对ZKVCS的zero-knowledge属性,通过real/ideal experiment来定义。

4.1 ZKVCS的zero knowledge定义

直觉上来说,a ZKVCS scheme achieves zero-knowledge if there exists a simulator with no knowledge of the sequence or the updates that occur such that arbitrary adversarial client cannot distinguish whether he is interacting with the algorithms of the scheme or with the simulator。
zero-knowledge主要体现在open阶段,分别对应OpenOpenSum算法,对应有zero-knowledge opening和zero-knowledge sum opening。

4.1.1 Zero-knowledge opening定义

存在的参与方有:challenger C \mathcal{C} ,adversary A \mathcal{A} 和simulator S \mathcal{S}

Zero-knowledge opening定义是指:adversary A \mathcal{A} 无法区分其是在跟challenger C \mathcal{C} 进行Open交互还是在跟simulator S \mathcal{S} 进行Open交互。其中simulator S \mathcal{S} 并不知道adversary A \mathcal{A} 所选择的vector信息。
在这里插入图片描述

Real流程为:

  • challenger C \mathcal{C} 生成public parameter p p pp ,并将 p p pp 发送给adversary A \mathcal{A}
  • adversary A \mathcal{A} 选择任意的vector M 0 = ( m 1 , , m q ) M_0=(m_1,\cdots,m_q) ,并将 M 0 M_0 发送给challenger C \mathcal{C}
  • challenger C \mathcal{C} 运行 ( C 0 , a u x 0 ) V C . C o m p p ( M 0 ) (C_0,aux_0)\leftarrow VC.Com_{pp}(M_0) ,并将commitment C 0 C_0 发送给adversary A \mathcal{A}
  • 运行 l + 1 l+1 次( a = 0 ; a + + ; a < = l a=0;a++;a<=l )(其中 l = p o l y ( k ) l=poly(k) ): adversary A \mathcal{A} 选择任意的 ( i , j , m j ) , i [ q ] , j [ q ] (i,j,m_j'),i\in[q],j\in[q] 发送给 challenger C \mathcal{C} ,其中 i i 代表要open的位置, j j 表示要update的位置;challenger C \mathcal{C} Open 位置 i i proof Λ a \Lambda_a 发送给adversary A \mathcal{A} ,update位置 j j m j m_j' 将相应的 C a + 1 C_{a+1} 发送给adversary A \mathcal{A}
  • adversary A \mathcal{A} 验证 Λ a \Lambda_a 是否正确,输出bit b b
    在这里插入图片描述

Ideal流程为:

  • simulator S \mathcal{S} 生成public parameter p p pp ,并将 p p pp 发送给adversary A \mathcal{A}
  • adversary A \mathcal{A} 选择任意的vector M 0 = ( m 1 , , m q ) M_0=(m_1,\cdots,m_q) 。【注意此时 M 0 M_0 不发送给simulator S \mathcal{S}
  • simulator S \mathcal{S} (without seeing M 0 M_0 ) 运行 C 0 S 1 ( p p ) C_0\leftarrow \mathcal{S}_1(pp) ,并将 C 0 C_0 发送给adversary A \mathcal{A}
  • 运行 l + 1 l+1 次( a = 0 ; a + + ; a < = l a=0;a++;a<=l )(其中 l = p o l y ( k ) l=poly(k) ): adversary A \mathcal{A} 选择任意的 ( i , j , m j ) , i [ q ] , j [ q ] (i,j,m_j'),i\in[q],j\in[q] 发送给 simulator S \mathcal{S} ,其中 i i 代表要open的位置, j j 表示要update的位置;simulator S \mathcal{S} Open 位置 i i proof Λ a \Lambda_a 发送给adversary A \mathcal{A} ,update位置 j j m j m_j' 将相应的 C a + 1 C_{a+1} 发送给adversary A \mathcal{A}
  • adversary A \mathcal{A} 验证 Λ a \Lambda_a 是否正确,输出bit b b
    在这里插入图片描述

4.1.2 Zero-knowledge sum opening定义

存在的参与方有:challenger C \mathcal{C} ,adversary A \mathcal{A} 和simulator S \mathcal{S}

Zero-knowledge sum opening定义是指:adversary A \mathcal{A} 无法区分其是在跟challenger C \mathcal{C} 进行OpenSum交互还是在跟simulator S \mathcal{S} 进行OpenSum交互。其中simulator S \mathcal{S} 并不知道adversary A \mathcal{A} 所选择的vector信息。
在这里插入图片描述
Real流程为:

  • challenger C \mathcal{C} 生成public parameter p p pp ,并将 p p pp 发送给adversary A \mathcal{A}
  • adversary A \mathcal{A} 选择任意的vector M 0 = ( m 1 , , m q ) M_0=(m_1,\cdots,m_q) ,并将 M 0 M_0 发送给challenger C \mathcal{C}
  • challenger C \mathcal{C} 运行 ( C 0 , a u x 0 ) V C . C o m p p ( M 0 ) (C_0,aux_0)\leftarrow VC.Com_{pp}(M_0) ,并将commitment C 0 C_0 发送给adversary A \mathcal{A}
  • 运行 l + 1 l+1 次( a = 0 ; a + + ; a < = l a=0;a++;a<=l )(其中 l = p o l y ( k ) l=poly(k) ): adversary A \mathcal{A} 选择任意的 ( i , j , m j ) , i [ q ] , j [ q ] (i,j,m_j'),i\in[q],j\in[q] 发送给 challenger C \mathcal{C} ,其中 i i 代表要open的位置, j j 表示要update的位置;challenger C \mathcal{C} OpenSum 位置 i i proof Λ s u m a \Lambda_{sum_a} 发送给adversary A \mathcal{A} ,update位置 j j m j m_j' 将相应的 C a + 1 C_{a+1} 发送给adversary A \mathcal{A}
  • adversary A \mathcal{A} 验证 Λ s u m a \Lambda_{sum_a} 是否正确,输出bit b b

Ideal流程为:

  • simulator S \mathcal{S} 生成public parameter p p pp ,并将 p p pp 发送给adversary A \mathcal{A}
  • adversary A \mathcal{A} 选择任意的vector M 0 = ( m 1 , , m q ) M_0=(m_1,\cdots,m_q) 。【注意此时 M 0 M_0 不发送给simulator S \mathcal{S}
  • simulator S \mathcal{S} (without seeing M 0 M_0 ) 运行 C 0 S 1 ( p p ) C_0\leftarrow \mathcal{S}_1(pp) ,并将 C 0 C_0 发送给adversary A \mathcal{A}
  • 运行 l + 1 l+1 次( a = 0 ; a + + ; a < = l a=0;a++;a<=l )(其中 l = p o l y ( k ) l=poly(k) ): adversary A \mathcal{A} 选择任意的 ( i , j , m j ) , i [ q ] , j [ q ] (i,j,m_j'),i\in[q],j\in[q] 发送给 simulator S \mathcal{S} ,其中 i i 代表要open的位置, j j 表示要update的位置;simulator S \mathcal{S} OpenSum 位置 i i proof Λ s u m a \Lambda_{sum_a} 发送给adversary A \mathcal{A} ,update位置 j j m j m_j' 将相应的 C a + 1 C_{a+1} 发送给adversary A \mathcal{A}
  • adversary A \mathcal{A} 验证 Λ s u m a \Lambda_{sum_a} 是否正确,输出bit b b

4.2 基于bilinear map的ZKVCS具体实现

  • p p V C . K e y G e n ( 1 k , q ) pp\leftarrow VC.KeyGen(1^k,q) :key generation算法, c o m m i t t e d v e c t o r committed vector 的size最大为 q q ,security parameter 为 k k 。选择具有相同order p p o l y ( k ) p\in poly(k) 的two groups G 1 \mathcal{G}_1 G 2 \mathcal{G}_2 满足bilinear map e : G 1 × G 1 G 2 e:\mathcal{G}_1\times \mathcal{G}_1\rightarrow \mathcal{G}_2 。设置 G 1 \mathcal{G}_1 的generator为 g g 。选择2个随机数 α , β , γ Z p \alpha,\beta,\gamma \leftarrow \mathbb{Z}_p ,计算public parameter为:
    p p = { g , g γ , { g α i } i [ q ] , { g β i } i [ q ] , { g α i β j } i [ 2 q 1 ] { q } , j [ q ] , { g α i β j γ } i [ q ] , j [ q ] , i + j = q } pp=\{g,g^{\gamma}, \{g^{\alpha^i}\}_{i\in [q]} , \{g^{\beta^i}\}_{i\in [q]}, \{g^{\alpha^i\beta^j}\}_{i\in [2q-1]\setminus \{q\},j\in [q]},\{g^{\alpha^i\beta^j\gamma}\}_{i\in [q],j\in [q],i+j=q} \} 【长度为 2 q 2 + q + 2 2q^2+q+2 即为 Θ ( q 2 ) \Theta(q^2)
    message space为 M = Z p M=\mathbb{Z}_p
    【将 α , β , γ \alpha,\beta,\gamma 看成trapdoor信息的话,可具有chameleon属性。】

  • ( C , a u x ) V C . C o m p p ( m 1 , , m q ) (C,aux)\leftarrow VC.Com_{pp}(m_1,\cdots,m_q) :committing算法,由committer运行。输入为a sequence of q q messages m 1 , , m q M m_1,\cdots,m_q\in M 和public parameters p p pp
    committer选择随机数 r Z p r\leftarrow \mathbb{Z}_p ,构建多项式 R ( x , z ) = j = 1 q m j x j + r z \mathcal{R}(x,z)=\sum_{j=1}^{q}m_j\cdot x^j+r\cdot z
    计算commitment C = g R ( α , γ ) = j = 1 q ( g α j ) m j ( g γ ) r = j = 1 q g m j α j g γ r C=g^{\mathcal{R}(\alpha,\gamma)}=\prod_{j=1}^{q}(g^{\alpha^j})^{m_j}\cdot (g^{\gamma })^r=\prod_{j=1}^{q}g^{m_j\alpha^j}\cdot g^{\gamma r} ,辅助信息 a u x = ( m 1 , , m q , r ) aux=(m_1,\cdots,m_q,r)
    a u x aux 为committer的私有信息。)

  • Λ i V C . O p e n p p ( m i , i , a u x ) \Lambda_i\leftarrow VC.Open_{pp}(m_i,i,aux) :opening算法,由committer运行。
    基本思路为通过构建2个多项式 R ( x , z ) \mathcal{R}(x,z) Q ( x , y , z ) \mathcal{Q}(x,y,z)
    R ( x , z ) = j = 1 q m j x j + r z \mathcal{R}(x,z)=\sum_{j=1}^{q}m_j\cdot x^j+r\cdot z
    R ( x , z ) x q i y i = m i x q y i + Q ( x , y , z ) \mathcal{R}(x,z)\cdot x^{q-i}y^i=m_i\cdot x^q\cdot y^i+\mathcal{Q}(x,y,z) 公式(11)
    对应的有:
    Q ( x , y , z ) = ( j = 1 , j i q m j x j + r z ) x q i y i = j = 1 , j i q ( m j x q i + j y i ) + r x q i y i z \mathcal{Q}(x,y,z)=(\sum_{j=1,j\neq i}^{q}m_jx^j+r\cdot z)\cdot x^{q-i}y^i=\sum_{j=1,j\neq i}^{q}(m_j\cdot x^{q-i+j}y^i)+r\cdot x^{q-i}y^iz
    为证明 m i m_i is the i i -th committed message,committer可根据public parameters p p 计算对应的proof为 Λ i = g Q ( α , β , γ ) \Lambda_i=g^{\mathcal{Q}(\alpha,\beta,\gamma)}

  • { 0 , 1 } V C . V e r p p ( C , m i , i , Λ i ) \{0,1\}\leftarrow VC.Ver_{pp}(C,m_i,i,\Lambda_i) :verification算法,由任意client运行。输入为public parameters p p pp 、commitment值 C C 、位置 i i 、opened消息 m i m_i 以及proof Λ i \Lambda_i
    直接根据公式(11)验证:
    e ( C , g α q i β i ) = e ( g m i β i , g α q ) e ( Λ i , g ) e(C,g^{\alpha^{q-i}\beta^i})=e(g^{m_i\cdot \beta^i}, g^{\alpha^q})\cdot e(\Lambda_i,g) 公式(12)
    若公式(12)成立,则输出 1 1 ,否则输出 0 0

  • ( C , U ) V C . U p d a t e p p ( C , m , m , i ) (C',U)\leftarrow VC.Update_{pp}(C,m,m',i) :update算法,由生成 C C 的原始committer运行,用于update C C by changing the i i -th message m m to m m'
    committer选择随机数 r Z p r'\leftarrow \mathbb{Z}_p
    输出的updated commitment C = C ( g α i ) m m g r γ C'=C\cdot (g^{\alpha^i})^{m'-m}\cdot g^{r'\cdot \gamma} ,updated information U = ( m , m , i , r ) U=(m,m',i,r')

  • ( C , Λ j ) V C . P r o o f U p d a t e p p ( C , Λ j , m , U ) (C', \Lambda_j')\leftarrow VC.ProofUpdate_{pp}(C,\Lambda_j,m',U) :proof update 算法,由任何拥有proof Λ j \Lambda_j (for some message at position j j ) client运行。输入为public parameters p p pp 、老的commitment值 C C 、proof Λ j \Lambda_j (for some message at position j j )、新的消息 m m' (at position i i )和update information U U 。输出为新的commitment C C' 和新的updated proof Λ j \Lambda_j for m j m_j ,均对应新的sequence ( m 1 , , m i 1 , m , m i + 1 , , m q ) (m_1,\cdots,m_{i-1},m',m_{i+1},\cdots,m_q) 。根据 i i j j 的关系分为如下2中情况:
    1)当 j i j\neq i 时,updated commitment C = C ( g α i ) m m g r γ C'=C\cdot (g^{\alpha^i})^{m'-m}\cdot g^{r'\cdot \gamma} ,updated proof为 Λ j = Λ j g ( m m ) α q j + i β j g r α q j β j γ \Lambda_j'=\Lambda_j\cdot g^{(m'-m)\cdot \alpha^{q-j+i}\beta^j}\cdot g^{r'\cdot \alpha^{q-j}\beta^j\gamma}
    2)当 j = i j=i 时,updated commitment C = C ( g α i ) m m g r γ C'=C\cdot (g^{\alpha^i})^{m'-m}\cdot g^{r'\cdot \gamma} ,updated proof为 Λ j = Λ j g r α q j β j γ \Lambda_j'=\Lambda_j\cdot g^{r'\cdot \alpha^{q-j}\beta^j\gamma}

  • Λ s u m V C . O p e n S u m p p ( s u m , a u x ) \Lambda_{sum}\leftarrow VC.OpenSum_{pp}(sum,aux) :sum opening算法,由committer运行。输入为public parameters p p pp 、sum( ( m 1 , , m q ) (m_1,\cdots,m_q) 所有值之和)以及辅助信息 a u x aux 。输出为proof Λ s u m \Lambda_{sum} (用于证明 s u m = i = 1 q m i sum=\sum_{i=1}^{q}m_i )。
    基本思路为:
    构建多项式 R ( x , z ) = j = 1 q m j x j + r z \mathcal{R}(x,z)=\sum_{j=1}^{q}m_j\cdot x^j+r\cdot z ,当取 x = 1 , z = 0 x=1,z=0 时,有 R ( 1 , 0 ) = j = 1 q m j = s u m \mathcal{R}(1,0)=\sum_{j=1}^{q}m_j=sum 。同时,利用polynomial decomposition有:
    R ( x , z ) R ( 1 , 0 ) = ( x 1 ) Q 1 ( x , z ) + z Q 2 ( x , z ) \mathcal{R}(x,z)-\mathcal{R}(1,0)=(x-1)\cdot \mathcal{Q}_1(x,z)+z\cdot \mathcal{Q}_2(x,z)
    committer选择随机数 δ Z p \delta\leftarrow \mathbb{Z}_p ,有:
    R ( x , z ) R ( 1 , 0 ) = [ ( x 1 ) Q 1 ( x , z ) + δ ( x 1 ) z ] + [ z Q 2 ( x , z ) δ ( x 1 ) z ] = ( x 1 ) ( Q 1 ( x , z ) + δ z ) + z ( Q 2 ( x , z ) δ ( x 1 ) ) = ( x 1 ) Λ s u m 1 + z Λ s u m 2 \mathcal{R}(x,z)-\mathcal{R}(1,0)=[(x-1)\cdot \mathcal{Q}_1(x,z)+\delta\cdot (x-1)z]+[z\cdot \mathcal{Q}_2(x,z)-\delta\cdot (x-1)z]=(x-1)\cdot( \mathcal{Q}_1(x,z)+\delta z)+z\cdot (\mathcal{Q}_2(x,z)-\delta (x-1))=(x-1)\cdot\Lambda_{sum}^1+z\cdot \Lambda_{sum}^2
    计算OpenSum proof 为 Λ s u m = ( Λ s u m 1 , Λ s u m 2 ) = ( g Q 1 ( α , γ ) + δ γ , g Q 2 ( α , γ ) δ ( α 1 ) ) \Lambda_{sum}=(\Lambda_{sum}^1,\Lambda_{sum}^2)=(g^{\mathcal{Q}_1(\alpha,\gamma)+\delta\gamma},g^{\mathcal{Q}_2(\alpha,\gamma)-\delta(\alpha-1)})

  • { 0 , 1 } V C . V e r S u m p p ( C , s u m , Λ s u m ) \{0,1\}\leftarrow VC.VerSum_{pp}(C,sum,\Lambda_{sum}) :sum verification算法,可由任意client运行。输入为public parameters p p pp 、commitment值 C C 、opened和值 s u m sum 以及proof Λ s u m \Lambda_{sum}
    验证:
    e ( C / g s u m , g ) = e ( Λ s u m 1 , g α 1 ) e ( Λ s u m 2 , g γ ) e(C/g^{sum},g)=e(\Lambda_{sum}^1,g^{\alpha-1})\cdot e(\Lambda_{sum}^2,g^{\gamma})
    是否成立,若成立,则输出 1 1 ,否则输出 0 0

4.3 ZKVCS security analysis

  • position binding security
    ZKVCS的Ver与VCS的Ver所验证的公式类似,均为 e ( C , g α q i β i ) = e ( g m i β i , g α q ) e ( Λ i , g ) e(C,g^{\alpha^{q-i}\beta^i})=e(g^{m_i\cdot \beta^i}, g^{\alpha^q})\cdot e(\Lambda_i,g) 。可采用类似3.2节position binding security的方式归谬法证明。
    所以在bilinear inverse assumption条件下,ZKVCS的position binding security可保证。

  • sum binding security
    采用归谬法,证明思路如下:
    在这里插入图片描述
    在这里插入图片描述
    因此,在bilinear q q -strong Diffie-Hellman assumption条件下,ZKVCS的sum binding security可保证。

  • concise security
    ZKVCS的VC.Com的输出 C C VC.Open的输出 Λ i \Lambda_i 均为one single element in G 1 \mathcal{G}_1 。而VC.OpenSum的输出 Λ s u m \Lambda_{sum} 均为2个 elements in G 2 \mathcal{G}_2 。都与vector size q q 无关。满足concise定义要求。

  • zero-knowledge opening security
    证明如下:(根本思路是simulator S \mathcal{S} 知道trapdoor α , β , γ \alpha,\beta,\gamma 信息,可伪造 Q ( x , y , z ) = R ( x , z ) x q i y i m i x q y i Q(x,y,z)=\mathcal{R}(x,z)\cdot x^{q-i}y^i-m_i\cdot x^q\cdot y^i ,使得 R ( x , z ) x q i y i = m i x q y i + Q ( x , y , z ) \mathcal{R}(x,z)\cdot x^{q-i}y^i=m_i\cdot x^q\cdot y^i+Q(x,y,z) 恒成立。)
    在这里插入图片描述

  • zero-knowledge sum opening security
    证明如下:(根本思路是simulator S \mathcal{S} 知道trapdoor α , β , γ \alpha,\beta,\gamma 信息,可伪造 Λ s u m 1 = R ( x , z ) R ( 1 , 0 ) δ x 1 , Λ s u m 2 = δ z \Lambda_{sum}^1=\frac{\mathcal{R}(x,z)-\mathcal{R}(1,0)-\delta}{x-1}, \Lambda_{sum}^2=\frac{\delta}{z} 使得 R ( x , z ) R ( 1 , 0 ) = ( x 1 ) Λ s u m 1 + z Λ s u m 2 \mathcal{R}(x,z)-\mathcal{R}(1,0)=(x-1)\cdot\Lambda_{sum}^1+z\cdot \Lambda_{sum}^2 恒成立)
    在这里插入图片描述

猜你喜欢

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