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 CC
  • client:接收commitment CC和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:
    根據Boneh等人2001年論文《Identity-based encryption from the weil pairing
    即polynomial commitment的根本是:
    對於有nn個變量(x=(x1,,xn)\vec{x}=(x_1,\cdots,x_n))的多項式f(x)Zp[x]f(\vec{x})\in\mathbb{Z}_p[\vec{x}],對任意取值aZpn\vec{a}\in\mathbb{Z}_p^n,存在有效的算法,可找到nn個多項式Qi(x)Q_i(\vec{x}),使得f(x)f(a)=i=1n(xiai)Qi(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 qq-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)組成,各算法定義如下:

  • ppVC.KeyGen(1k,q)pp\leftarrow VC.KeyGen(1^k,q):key generation算法,輸入爲security parameter kkcommittedvectorcommitted vector的size qqq=poly(k)q=poly(k))。輸出爲public parameters pppp(which implicitly define the message space MM)。

  • (C,aux)VC.Compp(m1,,mq)(C,aux)\leftarrow VC.Com_{pp}(m_1,\cdots,m_q):committing算法,由committer運行。輸入爲a sequence of qq messages m1,,mqMm_1,\cdots,m_q\in M和public parameters pppp,輸出爲commitment值CC和auxiliary information auxaux。(auxaux爲committer的私有信息。)

  • ΛiVC.Openpp(mi,i,aux)\Lambda_i\leftarrow VC.Open_{pp}(m_i,i,aux):opening算法,由committer運行。輸入爲public parameters pppp、位置ii、消息mim_i以及輔助信息auxaux,輸出爲proof Λi\Lambda_i(用於證明mim_i is the ii-th committed message)。

  • {0,1}VC.Verpp(C,m,i,Λi)\{0,1\}\leftarrow VC.Ver_{pp}(C,m,i,\Lambda_i):verification算法,由任意client運行。輸入爲public parameters pppp、commitment值CC、位置ii、opened消息mm以及proof Λi\Lambda_i。若Λi\Lambda_i爲a valid proof that CC is a commitment to the sequence (m1,,mq)(m_1,\cdots,m_q) such that m=mim=m_i,則輸出爲11,否則輸出爲00

  • (C,U)VC.Updatepp(C,m,m,i)(C',U)\leftarrow VC.Update_{pp}(C,m,m',i):update算法,由生成CC的原始committer運行,用於update CC by changing the ii-th message mm to mm'。輸入爲public parameters pppp、commitment值CC、位置ii、老的消息mm、新消息mm',輸出爲新的commitment CC'和update information UU

  • (C,Λj)VC.ProofUpdatepp(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 jj) client運行。輸入爲public parameters pppp、老的commitment值CC、proof Λj\Lambda_j (for some message at position jj)、新的消息mm' (at position ii)和update information UU。輸出爲新的commitment CC'和新的updated proof Λj\Lambda_j for mjm_j,均對應新的sequence (m1,,mi1,m,mi+1,,mq)(m_1,\cdots,m_{i-1},m',m_{i+1},\cdots,m_q)

  • ΛsumVC.OpenSumpp(sum,aux)\Lambda_{sum}\leftarrow VC.OpenSum_{pp}(sum,aux):sum opening算法,由committer運行。輸入爲public parameters pppp、sum((m1,,mq)(m_1,\cdots,m_q)所有值之和)以及輔助信息auxaux。輸出爲proof Λsum\Lambda_{sum}(用於證明 sum=i=1qmisum=\sum_{i=1}^{q}m_i)。

  • {0,1}VC.VerSumpp(C,sum,Λsum)\{0,1\}\leftarrow VC.VerSum_{pp}(C,sum,\Lambda_{sum}):sum verification算法,可由任意client運行。輸入爲public parameters pppp、commitment值CC、opened和值sumsum以及proof Λsum\Lambda_{sum}。當Λsum\Lambda_{sum} is a valid proof that CC is a commitment to the sequence (m1,,mq)(m_1,\cdots,m_q) such that sum=i=1qmisum=\sum_{i=1}^{q}m_i時,輸出爲11,否則輸出爲00

2.2 VCS correctness定義

即只要算法是honestly executed的,a valid proof should never be rejected。
以下定義爲:對vector中的每個位置都依次進行了替換,保證最終的OpenOpenSum均可驗證通過。
在這裏插入圖片描述

2.3 VCS position binding 定義

即不允許對同一位置open出2個不同的值。
以下定義爲:

  • A0\mathcal{A}_0生成任意長度爲q=poly(k)q=poly(k)的vector。
  • 進行l+1l+1次:對vector中的任意位置jjA1\mathcal{A}_1)進行update,對任意位置iiA2\mathcal{A}_2)進行Open
  • 根據所獲取的l+1l+1(Ua,Ca,Λa)(U_a,C_a,\Lambda_a)信息,A3\mathcal{A}_3選取任意的位置ii^*
  • 根據ii^*l+1l+1(Ua,Ca,Λa)(U_a,C_a,\Lambda_a)信息,A4\mathcal{A}_4生成相應的(mi,Λi)(m_{i^*}',\Lambda_{i^*}'),使得當mimim_{i^*}'\neq m_{i^*}時對Λi)\Lambda_{i^*}')Ver通過的概率可忽略,即不大於negl(k)negl(k)
    在這裏插入圖片描述
    在這裏插入圖片描述
    注意以上新的輔助信息auxaaux_a可由updated information UaU_a和老的輔助信息auxa1aux_{a-1}生成。

