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 ;
- client:接收commitment 和opening信息。
1.1 commitment發展史
-
1988年,Brassard等人在論文《Minimum disclosure proofs of knowledge》中首次提出了commitment的概念。
-
2004年Gennaro在論文《Multi-trapdoor commitments and their applications to proofs of knowledge secure under concurrent man-in-the-middle attacks》中,2004年MacKenzie等人在論文《On simulation-sound trapdoor commitments》中,2011年Xiaofeng Chen等人在論文《New receipt-free voting scheme using double-trapdoor commitment》中均提到了trapdoor commitment。在trapdoor commitment中,binding屬性更靈活,知道trapdoor信息的一方可open the commitment in any possible way,而對於不知道trapdoor信息的一方,仍然具有binding屬性。
-
2005年Chase等人在論文《Mercurial commitments with applications to zero-knowledge sets》中,2008年Catalano等人在論文《Zero-knowledge sets with short proofs》中,2010年Benoît Libert和Moti Yung 在論文《Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs》中均提到了mercurial commitment。mercurial commitment與trapdoor類似,但是mercurial commitment支持2中open算法:hard open和soft open。在committing階段,committer可選擇是創建hard commitment還是soft commitment。hard commitment支持hard open和soft open,但是open的值只能是當初commit to的值。而soft commitment僅僅支持soft open,soft commitment可open爲任意值。mercurial commitment要求沒有任何adversary可以區分hard commitment還是soft commitment。(具體可參見博客 Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs 學習筆記)
-
2013年, Dario Catalano 和 Dario Fiore 在論文《Vector Commitments and their Applications》中首次提出了vector commitment (VC) 的概念,允許對an ordered sequence of values 進行commit,同時額外滿足position binding屬性——即對同一個位置 ,無法open出2個不同的值。(詳情參見博客 Vector Commitments and their Applications學習筆記)
VC的position binding屬性可用於check the integrity of outsourced data with fix size。即VC對應的是固定長度的vector。而對於unbounded data呢? -
2016年,Krupp等人在論文《 Nearly optimal verifiable data streaming》中,將VC擴展爲chameleon VC (CVC),額外增加了chameleon屬性——即擁有trapdoor信息的一方可在不改變commitment值的前提下替換各個位置的message值,即可open爲任意值。CVC可用於支持unbounded data in verifiable data streaming setting。
但是,以上方法存在以下缺陷:
- 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的根本是:
對於有個變量()的多項式,對任意取值,存在有效的算法,可找到個多項式,使得成立。
-
相關符號定義:
1.3 安全假設
- Bilinear inverse assumption:
- Bilinear -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
)組成,各算法定義如下:
-
:key generation算法,輸入爲security parameter 和的size ()。輸出爲public parameters (which implicitly define the message space )。
-
:committing算法,由committer運行。輸入爲a sequence of messages 和public parameters ,輸出爲commitment值和auxiliary information 。(爲committer的私有信息。)
-
:opening算法,由committer運行。輸入爲public parameters 、位置、消息以及輔助信息,輸出爲proof (用於證明 is the -th committed message)。
-
:verification算法,由任意client運行。輸入爲public parameters 、commitment值、位置、opened消息以及proof 。若爲a valid proof that is a commitment to the sequence such that ,則輸出爲,否則輸出爲。
-
:update算法,由生成的原始committer運行,用於update by changing the -th message to 。輸入爲public parameters 、commitment值、位置、老的消息、新消息,輸出爲新的commitment 和update information 。
-
:proof update 算法,由任何擁有proof (for some message at position ) client運行。輸入爲public parameters 、老的commitment值、proof (for some message at position )、新的消息 (at position )和update information 。輸出爲新的commitment 和新的updated proof for ,均對應新的sequence 。
-
:sum opening算法,由committer運行。輸入爲public parameters 、sum(所有值之和)以及輔助信息。輸出爲proof (用於證明 )。
-
:sum verification算法,可由任意client運行。輸入爲public parameters 、commitment值、opened和值以及proof 。當 is a valid proof that is a commitment to the sequence such that 時,輸出爲,否則輸出爲。
2.2 VCS correctness定義
即只要算法是honestly executed的,a valid proof should never be rejected。
以下定義爲:對vector中的每個位置都依次進行了替換,保證最終的Open
和OpenSum
均可驗證通過。
2.3 VCS position binding 定義
即不允許對同一位置open出2個不同的值。
以下定義爲:
- 生成任意長度爲的vector。
- 進行次:對vector中的任意位置()進行update,對任意位置()進行
Open
; - 根據所獲取的組 信息,選取任意的位置。
- 根據和組 信息,生成相應的,使得當時對可
Ver
通過的概率可忽略,即不大於。
注意以上新的輔助信息可由updated information 和老的輔助信息生成。
2.4 VCS sum binding 定義
即不允許open a commitment to two different sums with respect to the committed sequence。
以下定義爲:
- 生成任意長度爲的vector。
- 進行次:對vector中的任意位置()進行update,對該vector進行
OpenSum
; - 根據所獲取的組 信息,選取其中任意一組vector,生成相應的,使得當時對可
VerSum
通過的概率可忽略,即不大於。
2.5 concise定義
即和與vector的長度無關。
3. VCS的具體實現
3.1 基於Bilinear pairing的VCS具體實現
-
:key generation算法,的size最大爲 ,security parameter 爲 。選擇具有相同order 的two groups 和 滿足bilinear map 。設置的generator爲。選擇2個隨機數,計算public parameter爲:
【長度爲即爲】
message space爲。 -
:committing算法,由committer運行。輸入爲a sequence of messages 和public parameters ,計算commitment ,輔助信息。
(爲committer的私有信息。) -
:opening算法,由committer運行。
基本思路爲通過構建2個多項式和:
公式(1)
對應的有:
爲證明 is the -th committed message,committer可根據public parameters 計算對應的proof爲。 -
:verification算法,由任意client運行。輸入爲public parameters 、commitment值、位置、opened消息以及proof 。
直接根據公式(1)驗證:
公式(2)
若公式(2)成立,則輸出,否則輸出。 -
:update算法,由生成的原始committer運行,用於update by changing the -th message to 。
輸出的updated commitment ,updated information 。 -
:proof update 算法,由任何擁有proof (for some message at position ) client運行。輸入爲public parameters 、老的commitment值、proof (for some message at position )、新的消息 (at position )和update information 。輸出爲新的commitment 和新的updated proof for ,均對應新的sequence 。根據與的關係分爲如下2中情況:
1)當時,updated commitment ,updated proof爲。
2)當時,updated commitment ,updated proof仍然爲保持不變。 -
:sum opening算法,由committer運行。輸入爲public parameters 、sum(所有值之和)以及輔助信息。輸出爲proof (用於證明 )。
基本思路爲:
構建多項式,當取時,有。同時,利用polynomial decomposition有:
計算OpenSum
proof 爲 。 -
:sum verification算法,可由任意client運行。輸入爲public parameters 、commitment值、opened和值以及proof 。
驗證:
是否成立,若成立,則輸出,否則輸出。
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 可構建算法,使得2.3節中的position binding的概率不可忽略,從而使position binding security不成立。
即存在,使得成立。
也就是說以下兩個等式同時成立:
兩個公式結合有:
對應有:【假設】
也就是說,已知和值,adversary 可找到相應的值。而這與bilinear inverse assumption衝突。
所以在bilinear inverse assumption條件下,position binding security可保證。 -
sum binding security
仍然採用歸謬法來證明。
假設adversary 可構建算法,使得2.4節中的sum binding的概率不可忽略,從而使sum binding security不成立。
即存在,使得成立。
也就是說以下兩個等式同時成立:
兩個公式結合有:【】
對應有:
由於,於是有:
也就是說,已知,adversary 可找到並計算出的值。而這與bilinear -strong Diffie-Hellman assumption衝突。
所以在bilinear -strong Diffie-Hellman assumption條件下,sum binding security可保證。 -
concise security
觀察3.1節的具體實現VC.Com
的輸出、VC.Open
的輸出和VC.OpenSum
的輸出均爲one single element in 。
所以滿足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階段,分別對應Open
和OpenSum
算法,對應有zero-knowledge opening和zero-knowledge sum opening。
4.1.1 Zero-knowledge opening定義
存在的參與方有:challenger ,adversary 和simulator 。
Zero-knowledge opening定義是指:adversary 無法區分其是在跟challenger 進行Open
交互還是在跟simulator 進行Open
交互。其中simulator 並不知道adversary 所選擇的vector信息。
Real流程爲:
- challenger 生成public parameter ,並將發送給adversary 。
- adversary 選擇任意的vector ,並將 發送給challenger 。
- challenger 運行,並將commitment 發送給adversary 。
- 運行次()(其中): adversary 選擇任意的發送給 challenger ,其中代表要open的位置,表示要update的位置;challenger
Open
位置 proof 發送給adversary ,update位置爲將相應的發送給adversary 。 - adversary 驗證是否正確,輸出bit 。
Ideal流程爲:
- simulator 生成public parameter ,並將發送給adversary 。
- adversary 選擇任意的vector 。【注意此時不發送給simulator 】
- simulator (without seeing ) 運行,並將發送給adversary 。
- 運行次()(其中): adversary 選擇任意的發送給 simulator ,其中代表要open的位置,表示要update的位置;simulator
Open
位置 proof 發送給adversary ,update位置爲將相應的發送給adversary 。 - adversary 驗證是否正確,輸出bit 。
4.1.2 Zero-knowledge sum opening定義
存在的參與方有:challenger ,adversary 和simulator 。
Zero-knowledge sum opening定義是指:adversary 無法區分其是在跟challenger 進行OpenSum
交互還是在跟simulator 進行OpenSum
交互。其中simulator 並不知道adversary 所選擇的vector信息。
Real流程爲:
- challenger 生成public parameter ,並將發送給adversary 。
- adversary 選擇任意的vector ,並將 發送給challenger 。
- challenger 運行,並將commitment 發送給adversary 。
- 運行次()(其中): adversary 選擇任意的發送給 challenger ,其中代表要open的位置,表示要update的位置;challenger
OpenSum
位置 proof 發送給adversary ,update位置爲將相應的發送給adversary 。 - adversary 驗證是否正確,輸出bit 。
Ideal流程爲:
- simulator 生成public parameter ,並將發送給adversary 。
- adversary 選擇任意的vector 。【注意此時不發送給simulator 】
- simulator (without seeing ) 運行,並將發送給adversary 。
- 運行次()(其中): adversary 選擇任意的發送給 simulator ,其中代表要open的位置,表示要update的位置;simulator
OpenSum
位置 proof 發送給adversary ,update位置爲將相應的發送給adversary 。 - adversary 驗證是否正確,輸出bit 。
4.2 基於bilinear map的ZKVCS具體實現
-
:key generation算法,的size最大爲 ,security parameter 爲 。選擇具有相同order 的two groups 和 滿足bilinear map 。設置的generator爲。選擇2個隨機數,計算public parameter爲:
【長度爲即爲】
message space爲。
【將看成trapdoor信息的話,可具有chameleon屬性。】 -
:committing算法,由committer運行。輸入爲a sequence of messages 和public parameters 。
committer選擇隨機數,構建多項式
計算commitment ,輔助信息。
(爲committer的私有信息。) -
:opening算法,由committer運行。
基本思路爲通過構建2個多項式和:
公式(11)
對應的有:
爲證明 is the -th committed message,committer可根據public parameters 計算對應的proof爲。 -
:verification算法,由任意client運行。輸入爲public parameters 、commitment值、位置、opened消息以及proof 。
直接根據公式(11)驗證:
公式(12)
若公式(12)成立,則輸出,否則輸出。 -
:update算法,由生成的原始committer運行,用於update by changing the -th message to 。
committer選擇隨機數,
輸出的updated commitment ,updated information 。 -
:proof update 算法,由任何擁有proof (for some message at position ) client運行。輸入爲public parameters 、老的commitment值、proof (for some message at position )、新的消息 (at position )和update information 。輸出爲新的commitment 和新的updated proof for ,均對應新的sequence 。根據與的關係分爲如下2中情況:
1)當時,updated commitment ,updated proof爲。
2)當時,updated commitment ,updated proof爲。 -
:sum opening算法,由committer運行。輸入爲public parameters 、sum(所有值之和)以及輔助信息。輸出爲proof (用於證明 )。
基本思路爲:
構建多項式,當取時,有。同時,利用polynomial decomposition有:
committer選擇隨機數,有:
計算OpenSum
proof 爲 。 -
:sum verification算法,可由任意client運行。輸入爲public parameters 、commitment值、opened和值以及proof 。
驗證:
是否成立,若成立,則輸出,否則輸出。
4.3 ZKVCS security analysis
-
position binding security
ZKVCS的Ver
與VCS的Ver
所驗證的公式類似,均爲 。可採用類似3.2節position binding security的方式歸謬法證明。
所以在bilinear inverse assumption條件下,ZKVCS的position binding security可保證。 -
sum binding security
採用歸謬法,證明思路如下:
因此,在bilinear -strong Diffie-Hellman assumption條件下,ZKVCS的sum binding security可保證。 -
concise security
ZKVCS的VC.Com
的輸出、VC.Open
的輸出均爲one single element in 。而VC.OpenSum
的輸出均爲2個 elements in 。都與vector size 無關。滿足concise定義要求。 -
zero-knowledge opening security
證明如下:(根本思路是simulator 知道trapdoor 信息,可僞造,使得恆成立。)
-
zero-knowledge sum opening security
證明如下:(根本思路是simulator 知道trapdoor 信息,可僞造 使得恆成立)