Functional Commitment Schemes: From Polynomial Commitments to Pairing-Based Accumulators学习笔记
1. 背景知識(shí)
Beno??t Libert, Somindu C. Ramanna 和 Moti Yung 2016年論文 《Functional Commitment Schemes: From Polynomial Commitments to Pairing-Based Accumulators from Simple Assumptions》 中提出:
1)Functional Commitment (FC) primitive:用于概括所有的vector commitment、polynomial commitment和其它類型的commitment scheme。
- Committer: commit to vectors of nnn elements over domain DDD (e.g., m?=(m1,?,mn)∈Dn\vec{m}=(m_1,\cdots,m_n)\in D^nm=(m1?,?,mn?)∈Dn)
- Committer:open for a function F:Dn→RF:D^n\rightarrow RF:Dn→R (如∑i=1nmixi=y∈R\sum_{i=1}^{n}m_ix_i=y\in R∑i=1n?mi?xi?=y∈R【 其中{xi}i=1n\{x_i\}_{i=1}^n{xi?}i=1n? 為public coefficients,此時(shí)整個(gè)過(guò)程包含了vector commitment、polynomial commitment和cryptographic accumulator。】),生成a witness for the fact that F(m?)F(\vec{m})F(m) indeed evalutes to yyy。
- Functional Commitment (FC) 應(yīng)具有function binding屬性:即不可能基于同一function FFF 將一個(gè)commitment open為2個(gè)不同的evaluation y,y′y,y^{'}y,y′。
- Functional Commitment (FC) 的commitment 和 opening 應(yīng)具有constant size (i.e., independent of nnn or function description)。
- Functional Commitment (FC) 應(yīng)具有hiding屬性,被commit的messages 為 information theoretically hidden。
- 本文構(gòu)建了 Functional Commitment (FC) for a linear functions based on constant-size assumptions in composite order groups endowed with a bilinear map。
- 本文的security proof 基于:the D′ej`a Q framework of Chase and Meiklejohn (Eurocrypt 2014) and its extension by Wee (TCC 2016) to encryption primitives, thus relying on constant-size subgroup decisional assumptions.
- 本文的FC 可實(shí)現(xiàn):polynomial commitment 和 accumulator for large universe。
- 基于的assumption為:
2)vector commitment:messages are vectorsvectorsvectors and commitment is only opened with respect to specific positions。
3)polynomial commitment:commit to a polynomial and only reveal evaluations of this polynomial on certain inputs。
Functional commitment 借鑒了Functional encryption的思想。
1.1 Functional encryption
Functional encryption 由2011年Boneh等人論文《Functional Encryption: Definitions and Challenges》中提出:
Functional encryption 可 restrict what the receiver learns about encrypted data,當(dāng)使用 function FFF 的 secret key SKFSK_FSKF? 進(jìn)行解密操作時(shí),decryptor learns F(x)F(x)F(x) and nothing else。
與此類似的,Functional commitment 允許 committer accurately control what the opening phase can reveal about the committed message。
Functional commitment (FC) 的概念首次由Gorbunov等人在2015年論文《Leveled Fully Homomorphic Signatures from Standard Lattices》中含蓄提出,在該論文中描述了:a statistically-hiding commitment scheme for which the sender is able to only reveal a circuit evaluation C(x)C(x)C(x) when xxx is the committed input. 該方案基于well-studied lattice assumption,可支持任意circuit,其輸入 xxx 必須被committed to in a bit-by-bit manner (或者說(shuō)至少應(yīng)將 xxx split into small blocks)。
若借助common reference string,ordinary statistically-hiding commitment + NIZK proof 可實(shí)現(xiàn) non-interactive FC for general functionalities。
1.2 Verifiable random function
1999年,Micali,Rabin和Vadhan等人在論文《Verifiable Random Functions》 提出了Verifiable random function概念,可實(shí)現(xiàn) a perfectly binding commitment to a pseudo-random function key for which the committer can convince a verifier about the correct function evaluation for the committed key on a given input。
1.3 Selective-opening security
Bellare, Hofheinz和Yilek在2009年論文《 Possibility and Impossibility Results for Encryption and Commitment Secure under Selective Opening》,Dwork等人1999年論文《Magic Functions》中均提出了Selective-opening security問(wèn)題,即:根據(jù)已open的信息,adversary是能根據(jù)關(guān)聯(lián)性獲得un-open的信息。(the security of un-opened commitments when an adversary gets to see the opening of other commitments to possibly correlated messages.)
1.4 Zero-knowledge set
Zero-knowledge set,由Micali, Rabin和Kilian在2003年論文《Zero-Knowledge Sets》中提出:commit to a set SSS or an elementary database,然后可提供membership proof或non-membership proof of an element without revealing any further information (not even the cardinality of the committed set SSS)。
Ostrovsky, Rackoff和Smith等人在2004年論文《Efficient Consistency Proofs for Generalized Queries on a Committed Database》中將committed database 概念擴(kuò)展為了更general statement,而不僅僅是membership和non-membership proof。
2. Vector commitment
Vector commitment的概念首次由Libert和Yung在2010年論文《 Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs》中提出,由Catalano和Fiore在2013年論文《Vector Commitments and their Applications》中進(jìn)一步完善。
主要借助Pedersen-like commitment to vector (m1,?,mn)(m_1,\cdots,m_n)(m1?,?,mn?),實(shí)現(xiàn)constant-size open (所謂constant是指independent of nnn) for mim_imi? without revealing anything else。
Vector commitment的設(shè)計(jì)初衷是為了通過(guò)mercurial commitment來(lái)支持short coordinate-wise opening 從而實(shí)現(xiàn)支持short proof的zero-knowledge databse。Vector commitment也可用于verifiable database。
參見(jiàn)博客 Vector Commitments and their Applications學(xué)習(xí)筆記 和博客 Vector Commitments with Efficient Proofs學(xué)習(xí)筆記 中指出,構(gòu)建vector commitment可有以下四種方式:
- 基于accumulator或RSA構(gòu)建的vector commitment:要求所使用的group應(yīng)具有unknown order(hidden order)。
- 基于SDH assumption的vector commitment:CRS size為O(2n)O(2n)O(2n),使用了bilinear pairing。
- 基于CDH assumption的vector commitment:CRS size為O(n2)O(n^2)O(n2),使用了bilinear pairing。
- 基于DHE assumption的vector commitment:CRS size為O(2n)O(2n)O(2n),使用了bilinear pairing。
3. Polynomial commitment
Polynomial commitment 由Kate, Zaverucha和Goldberg在2010年論文《 Constant-Size Commitments to Polynomials and their Applications》中提出:生成a constant-size commitment to a polynomial P[Z]P[Z]P[Z] (constant指independent of the degree),然后存在a constant-size witness to convince a verifier that the committed P[Z]P[Z]P[Z] indeed evaluates to P(i)P(i)P(i) for a given iii。
Polynomial commitment 可用于:
- verifiable secret sharing;
- anonymous credentials with attributes;
- 不需要隱藏committed set size的zero-knowledge database;
- 利用Lagrange插值,可構(gòu)建vector commitment。
4. Accumulator
密碼學(xué)累加器也可理解為是commitment,especially when the hashing algorithm is randomized。累加器與zero-knowledge set類似,可提供inclusion證明(比zero-knowledge set更短的membership證明),但是不同的是,累加器通常無(wú)法隱藏the cardinality of the set。
參見(jiàn)博客 密碼學(xué)累加器cryptographic accumulator。
累加器的構(gòu)建方式主要分為三大類:
- strong RSA assumption in groups of unknown order:如RSA group或者class group。[6,3,36,11,34]。通常CRS size更short,且可提供non-membership proof從而擴(kuò)展為通用累加器或動(dòng)態(tài)累加器。但是需要set內(nèi)的元素為co-prime。
- bilinear maps:如[41,14]。不要求set內(nèi)元素為prime,但是CRS的size與累加的元素?cái)?shù)量一樣。可用于e-cash、authenticated data structure等場(chǎng)景,用于證明子集、交集等場(chǎng)景。
- Merkle hash trees:如[44, 11]。基于Merkle tree而不是number theoretic assumption。主要的缺點(diǎn)是使用hash tree,假設(shè)hashed set的cardinality為NNN,則proof size 為 O(log?N)O(\log N)O(logN),而基于number theoretic 的累加器,其proof size 為 O(1)O(1)O(1)。
Deler等人2015年論文《 Solving Revocation with Efficient Update of Anonymous Credentials》對(duì)the security property of accumulator進(jìn)行了re-formalize,為accumulator與其它primitive建立了關(guān)聯(lián):如,擁有indistinguishability屬性后,accumulator可用于non-interactive commitment scheme以及zero-knowledge set。
5. Functional commitment (FC)
本論文主要關(guān)注Functional commitment (FC) for linear function family {Fx?:Dn×Dn→D}x?∈Dn\{F_{\vec{x}}:D^n\times D^n\rightarrow D\}_{\vec{x}\in D^n}{Fx?:Dn×Dn→D}x∈Dn? 定義為:Fx?=<x?,m?>=∑i=1nximiF_{\vec{x}}=<\vec{x}, \vec{m}>=\sum_{i=1}^{n}x_im_iFx?=<x,m>=∑i=1n?xi?mi?,其中m?∈Dn\vec{m}\in D^nm∈Dn。【其實(shí)即為Inner product?】
基本流程為:
- 用{Fx?:Dn→D}x?∈Dn\{F_{\vec{x}}:D^n\rightarrow D\}_{\vec{x}\in D^n}{Fx?:Dn→D}x∈Dn? 來(lái)produce commitment to messages of the form m?=(m1,?,mn)∈Dn\vec{m}=(m_1,\cdots,m_n)\in D^nm=(m1?,?,mn?)∈Dn over the domain DDD。
- 對(duì)于特定的x?∈D\vec{x}\in Dx∈D,有Fx?(m?)=∑i=1nximi=y∈DF_{\vec{x}}(\vec{m})=\sum_{i=1}^{n}x_im_i=y\in DFx?(m)=∑i=1n?xi?mi?=y∈D,open for Fx?F_{\vec{x}}Fx? that Fx?(m?)F_{\vec{x}}(\vec{m})Fx?(m) indeed evaluates to yyy。
- 要求:commitment和witness均應(yīng)為簡(jiǎn)潔的,其size應(yīng)independent of the length of the messages or function description。
本文的FC scheme基于composite order bilinear group內(nèi)的subgroup decision assumption建立,具有perfect hiding和computationally binding屬性。
M. Izabachene, B. Libert, D. Vergnaud 2011年論文《Blockwise P-Signatures and Non-Interactive Anonymous Credentials with Efficient Attributes》中所構(gòu)建的vector commitment 的secure 是 under non-standard variable-size assumption。
本文借助 M. Chase, S. Meiklejohn. 2014年論文《D′ej`a Q:Using Dual Systems to Revisit q-Type Assumptions》的 Deja Q framework 來(lái)obtain security from constant size assumption。
2010年,Beno?t Libert和Moti Yung 的論文《Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs》中的思路為:【參看博客 Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs 學(xué)習(xí)筆記 第2節(jié)內(nèi)容。】
- commit to (m1,?,mq)(m_1,\cdots,m_q)(m1?,?,mq?)表示為V=gγ?∏j=1qgq+1?jmjV=g^{\gamma}\cdot\prod_{j=1}^{q}g_{q+1-j}^{m_j}V=gγ?∏j=1q?gq+1?jmj?? 【該commitment在q-DHE assumption下具有binding屬性,若q-DHE assumption不成立,則adversary可produce two distinct openings of VVV at position iii。同時(shí),也可將該commitment看成是trapdoor commitment,其trapdoor key為gq+1=gαq+1g_{q+1}=g^{\alpha^{q+1}}gq+1?=gαq+1,擁有該trapdoor key 的人可open 該commitment為任意值。】
- 為證明mim_imi?為 the iii-th committed message,Prover提供:Wi=giγ?∏j=1,j≠iqgq+1?j+imjW_i=g_i^{\gamma}\cdot \prod_{j=1,j\neq i}^{q}g_{q+1-j+i}^{m_j}Wi?=giγ??∏j=1,j?=iq?gq+1?j+imj??
- Verifier驗(yàn)證:e(gi,V)=e(g,Wi)?e(g1,gq)mie(g_i,V)=e(g,W_i)\cdot e(g_1,g_q)^{m_i}e(gi?,V)=e(g,Wi?)?e(g1?,gq?)mi?即可。
- 為實(shí)現(xiàn)mercurial commitment 具有更靈活的binding屬性,若調(diào)整Verifier的驗(yàn)證公式為e(gi,V)=e(g1,Wi)?e(g1,gq)mie(g_i,V)=e(g_1,W_i)\cdot e(g_1,g_q)^{m_i}e(gi?,V)=e(g1?,Wi?)?e(g1?,gq?)mi?則相應(yīng)的binding屬性將消失。基本思路為,Prover 的commitment不再只是VVV,而是(C,V)(C,V)(C,V),其中θ∈Zp\theta \in\mathbb{Z}_pθ∈Zp?,當(dāng)C=gθC=g^{\theta}C=gθ時(shí),為hard commitment;當(dāng)C=g1θC=g_1^{\theta}C=g1θ?時(shí),為soft commitment。Verifier驗(yàn)證的公式為:e(gi,V)=e(C,Wi)?e(g1,gq)mie(g_i,V)=e(C,W_i)\cdot e(g_1,g_q)^{m_i}e(gi?,V)=e(C,Wi?)?e(g1?,gq?)mi?
本文在Beno?t Libert和Moti Yung 2010年的論文《Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs》的基礎(chǔ)上,選擇的是composite order bilinear group G\mathbb{G}G of order N=p1p2p3N=p_1p_2p_3N=p1?p2?p3?,GqG_qGq? 代表the subgroup of G\mathbb{G}G of order qqq (qqq可表示為p1e1p2e2p3e3p_1^{e_1}p_2^{e_2}p_3^{e_3}p1e1??p2e2??p3e3??,其中e1,e2,e3∈{0,1}e_1,e_2,e_3\in\{0,1\}e1?,e2?,e3?∈{0,1})。總的思路為:
- Public key: for g,u∈Gp1g,u\in\mathbb{G}_{p_1}g,u∈Gp1??, 構(gòu)建commitment key {gαj}j=1n\{g^{\alpha^j}\}_{j=1}^n{gαj}j=1n?和{Uj=uαj}j∈[1,2n]?{n+1}\{U_j=u^{\alpha^j}\}_{j\in[1,2n]\setminus\{n+1\}}{Uj?=uαj}j∈[1,2n]?{n+1}?。Trapdoor key 為 Un+1U_{n+1}Un+1?
- 待commit messages:vector m?=m1,?,mn\vec{m}={m_1,\cdots,m_n}m=m1?,?,mn?。
- Commit算法:引入隨機(jī)值γ\gammaγ實(shí)現(xiàn)hiding屬性,C=gγ?∏j=1ngαjmjC=g^{\gamma}\cdot\prod_{j=1}^{n}g^{\alpha^jm_j}C=gγ?∏j=1n?gαjmj?
- 待證明:<x?,m?>=y<\vec{x}, \vec{m}>=y<x,m>=y 【其實(shí)即為Inner product proof?其中m?\vec{m}m為witness,x?\vec{x}x和yyy為public info??】
- Prover計(jì)算:Wi=uαn?i+1γ?∏j=1,j≠inuαn+1+j?imjW_i=u^{\alpha^{n-i+1}\gamma}\cdot \prod_{j=1,j\neq i}^{n}u^{\alpha^{n+1+j-i}m_j}Wi?=uαn?i+1γ?∏j=1,j?=in?uαn+1+j?imj?,根據(jù)收到的challenge x?=(x1,?,xn)\vec{x}=(x_1,\cdots,x_n)x=(x1?,?,xn?) 后,計(jì)算Wy=∏j=1nWixiW_y=\prod_{j=1}^{n}W_i^{x_i}Wy?=∏j=1n?Wixi??,將WyW_yWy?發(fā)送給Verifier。【建立的基本思路為:(γ+αm1+α2m2+?+αnmn)?(αnx1+αn?1x2+?+αxn)=αn+1y+F(x)(\gamma+\alpha m_1+\alpha^2 m_2+\cdots+\alpha^n m_n)\cdot (\alpha^nx_1+\alpha^{n-1}x_2+\cdots+\alpha x_n)=\alpha^{n+1}y+F(x)(γ+αm1?+α2m2?+?+αnmn?)?(αnx1?+αn?1x2?+?+αxn?)=αn+1y+F(x)】
- Verifier驗(yàn)證:e(C,∏i=1nuαn?i+1xi)=e(gα,uαn)y?e(g,Wy)e(C,\prod_{i=1}^{n}u^{\alpha^{n-i+1}x_i})=e(g^{\alpha},u^{\alpha^n})^y\cdot e(g,W_y)e(C,∏i=1n?uαn?i+1xi?)=e(gα,uαn)y?e(g,Wy?) 成立。
可以借鑒2010年,Beno?t Libert和Moti Yung 的論文《Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs》中的非對(duì)稱pairing思路,將上述uuu選取在G3\mathbb{G}_3G3? group。
Functional commitment的基本流程為:
D′ej`a Q framework [23] 可認(rèn)為是基于subgroup decision assumption的Functional commitment:
5.1 Functional commitment as Polynomial commitment
Polynomial commitment 目標(biāo):commit to polynomial P[Z]=a0+a1Z+?+an?1Zn?1P[Z]=a_0+a_1Z+\cdots+a_{n-1}Z^{n-1}P[Z]=a0?+a1?Z+?+an?1?Zn?1 of degree n?1n-1n?1 over DDD and reveal an opening for P(x)P(x)P(x) for x∈Dx\in Dx∈D。
采用Functional commitment來(lái)實(shí)現(xiàn)Polynomial commitment:先commit to 系數(shù) (a0,?,an?1)∈Dn(a_0,\cdots,a_{n-1})\in D^n(a0?,?,an?1?)∈Dn,構(gòu)建challenge x?=(1,x,?,xn?1)\vec{x}=(1,x,\cdots,x^{n-1})x=(1,x,?,xn?1) 即可。
其實(shí)將x?\vec{x}x 設(shè)置為特定位置xi=1x_i=1xi?=1,其它位置均為 000 的情況,對(duì)應(yīng)的即為open 位置 iii 的vector commitment。
5.2 Functional commitment as Accumulator for large universe
參見(jiàn)博客 Vector Commitments and their Applications學(xué)習(xí)筆記 中的“2.2 基于RSA的Vector Commitment實(shí)現(xiàn)” 可知,基于accumulator可構(gòu)建vector commitment。
Accumulator for large universe目標(biāo):對(duì)于集合 S={y1,?,yn?1}S=\{y_1,\cdots,y_{n-1}\}S={y1?,?,yn?1?},提供 membership 或 non-membership proof,證明x∈S或者x?Sx\in S 或者x\notin Sx∈S或者x∈/?S。
采用Functional commitment來(lái)實(shí)現(xiàn)Accumulator for large universe:借助5.1節(jié)的思路,構(gòu)建polynomial P[Z]=∏i=1n?1(Z?yi)=∑j=0n?2ajZj+Zn?1P[Z]=\prod_{i=1}^{n-1}(Z-y_i)=\sum_{j=0}^{n-2}a_jZ^j+Z^{n-1}P[Z]=∏i=1n?1?(Z?yi?)=∑j=0n?2?aj?Zj+Zn?1【可先commit to 系數(shù)vector (a0,a1,?,an?2,1)(a_0,a_1,\cdots,a_{n-2},1)(a0?,a1?,?,an?2?,1) 】,當(dāng)且僅當(dāng)x∈Sx\in Sx∈S時(shí),P[x]=0P[x]=0P[x]=0。
密碼學(xué)累加器基本流程為:
5.3 Functional commitment構(gòu)建支持subset query的accumulator
假設(shè)nnn為支持待累加集合的最大元素?cái)?shù),ddd為支持subset證明的subset內(nèi)的最大元素?cái)?shù)。
由博客 Concise Mercurial Vector Commitments and Independent Zero-Knowledge Sets with Short Proofs 學(xué)習(xí)筆記 第2節(jié)內(nèi)容可知,若只是vector commitment的某單一位置mim_imi?的open的話,僅需要構(gòu)建CRS public key:g1,?,gn,gn+2,?,g2ng_1,\cdots,g_n,g_{n+2},\cdots,g_{2n}g1?,?,gn?,gn+2?,?,g2n?,可表述為[1,2n][1,2n][1,2n],相應(yīng)的trapdoor key為 gn+1g_{n+1}gn+1?,即hole at position n+1n+1n+1。為證明第iii個(gè)位置為Prover計(jì)算:Wi=uαn?i+1γ?∏j=1,j≠inuαn+1+j?imjW_i=u^{\alpha^{n-i+1}\gamma}\cdot \prod_{j=1,j\neq i}^{n}u^{\alpha^{n+1+j-i}m_j}Wi?=uαn?i+1γ?∏j=1,j?=in?uαn+1+j?imj?。
為了實(shí)現(xiàn)ddd個(gè)位置元素subset的open,可擴(kuò)展為具有ddd個(gè)hole的CRS [1,(d+1)n][1,(d+1)n][1,(d+1)n],對(duì)應(yīng)的trapdoor key 位置為n+1,2n+1,?,dn+1n+1, 2n+1,\cdots, dn+1n+1,2n+1,?,dn+1。需要將ddd個(gè)元素的open proof combine為constant size,方法為,將單個(gè)位置的WiW_iWi?表示為Wl,iW_{l,i}Wl,i?——the iii-th position of the lll-th element as a “shift” of WiW_iWi? by a factor lll in the exponent:
Wl,i=uαln?i+1γ?∏j=1,j≠inuαln+1+j?imjW_{l,i}=u^{\alpha^{ln-i+1}\gamma}\cdot \prod_{j=1,j\neq i}^{n}u^{\alpha^{ln+1+j-i}m_j}Wl,i?=uαln?i+1γ?∏j=1,j?=in?uαln+1+j?imj?
支持subset query 的accumulator的基本流程為:
支持subset query 的accumulator的具體算法可為:
總結(jié)
以上是生活随笔為你收集整理的Functional Commitment Schemes: From Polynomial Commitments to Pairing-Based Accumulators学习笔记的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: CPLD和FPGA的区别
- 下一篇: Lycn 2013 with SQL A