2.4 VCS sum binding 定義

即不允許open a commitment to two different sums with respect to the committed sequence。
以下定義爲:

  • A0\mathcal{A}_0生成任意長度爲q=poly(k)q=poly(k)的vector。
  • 進行l+1l+1次:對vector中的任意位置jjA1\mathcal{A}_1)進行update,對該vector進行OpenSum
  • 根據所獲取的l+1l+1(Ua,Ca,Λsuma)(U_a,C_a,\Lambda_{sum_a})信息,A2\mathcal{A}_2選取其中任意一組vector,生成相應的(suml,Λsuml)(sum_{l}',\Lambda_{sum_l}'),使得當sumlsumlsum_{l}'\neq sum_l時對Λsuml)\Lambda_{sum_l}')VerSum通過的概率可忽略,即不大於negl(k)negl(k)
    在這裏插入圖片描述
    在這裏插入圖片描述

2.5 concise定義

Λi\Lambda_iΛsum\Lambda_{sum}與vector的長度qq無關。
在這裏插入圖片描述

3. VCS的具體實現

3.1 基於Bilinear pairing的VCS具體實現

  • ppVC.KeyGen(1k,q)pp\leftarrow VC.KeyGen(1^k,q):key generation算法,committedvectorcommitted vector的size最大爲 qq,security parameter 爲 kk。選擇具有相同order ppoly(k)p\in poly(k) 的two groups G1\mathcal{G}_1G2\mathcal{G}_2 滿足bilinear map e:G1×G1G2e:\mathcal{G}_1\times \mathcal{G}_1\rightarrow \mathcal{G}_2。設置G1\mathcal{G}_1的generator爲gg。選擇2個隨機數α,βZp\alpha,\beta \leftarrow \mathbb{Z}_p,計算public parameter爲:
    pp={g,{gαi}i[q],{gβi}i[q],{gαiβj}i[2q1]{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]} \} 【長度爲2q2+12q^2+1即爲Θ(q2)\Theta(q^2)
    message space爲M=ZpM=\mathbb{Z}_p

  • (C,aux)VC.Compp(m1,,mq)(C,aux)\leftarrow VC.Com_{pp}(m_1,\cdots,m_q):committing算法,由committer運行。輸入爲a sequence of qq messages m1,,mqMm_1,\cdots,m_q\in M和public parameters pppp,計算commitment C=i=1q(gαi)mi=i=1qgmiαiC=\prod_{i=1}^{q}(g^{\alpha^i})^{m_i}=\prod_{i=1}^{q}g^{m_i\alpha^i},輔助信息aux=(m1,,mq)aux=(m_1,\cdots,m_q)
    auxaux爲committer的私有信息。)

  • ΛiVC.Openpp(mi,i,aux)\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=1qmjxj\mathcal{R}(x)=\sum_{j=1}^{q}m_j\cdot x^j
    R(x)xqiyi=mixqyi+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,jiqmjxj)xqiyi=j=1,jiq(mjxqi+jyi)\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)
    爲證明mim_i is the ii-th committed message,committer可根據public parameters pp計算對應的proof爲Λi=gQ(α,β)\Lambda_i=g^{\mathcal{Q}(\alpha,\beta)}

  • {0,1}VC.Verpp(C,mi,i,Λi)\{0,1\}\leftarrow VC.Ver_{pp}(C,m_i,i,\Lambda_i):verification算法,由任意client運行。輸入爲public parameters pppp、commitment值CC、位置ii、opened消息mim_i以及proof Λi\Lambda_i
    直接根據公式(1)驗證:
    e(C,gαqiβi)=e(gmiβ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)成立,則輸出11,否則輸出00

  • (C,U)VC.Updatepp(C,m,m,i)(C',U)\leftarrow VC.Update_{pp}(C,m,m',i):update算法,由生成CC的原始committer運行,用於update CC by changing the ii-th message mm to mm'
    輸出的updated commitment C=C(gαi)mmC'=C\cdot (g^{\alpha^i})^{m'-m},updated information U=(m,m,i)U=(m,m',i)

  • (C,Λj)VC.ProofUpdatepp(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 jj) client運行。輸入爲public parameters pppp、老的commitment值CC、proof Λj\Lambda_j (for some message at position jj)、新的消息mm' (at position ii)和update information UU。輸出爲新的commitment CC'和新的updated proof Λj\Lambda_j for mjm_j,均對應新的sequence (m1,,mi1,m,mi+1,,mq)(m_1,\cdots,m_{i-1},m',m_{i+1},\cdots,m_q)。根據iijj的關係分爲如下2中情況:
    1)當jij\neq i時,updated commitment C=C(gαi)mmC'=C\cdot (g^{\alpha^i})^{m'-m},updated proof爲Λj=Λjg(mm)αqj+iβj\Lambda_j'=\Lambda_j\cdot g^{(m'-m)\cdot \alpha^{q-j+i}\beta^j}
    2)當j=ij=i時,updated commitment C=C(gαi)mmC'=C\cdot (g^{\alpha^i})^{m'-m},updated proof仍然爲Λj\Lambda_j保持不變。

  • ΛsumVC.OpenSumpp(sum,aux)\Lambda_{sum}\leftarrow VC.OpenSum_{pp}(sum,aux):sum opening算法,由committer運行。輸入爲public parameters pppp、sum((m1,,mq)(m_1,\cdots,m_q)所有值之和)以及輔助信息auxaux。輸出爲proof Λsum\Lambda_{sum}(用於證明 sum=i=1qmisum=\sum_{i=1}^{q}m_i)。
    基本思路爲:
    構建多項式R(x)=j=1qmjxj\mathcal{R}(x)=\sum_{j=1}^{q}m_jx^j,當取x=1x=1時,有R(1)=j=1qmj=sum\mathcal{R}(1)=\sum_{j=1}^{q}m_j=sum。同時,利用polynomial decomposition有:
    R(x)R(1)=(x1)Q(x)\mathcal{R}(x)-\mathcal{R}(1)=(x-1)\cdot \mathcal{Q}(x)
    計算OpenSum proof 爲 Λsum=gQ(α)\Lambda_{sum}=g^{\mathcal{Q}(\alpha)}

  • {0,1}VC.VerSumpp(C,sum,Λsum)\{0,1\}\leftarrow VC.VerSum_{pp}(C,sum,\Lambda_{sum}):sum verification算法,可由任意client運行。輸入爲public parameters pppp、commitment值CC、opened和值sumsum以及proof Λsum\Lambda_{sum}
    驗證:
    e(C/gsum,g)=e(Λsum,gα1)=e(Λsum,gα/g)e(C/g^{sum},g)=e(\Lambda_{sum},g^{\alpha-1})=e(\Lambda_{sum},g^{\alpha}/g)
    是否成立,若成立,則輸出11,否則輸出00

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不成立。
    即存在mimim_{i^*}'\neq m_{i^*},使得VC.Verpp(Cl,mi,i,Λi)=1VC.Ver_{pp}(C_l, m_{i^*}',i^*,\Lambda_{i^*}')=1成立。
    也就是說以下兩個等式同時成立:
    e(C,gαqiβi)=e(gmiβ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αqiβi)=e(gmiβ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(gmiβi,gαq)e(Λi,g)=e(gmiβ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=mimic= m_{i^*}'- m_{i^*}
    e(Λi,g)=e(gmiβi,gαq)e(Λi,g)/e(gmiβi,gαq)=e(g(mimi)αqβi,g)e(Λi,g)=e(g(mimi)αqβiΛi,g)=e(gcα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)
    也就是說,已知gge(Λ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不成立。
    即存在sumlsumlsum_{l}'\neq sum_l,使得VC.VerSumpp(Cl,suml,Λsuml)=1VC.VerSum_{pp}(C_l,sum_l',\Lambda_{sum_l}')=1成立。
    也就是說以下兩個等式同時成立:
    e(Cl/gsuml,g)=e(Λsuml,gα1)e(C_l/g^{sum_l'},g)=e(\Lambda_{sum_l}',g^{\alpha-1})
    e(Cl/gsuml,g)=e(Λsuml,gα1)e(C_l/g^{sum_l},g)=e(\Lambda_{sum_l},g^{\alpha-1})
    兩個公式結合有:【(Λsuml=gQl(α)(Λsuml=gQl(α)\because (\Lambda_{sum_l}=g^{\mathcal{Q}_l(\alpha)},(\Lambda_{sum_l}'=g^{\mathcal{Q}_l'(\alpha)}
    e(gQl(α),gα1)e(gsuml,g)=e(gQl(α),gα1)e(gsuml,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)sumlsuml=e(g,g)(Ql(α)Ql(α))(α1)e(g,g)^{sum_l'-sum_l}=e(g,g)^{(\mathcal{Q}_l(\alpha)-\mathcal{Q}_l'(\alpha))\cdot (\alpha-1)}
    由於sumlsumlsum_l'\neq sum_l,於是有:
    e(g,g)1/α1=e(g,g)Ql(α)Ql(α)sumlsumle(g,g)^{1/{\alpha-1}}=e(g,g)^{\frac{\mathcal{Q}_l(\alpha)-\mathcal{Q}_l'(\alpha)}{sum_l'-sum_l}}
    也就是說,已知g,gα,,gαqG1g,g^{\alpha},\cdots,g^{\alpha^q}\in \mathcal{G}_1,adversary A\mathcal{A}可找到c=1c=-1並計算出e(g,g)1/(α+c)e(g,g)^{1/(\alpha+c)}的值。而這與bilinear qq-strong Diffie-Hellman assumption衝突。
    所以在bilinear qq-strong Diffie-Hellman assumption條件下,sum binding security可保證。

  • concise security
    觀察3.1節的具體實現VC.Com的輸出CCVC.Open的輸出Λi\Lambda_iVC.OpenSum的輸出Λsum\Lambda_{sum}均爲one single element in G1\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 pppp,並將pppp發送給adversary A\mathcal{A}
  • adversary A\mathcal{A}選擇任意的vector M0=(m1,,mq)M_0=(m_1,\cdots,m_q),並將M0M_0 發送給challenger C\mathcal{C}
  • challenger C\mathcal{C}運行(C0,aux0)VC.Compp(M0)(C_0,aux_0)\leftarrow VC.Com_{pp}(M_0),並將commitment C0C_0發送給adversary A\mathcal{A}
  • 運行l+1l+1次(a=0;a++;a<=la=0;a++;a<=l)(其中l=poly(k)l=poly(k)): adversary A\mathcal{A}選擇任意的(i,j,mj),i[q],j[q](i,j,m_j'),i\in[q],j\in[q]發送給 challenger C\mathcal{C},其中ii代表要open的位置,jj表示要update的位置;challenger C\mathcal{C} Open 位置ii proof Λa\Lambda_a發送給adversary A\mathcal{A},update位置jjmjm_j'將相應的Ca+1C_{a+1}發送給adversary A\mathcal{A}
  • adversary A\mathcal{A} 驗證Λa\Lambda_a是否正確,輸出bit bb
    在這裏插入圖片描述

Ideal流程爲:

  • simulator S\mathcal{S}生成public parameter pppp,並將pppp發送給adversary A\mathcal{A}
  • adversary A\mathcal{A}選擇任意的vector M0=(m1,,mq)M_0=(m_1,\cdots,m_q)。【注意此時M0M_0不發送給simulator S\mathcal{S}
  • simulator S\mathcal{S} (without seeing M0M_0) 運行C0S1(pp)C_0\leftarrow \mathcal{S}_1(pp),並將C0C_0發送給adversary A\mathcal{A}
  • 運行l+1l+1次(a=0;a++;a<=la=0;a++;a<=l)(其中l=poly(k)l=poly(k)): adversary A\mathcal{A}選擇任意的(i,j,mj),i[q],j[q](i,j,m_j'),i\in[q],j\in[q]發送給 simulator S\mathcal{S},其中ii代表要open的位置,jj表示要update的位置;simulator S\mathcal{S} Open 位置ii proof Λa\Lambda_a發送給adversary A\mathcal{A},update位置jjmjm_j'將相應的Ca+1C_{a+1}發送給adversary A\mathcal{A}
  • adversary A\mathcal{A} 驗證Λa\Lambda_a是否正確,輸出bit bb
    在這裏插入圖片描述

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 pppp,並將pppp發送給adversary A\mathcal{A}
  • adversary A\mathcal{A}選擇任意的vector M0=(m1,,mq)M_0=(m_1,\cdots,m_q),並將M0M_0 發送給challenger C\mathcal{C}
  • challenger C\mathcal{C}運行(C0,aux0)VC.Compp(M0)(C_0,aux_0)\leftarrow VC.Com_{pp}(M_0),並將commitment C0C_0發送給adversary A\mathcal{A}
  • 運行l+1l+1次(a=0;a++;a<=la=0;a++;a<=l)(其中l=poly(k)l=poly(k)): adversary A\mathcal{A}選擇任意的(i,j,mj),i[q],j[q](i,j,m_j'),i\in[q],j\in[q]發送給 challenger C\mathcal{C},其中ii代表要open的位置,jj表示要update的位置;challenger C\mathcal{C} OpenSum 位置ii proof Λsuma\Lambda_{sum_a}發送給adversary A\mathcal{A},update位置jjmjm_j'將相應的Ca+1C_{a+1}發送給adversary A\mathcal{A}
  • adversary A\mathcal{A} 驗證Λsuma\Lambda_{sum_a}是否正確,輸出bit bb

Ideal流程爲:

  • simulator S\mathcal{S}生成public parameter pppp,並將pppp發送給adversary A\mathcal{A}
  • adversary A\mathcal{A}選擇任意的vector M0=(m1,,mq)M_0=(m_1,\cdots,m_q)。【注意此時M0M_0不發送給simulator S\mathcal{S}
  • simulator S\mathcal{S} (without seeing M0M_0) 運行C0S1(pp)C_0\leftarrow \mathcal{S}_1(pp),並將C0C_0發送給adversary A\mathcal{A}
  • 運行l+1l+1次(a=0;a++;a<=la=0;a++;a<=l)(其中l=poly(k)l=poly(k)): adversary A\mathcal{A}選擇任意的(i,j,mj),i[q],j[q](i,j,m_j'),i\in[q],j\in[q]發送給 simulator S\mathcal{S},其中ii代表要open的位置,jj表示要update的位置;simulator S\mathcal{S} OpenSum 位置ii proof Λsuma\Lambda_{sum_a}發送給adversary A\mathcal{A},update位置jjmjm_j'將相應的Ca+1C_{a+1}發送給adversary A\mathcal{A}
  • adversary A\mathcal{A} 驗證Λsuma\Lambda_{sum_a}是否正確,輸出bit bb

4.2 基於bilinear map的ZKVCS具體實現

  • ppVC.KeyGen(1k,q)pp\leftarrow VC.KeyGen(1^k,q):key generation算法,committedvectorcommitted vector的size最大爲 qq,security parameter 爲 kk。選擇具有相同order ppoly(k)p\in poly(k) 的two groups G1\mathcal{G}_1G2\mathcal{G}_2 滿足bilinear map e:G1×G1G2e:\mathcal{G}_1\times \mathcal{G}_1\rightarrow \mathcal{G}_2。設置G1\mathcal{G}_1的generator爲gg。選擇2個隨機數α,β,γZp\alpha,\beta,\gamma \leftarrow \mathbb{Z}_p,計算public parameter爲:
    pp={g,gγ,{gαi}i[q],{gβi}i[q],{gαiβj}i[2q1]{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} \} 【長度爲2q2+q+22q^2+q+2即爲Θ(q2)\Theta(q^2)
    message space爲M=ZpM=\mathbb{Z}_p
    【將α,β,γ\alpha,\beta,\gamma看成trapdoor信息的話,可具有chameleon屬性。】

  • (C,aux)VC.Compp(m1,,mq)(C,aux)\leftarrow VC.Com_{pp}(m_1,\cdots,m_q):committing算法,由committer運行。輸入爲a sequence of qq messages m1,,mqMm_1,\cdots,m_q\in M和public parameters pppp
    committer選擇隨機數rZpr\leftarrow \mathbb{Z}_p,構建多項式R(x,z)=j=1qmjxj+rz\mathcal{R}(x,z)=\sum_{j=1}^{q}m_j\cdot x^j+r\cdot z
    計算commitment C=gR(α,γ)=j=1q(gαj)mj(gγ)r=j=1qgmjαjgγrC=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},輔助信息aux=(m1,,mq,r)aux=(m_1,\cdots,m_q,r)
    auxaux爲committer的私有信息。)

  • ΛiVC.Openpp(mi,i,aux)\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=1qmjxj+rz\mathcal{R}(x,z)=\sum_{j=1}^{q}m_j\cdot x^j+r\cdot z
    R(x,z)xqiyi=mixqyi+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,jiqmjxj+rz)xqiyi=j=1,jiq(mjxqi+jyi)+rxqiyiz\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
    爲證明mim_i is the ii-th committed message,committer可根據public parameters pp計算對應的proof爲Λi=gQ(α,β,γ)\Lambda_i=g^{\mathcal{Q}(\alpha,\beta,\gamma)}

  • {0,1}VC.Verpp(C,mi,i,Λi)\{0,1\}\leftarrow VC.Ver_{pp}(C,m_i,i,\Lambda_i):verification算法,由任意client運行。輸入爲public parameters pppp、commitment值CC、位置ii、opened消息mim_i以及proof Λi\Lambda_i
    直接根據公式(11)驗證:
    e(C,gαqiβi)=e(gmiβ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)成立,則輸出11,否則輸出00

  • (C,U)VC.Updatepp(C,m,m,i)(C',U)\leftarrow VC.Update_{pp}(C,m,m',i):update算法,由生成CC的原始committer運行,用於update CC by changing the ii-th message mm to mm'
    committer選擇隨機數rZpr'\leftarrow \mathbb{Z}_p
    輸出的updated commitment C=C(gαi)mmgrγ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)VC.ProofUpdatepp(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 jj) client運行。輸入爲public parameters pppp、老的commitment值CC、proof Λj\Lambda_j (for some message at position jj)、新的消息mm' (at position ii)和update information UU。輸出爲新的commitment CC'和新的updated proof Λj\Lambda_j for mjm_j,均對應新的sequence (m1,,mi1,m,mi+1,,mq)(m_1,\cdots,m_{i-1},m',m_{i+1},\cdots,m_q)。根據iijj的關係分爲如下2中情況:
    1)當jij\neq i時,updated commitment C=C(gαi)mmgrγC'=C\cdot (g^{\alpha^i})^{m'-m}\cdot g^{r'\cdot \gamma},updated proof爲Λj=Λjg(mm)αqj+iβjgrαqjβ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=ij=i時,updated commitment C=C(gαi)mmgrγC'=C\cdot (g^{\alpha^i})^{m'-m}\cdot g^{r'\cdot \gamma},updated proof爲Λj=Λjgrαqjβjγ\Lambda_j'=\Lambda_j\cdot g^{r'\cdot \alpha^{q-j}\beta^j\gamma}

  • ΛsumVC.OpenSumpp(sum,aux)\Lambda_{sum}\leftarrow VC.OpenSum_{pp}(sum,aux):sum opening算法,由committer運行。輸入爲public parameters pppp、sum((m1,,mq)(m_1,\cdots,m_q)所有值之和)以及輔助信息auxaux。輸出爲proof Λsum\Lambda_{sum}(用於證明 sum=i=1qmisum=\sum_{i=1}^{q}m_i)。
    基本思路爲:
    構建多項式R(x,z)=j=1qmjxj+rz\mathcal{R}(x,z)=\sum_{j=1}^{q}m_j\cdot x^j+r\cdot z,當取x=1,z=0x=1,z=0時,有R(1,0)=j=1qmj=sum\mathcal{R}(1,0)=\sum_{j=1}^{q}m_j=sum。同時,利用polynomial decomposition有:
    R(x,z)R(1,0)=(x1)Q1(x,z)+zQ2(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選擇隨機數δZp\delta\leftarrow \mathbb{Z}_p,有:
    R(x,z)R(1,0)=[(x1)Q1(x,z)+δ(x1)z]+[zQ2(x,z)δ(x1)z]=(x1)(Q1(x,z)+δz)+z(Q2(x,z)δ(x1))=(x1)Λsum1+zΛsum2\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 爲 Λsum=(Λsum1,Λsum2)=(gQ1(α,γ)+δγ,gQ2(α,γ)δ(α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}VC.VerSumpp(C,sum,Λsum)\{0,1\}\leftarrow VC.VerSum_{pp}(C,sum,\Lambda_{sum}):sum verification算法,可由任意client運行。輸入爲public parameters pppp、commitment值CC、opened和值sumsum以及proof Λsum\Lambda_{sum}
    驗證:
    e(C/gsum,g)=e(Λsum1,gα1)e(Λsum2,gγ)e(C/g^{sum},g)=e(\Lambda_{sum}^1,g^{\alpha-1})\cdot e(\Lambda_{sum}^2,g^{\gamma})
    是否成立,若成立,則輸出11,否則輸出00

4.3 ZKVCS security analysis

  • position binding security
    ZKVCS的Ver與VCS的Ver所驗證的公式類似,均爲e(C,gαqiβi)=e(gmiβ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 qq-strong Diffie-Hellman assumption條件下,ZKVCS的sum binding security可保證。

  • concise security
    ZKVCS的VC.Com的輸出CCVC.Open的輸出Λi\Lambda_i均爲one single element in G1\mathcal{G}_1。而VC.OpenSum的輸出Λsum\Lambda_{sum}均爲2個 elements in G2\mathcal{G}_2。都與vector size qq無關。滿足concise定義要求。

  • zero-knowledge opening security
    證明如下:(根本思路是simulator S\mathcal{S}知道trapdoor α,β,γ\alpha,\beta,\gamma信息,可僞造Q(x,y,z)=R(x,z)xqiyimixqyiQ(x,y,z)=\mathcal{R}(x,z)\cdot x^{q-i}y^i-m_i\cdot x^q\cdot y^i,使得R(x,z)xqiyi=mixqyi+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信息,可僞造Λsum1=R(x,z)R(1,0)δx1,Λsum2=δ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)=(x1)Λsum1+zΛsum2\mathcal{R}(x,z)-\mathcal{R}(1,0)=(x-1)\cdot\Lambda_{sum}^1+z\cdot \Lambda_{sum}^2恆成立)
    在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章