RingCT 3.0 for Blockchain Confidential Transaction: Shorter Size and Stronger Security 学习笔记

1. 引言

Tsz Hon Yuen 等人2020年论文《RingCT 3.0 for Blockchain Confidential Transaction: Shorter Size and Stronger Security》,发表于Financial Cryptography and Data Security。

本文:

  • 构建了ring confidential transation protocol (RingCT3.0) ,用于隐私保护交易中发送者的身份、接收者的身份以及具体的交易金额。
    以经典的2-input transaction with a ring size of 1024为例,相比于Monero中的RingCT1.0 protocol,RingCT3.0 protocol的ring signature size要减少98%。因此在加密货币中,可大幅节约交易费用。
  • 更强的安全model,不再需要trusted setup assumption。本文构建的scheme is anonymous against non-signing users who are included in the ring,而RingCT1.0 在该场景下是不安全的。

Monero, Dash和Zcash是目前主流的三大隐私保护加密货币,总共约15亿美金的市值。截止2019年12月,其排名分别为:16、26、32。但是它们所采用的隐私保护技术各有不同:

  • Monero [13] 采用 linkable ring signatures, Pedersen commitment和Diffie-Hellman key agreement;
  • Dash使用的是 coin shuffling;
  • Zcash [1] 采用的是general zero-knowledge proof (zk-SNARK)。

以上这些隐私保护技术存在两个主要缺陷:

  • inefficient signature generation/verification、
  • 或者 large signature size。

而zkSNARK用于public blockchain 时,会直接related to the transaction fee。

transaction fee由transaction data size决定,不同的加密货币有不同的fee rate,即,the price per kB of transaction data:

  • 2017年11月至2018年2月期间,Bitcoin的fee rate为 0.008 BTC/kB (在当时超过了 100美金/kB ),之后相对稳定在 0.0002 BTC/kB(约 1.6美金/kB)。
  • Monero的fee rate约为 0.0008 XMR/kB (约 0.2美金/kB)。

transaction fee 由 transaction data length决定,而transaction data length主要由 the signature length of the senders决定:

  • Bitcoin 中,以典型的 2-input-2-output 交易为例,其包含了2个ECDSA签名,长度为1kB。2019年12月,Bitcoin的平均交易费用在0.25美金,整个Bitcoin系统的月交易费用约250万美金。

因此,任何减少signature size的努力都是有意义的,对于public blockchain来说,对signature size的改进 比 对计算效率的改进 更有意义。

1.1 区块链中的ring signature

Ring signature [15] 的作用是:
允许a user to dynamically choose a set of public keys (including his own) and to sign messages on behalf of the set, without revealing his identity。

在anonymous e-cash 或 cryptocurrency 系统中,linkable-anonymity is more suitable than perfect anonymity,原因在于linkable-anonymity可发现双花问题。

linkable ring signature [9] 是指:
given any two signatures, the verifier knows whether they are generated by the same signer (even though the verifier still does not know who the actual signer is)。

  • [10] 中提出了第一代 blockchain Confidential Transaction (CT),目的是在Bitcoin中hiding payment values。
  • [13] 在Monero中,将linakble ring signature和CT结合,实现了Ring Confidential Transaction (RingCT) protocol。对于 M M M transaction inputs,对应有 M M M ring signatures of ring size O ( n ) O(n) O(n) each,其中 n n n为the number of possible signer。此外,对于 the net transaction amount (which should be equal to a commitment of zero) 也仍然对应需要a ring signature of ring size O ( n ) O(n) O(n)。因此,Monero的RingCT1.0 的每笔交易有 ( M + 1 ) (M+1) (M+1) signatures of size O ( n ) O(n) O(n) each。为了减少整个signature size,一个策略是减少 the number n n n of possible signers,也基于此,Monero官方钱包中的 n n n值范围仅为 5   20 5~20 5 20。因此,可以说the sender anonymity for RingCT1.0最多为 1-out-of-20。 n n n值小,则ring size也小,因此在Monero中存在针对small ring size的攻击,会影响Monero的anonymity,详见 [7,17,12]。
    – 在RingCT1.0 论文[13]中没有给出任何notion and security model of RingCT;
    – 在RingCT 2.0 论文[16] 中的 protocol需使用trusted public parameters,具有 ( M + 1 ) (M+1) (M+1) signatures of size O ( 1 ) O(1) O(1)。但是在公有链中使用trusted public parameters并不实用。

1.2 本文主要贡献

本文构建了一个cost-efficient blockchain RingCT protocol by using an efficient ring signature scheme without trusted setup, and prove the security in a stronger security model。
本文主要贡献有:

  • 构建了an efficient ring signature scheme to construct RingCT3.0 protocol with the shortest RingCT transcript size, without using trusted setup。如下图所示,本文的RingCT3.0具有的ring signature size为 O ( M + log ⁡ n ) O(M+\log n) O(M+logn),而RingCT1.0的ring signature size为 O ( M n ) O(Mn) O(Mn)。从而可支持选择更大的ring size,以增加anonymity attack based on blockchain data analysis的难度。
    在这里插入图片描述

  • 本文的RingCT 3.0实现了strong security model for anonymity by considering insider attack,而RingCT 1.0无法抵抗这种insder attack。

  • 实现的ring signature scheme为当前最短的ring signature without trusted setup。参见下图。基本思想在于:构建an efficient set membership proof of n n n public keys in the base group,instead of in the exponent。
    在这里插入图片描述
    [2] Bootle等人2015年论文《Short accountable ring signatures based on DDH
    [6] Groth等人2015年论文《 One-out-of-many proofs: Or how to leak a secret and spend a coin

2. 背景知识

2.1 系统模型

公有链为:a distributed system where users can join the system freely at anytime。

公有链的用户角色有:

  • Sender/Recipient:sender acts as the signer of a signature scheme to confirm that he wants to spend some money to the recipient in a transaction。
  • Miner:miner acts as the verifier of the signature scheme and checks if the signature (and the transaction) is valid。若为真,则all miners run the consensus protocol of the blockchain to agree on the order of all transactions。

对于公有链,希望系统参数是agreed by all users的且不需要由trusted party生成,如可使用common hash function和elliptic curve等。

很多区块链系统采用的数据模型为UTXO(Unspent Transaction Outputs)模式,即:
If a user wants to spend his digital assets in a transaction, he has to refer to the specific assets that he wants to spend。
If he spends the same asset twice,the verifier will notice it and will reject the transaction。

2.2 基本定义

  • vector相关表示:
    在这里插入图片描述
  • Discrete Logarithm (DL) 安全假设:
    即已知 g g g g a g^a ga,求解出 a a a的概率可忽略。
    在这里插入图片描述
  • q q q-Decisional Diffie-Hellman Inversion (DDHI) 安全假设:
    即已知 ( g , g a , ⋯   , g a q , T ) (g,g^a,\cdots,g^{a^q},T) (g,ga,,gaq,T),无法判断 T = g 1 / a T=g^{1/a} T=g1/a是否成立。

3. RingCT3.0 概览

3.1 efficient RingCT3.0 protocol

本文设计了一种ring signature scheme来构建efficient RingCT without using trusted setup。整个构建过程需要以下primitives和techniques:

  • Set membership proof without trusted setup
  • Linkable Ring Signatures for RingCT3.0
  • Compressing Multiple Inputs for RingCT3.0

3.1.1 Set Membership Proof without trusted setup

Set Membership Proof针对的场景为:
有a set of public keys Y ⃗ = ( Y 1 , ⋯   , Y n ) \vec{Y}=(Y_1,\cdots,Y_n) Y =(Y1,,Yn),和a binary vector b ⃗ L = ( b 1 , ⋯   , b n ) \vec{b}_L=(b_1,\cdots,b_n) b L=(b1,,bn)
Y ⃗ b ⃗ L = ∏ i = 1 n Y i b i \vec{Y}^{\vec{b}_L}=\prod_{i=1}^{n}Y_i^{b_i} Y b L=i=1nYibi
对于a public key Y i ∈ Y ⃗ Y_i\in \vec{Y} YiY ,令 C = h β Y i C=h^{\beta}Y_i C=hβYi ,当 b ⃗ L \vec{b}_L b L仅在位置 i i i的bit为 1 1 1,其它位置均为 0 0 0时,有:
C = h β Y i = h β Y ⃗ b ⃗ L C=h^{\beta}Y_i=h^{\beta}\vec{Y}^{\vec{b}_L} C=hβYi=hβY b L
定义 b ⃗ R = b ⃗ L − 1 ⃗ n \vec{b}_R=\vec{b}_L-\vec{1}^n b R=b L1 n,其中 1 ⃗ n = ( 1 , ⋯   , 1 ) \vec{1}^n=(1,\cdots,1) 1 n=(1,,1) of length n n n
为了证明 “ b ⃗ L \vec{b}_L b L仅在位置 i i i的bit为 1 1 1,其它位置均为 0 0 0” ,还需补充以下约束:
b ⃗ L ∘ b ⃗ R = 0 ⃗ n , b ⃗ L − b ⃗ R = 1 ⃗ n , < b ⃗ L , 1 ⃗ n > = 1 \vec{b}_L \circ \vec{b}_R=\vec{0}^n, \vec{b}_L-\vec{b}_R=\vec{1}^n, <\vec{b}_L,\vec{1}^n>=1 b Lb R=0 n,b Lb R=1 n,<b L,1 n>=1
借助Bu¨nz 等人2018年论文《Bulletproofs: Short proofs for confidential transactions and more》中的inner product argument,可将proof size reduce为 log ⁡ n \log n logn
本文做了小调整来ensure the security of the Pedersen commitment C C C on the public key Y Y Y——设置了 h = H a s h ( Y ⃗ ) h=Hash(\vec{Y}) h=Hash(Y ),使得public key Y ⃗ \vec{Y} Y h h h 之间的discrete logarithm (DL) 关系不可知。

[21] Groth和Kohlweiss 2015年论文《One-out-of-Many Proofs: Or How to Leak a Secret and Spend a Coin
[7] Bootle等人2015年论文《Short Accountable Ring Signatures Based on DDH
[8] Bootle和Groth 2018年论文《Efficient Batch Zero-Knowledge Arguments for Low Degree Polynomials

本文的set membership proof实现与现有的方法均不同。[21,7,8] 中的方案是证明that for a set of commitments, one of them is committed to g 0 g^0 g0【即所谓的one out of N N N commitments containing 0】:
[21,7,8] 中使用 n n n polynomials of degree log ⁡ n \log n logn 来hide the prover index,然后ran a zero-knowledge proof for the polynomials。

而本文的方案是:
使用zero-knowledge proof来证明 b ⃗ L \vec{b}_L b L为a binary vector with Hamming weight 1 1 1,并使用Bulletproofs论文中的inner product argument来reduce the proof size to log ⁡ n \log n logn

Camenisch等人2008年论文《Efficient protocols for set membership and range proofs》中set membership proof的定义为:
Given a set Φ = { ϕ 1 , ϕ 2 , ⋯   , ϕ n } \Phi=\{\phi_1,\phi_2,\cdots,\phi_n\} Φ={ϕ1,ϕ2,,ϕn} and a commitment C C C,相应的set membership proof可描述为 “ C C C is a commitment to the element ϕ 1 \phi_1 ϕ1 OR it is a commitment to ϕ 2 \phi_2 ϕ2 OR it is a commitment to ϕ 3 \phi_3 ϕ3 ⋯ \cdots OR it is a commitment to ϕ n \phi_n ϕn”。
在这里插入图片描述
现有的具有zero-knowledge 的累加器都可看成是 set membership proof 的特例,如 [16,2] Derler 等人2015年论文《Revisiting cryptographic accumulators, additional properties and relations to other primitives》和 Baldimtsi等人2017年论文 《Accumulators with applications to anonymity-preserving revocation》中所总结的,累加器主要分为:

  • 基于RSA构建的累加器[13,24,2],需要trusted setup。
  • 基于pairing构建的累加器[31,15,1,12,16],需要trusted setup,仅能accumulate values in the exponent,意味着若想accumulate public keys,最终必须prove the knowledge of a secret key as a proof of double discrete logarithm, which is inefficient。
  • 基于Merkle-tree构建的累加器[6],需要trusted setup,且需要trusted setup for generating composite order group。基于Merkle-tree构建的累加器[10]可与zk-SNARK[33] 结合,实现zero-knowledge。而zk-SNARK[33] 也需要trusted setup。最近的zk-STARK [4] 移除了trusted setup,但是zk-STARK的proof size为zk-SNARK 的1000倍,并不实用。
  • 基于lattice构建的累加器[25],无需trusted setup,其声称的proof size为 O ( log ⁡ ( n ) ) O(\log (n)) O(log(n)),但实际size > 30 M B >30MB >30MB,并不实用。

本文针对的是set membership proof for group elements which is the domain of public keys,这是第一个set membership proof for public keys in the base group,而不是in the exponent。详细的构建思路为:

  • Setup:输入为security parameter 1 λ 1^{\lambda} 1λ 和 the set of membership public key的最大数量 N N N,选择a group G \mathbb{G} G of prime order p p p,以及some generators g ∈ G , h ⃗ = ( h 1 , ⋯   , h N ) ∈ G N g\in\mathbb{G},\vec{h}=(h_1,\cdots,h_N)\in\mathbb{G}^N gGh =(h1,,hN)GN。有collision resistant hash函数 H j : { 0 , 1 } ∗ → Z p H_j:\{0,1\}^*\rightarrow \mathbb{Z}_p Hj:{0,1}Zp for j = 1 , 2 , 3 , 4 j=1,2,3,4 j=1,2,3,4 H 6 : { 0 , 1 } ∗ → G H_6: \{0,1\}^*\rightarrow \mathbb{G} H6:{0,1}G。设 C = ( G e n , C o m , O p e n ) C=(Gen,Com,Open) C=(Gen,Com,Open) 为Pedersen commitment scheme。假设这些参数对系统所有参与方均为公开知悉的。

  • PKGen:随机选择 x ∈ Z p x\in\mathbb{Z}_p xZp,输出a public key Y = g x Y=g^x Y=gx

  • Prove:输入为 the set of n ≤ N n\leq N nN public keys as Y ⃗ = ( Y 1 , Y 2 , ⋯   , Y n ) \vec{Y}=(Y_1,Y_2,\cdots,Y_n) Y =(Y1,Y2,,Yn),以及 denote the set member σ = Y i ∗ ∈ Y ⃗ \sigma=Y_{i^*}\in \vec{Y} σ=YiY ,with corresponding secret key x s k , i ∗ x_{sk,i^*} xsk,i。Prover将做以下操作:
    1、 P r e p a r e   I n d e x Prepare\ Index Prepare Index:Prover生成binary vector b ⃗ L = ( b 1 , ⋯   , b n ) \vec{b}_L=(b_1,\cdots,b_n) b L=(b1,,bn),其中 b i = 1 b_i=1 bi=1 when i = i ∗ i=i^* i=i and b i = 0 b_i=0 bi=0 otherwise。定义 b ⃗ R = b ⃗ L − 1 ⃗ n \vec{b}_R=\vec{b}_L-\vec{1}^n b R=b L1 n。需prove in zero knowledge that b ⃗ L \vec{b}_L b L is a binary vector with only one bit equal to 1。等价为证明:
    b ⃗ L ∘ b ⃗ R = 0 ⃗ n , b ⃗ L − b ⃗ R = 1 ⃗ n , < b ⃗ L , 1 ⃗ n > = 1 \vec{b}_L\circ \vec{b}_R=\vec{0}^n, \vec{b}_L-\vec{b}_R=\vec{1}^n, <\vec{b}_L, \vec{1}^n>=1 b Lb R=0 n,b Lb R=1 n,<b L,1 n>=1
    2、 C o m m i t   1 Commit\ 1 Commit 1:计算 h = H 6 ( Y ⃗ ) h=H_6(\vec{Y}) h=H6(Y ),选择随机值 α , β , ρ , r α , r s k ∈ Z p , s ⃗ L , s ⃗ R ∈ Z p n \alpha,\beta,\rho,r_{\alpha},r_{sk}\in\mathbb{Z}_p, \vec{s}_L,\vec{s}_R\in\mathbb{Z}_p^n α,β,ρ,rα,rskZp,s L,s RZpn,计算:
    A 1 = h α Y ⃗ b ⃗ L = h α Y i ∗ , A 2 = h β h ⃗ b ⃗ R , S 1 = h r α g r s k , S 2 = h ρ Y ⃗ s ⃗ L h ⃗ s ⃗ R A_1=h^{\alpha}\vec{Y}^{\vec{b}_L}=h^{\alpha}Y_{i^*}, A_2=h^{\beta}\vec{h}^{\vec{b}_R}, S_1=h^{r_{\alpha}}g^{r_{sk}}, S_2=h^{\rho}\vec{Y}^{\vec{s}_L}\vec{h}^{\vec{s}_R} A1=hαY b L=hαYi,A2=hβh b R,S1=hrαgrsk,S2=hρY s Lh s R
    注意其中的 A 1 A_1 A1为the Pedersen commitment of the secret key of Y i ∗ Y_{i^*} Yi for randomness α \alpha α
    3、 C h a l l e n g e   1 Challenge\ 1 Challenge 1:拼接string s t r = Y ⃗ ∣ ∣ A 1 ∣ ∣ A 2 ∣ ∣ S 1 ∣ ∣ S 2 str=\vec{Y}||A_1||A_2||S_1||S_2 str=Y A1A2S1S2,计算 y = H 2 ( s t r ) , z = H 3 ( s t r ) , w = H 4 ( s t r ) y=H_2(str),z=H_3(str), w=H_4(str) y=H2(str),z=H3(str),w=H4(str)
    4、 C o m m i t   2 Commit\ 2 Commit 2:构建2组变量为 X X X,degree为1的多项式:
    l ⃗ ( X ) = b ⃗ L − z ⋅ 1 ⃗ n + s ⃗ L ⋅ X \vec{l}(X)=\vec{b}_L-z\cdot \vec{1}^n +\vec{s}_L\cdot X l (X)=b Lz1 n+s LX
    r ⃗ ( X ) = y ⃗ n ∘ ( w ⋅ b ⃗ R + w z ⋅ 1 ⃗ n + s ⃗ R ⋅ X ) + z 2 ⋅ 1 ⃗ n \vec{r}(X)=\vec{y}^n\circ (w\cdot \vec{b}_R+wz\cdot \vec{1}^n+\vec{s}_R\cdot X)+z^2\cdot \vec{1}^n r (X)=y n(wb R+wz1 n+s RX)+z21 n
    定义 t ( X ) = < l ⃗ ( X ) , r ⃗ ( X ) > t(X)=<\vec{l}(X),\vec{r}(X)> t(X)=<l (X),r (X)> t ( X ) t(X) t(X)为a degree 2 polynomial。可表示为 t ( X ) = t 0 + t 1 X + t 2 X 2 t(X)=t_0+t_1X+t_2X^2 t(X)=t0+t1X+t2X2,其中的 t 0 , t 1 , t 2 t_0,t_1,t_2 t0,t1,t2可由 ( b ⃗ L , b ⃗ R , s ⃗ L , s ⃗ R , w , y , z ) (\vec{b}_L,\vec{b}_R,\vec{s}_L,\vec{s}_R,w,y,z) (b L,b R,s L,s R,w,y,z) 计算得出。特别地,有:
    t 0 = w < b ⃗ L , b ⃗ R ∘ y ⃗ n > + z w < b ⃗ L − b ⃗ R , y ⃗ n > + z 2 < b ⃗ L , 1 ⃗ n > − w z 2 < 1 ⃗ n , y ⃗ n > − z 3 < 1 ⃗ n , 1 ⃗ n > = z 2 + w ( z − z 2 ) < 1 ⃗ n , y ⃗ n > − z 3 < 1 ⃗ n , 1 ⃗ n > t_0=w<\vec{b}_L,\vec{b}_R\circ \vec{y}^n>+zw<\vec{b}_L-\vec{b}_R,\vec{y}^n>+z^2<\vec{b}_L,\vec{1}^n>-wz^2<\vec{1}^n,\vec{y}^n>-z^3<\vec{1}^n,\vec{1}^n>=z^2+w(z-z^2)<\vec{1}^n,\vec{y}^n>-z^3<\vec{1}^n,\vec{1}^n> t0=w<b L,b Ry n>+zw<b Lb R,y n>+z2<b L,1 n>wz2<1 n,y n>z3<1 n,1 n>=z2+w(zz2)<1 n,y n>z3<1 n,1 n>
    选择随机值 τ 1 , τ 2 ∈ Z p \tau_1,\tau_2\in\mathbb{Z}_p τ1,τ2Zp 并计算:
    T 1 = g t 1 h τ 1 , T 2 = g t 2 h τ 2 T_1=g^{t_1}h^{\tau_1},T_2=g^{t_2}h^{\tau_2} T1=gt1hτ1,T2=gt2hτ2
    5、 C h a l l e n g e   2 Challenge\ 2 Challenge 2:计算 x = H 1 ( w , y , z , T 1 , T 2 ) x=H_1(w,y,z,T_1,T_2) x=H1(w,y,z,T1,T2)
    6、 R e s p o n s e Response Response:计算:
    τ x = t 1 ⋅ x + τ 2 ⋅ x 2 \tau_x=t_1\cdot x+\tau_2\cdot x^2 τx=t1x+τ2x2
    μ = α + β ⋅ w + ρ ⋅ x \mu=\alpha+\beta\cdot w+\rho\cdot x μ=α+βw+ρx
    z α = r α + α ⋅ x z_{\alpha}=r_{\alpha}+\alpha\cdot x zα=rα+αx
    z s k = r s k + x s k , i ∗ ⋅ x z_{sk}=r_{sk}+x_{sk,i^*}\cdot x zsk=rsk+xsk,ix
    l ⃗ = l ⃗ ( x ) = b ⃗ L − z ⋅ 1 ⃗ n + s ⃗ L ⋅ x \vec{l}=\vec{l}(x)= \vec{b}_L-z\cdot \vec{1}^n +\vec{s}_L\cdot x l =l (x)=b Lz1 n+s Lx
    r ⃗ = r ⃗ ( x ) = y ⃗ n ∘ ( w ⋅ b ⃗ R + w z ⋅ 1 ⃗ n + s ⃗ R ⋅ x ) + z 2 ⋅ 1 ⃗ n \vec{r}=\vec{r}(x)= \vec{y}^n\circ (w\cdot \vec{b}_R+wz\cdot \vec{1}^n+\vec{s}_R\cdot x)+z^2\cdot \vec{1}^n r =r (x)=y n(wb R+wz1 n+s Rx)+z21 n
    t = < l ⃗ , r ⃗ > t=<\vec{l},\vec{r}> t=<l ,r >
    Prover将 A 1 A_1 A1 σ = ( A 2 , S 1 , S 2 , T 1 , T 2 , τ x , μ , z α , z s k , l ⃗ , r ⃗ , t ) \sigma=(A_2,S_1,S_2,T_1,T_2,\tau_x,\mu,z_{\alpha},z_{sk},\vec{l},\vec{r},t) σ=(A2,S1,S2,T1,T2,τx,μ,zα,zsk,l ,r ,t) 发送给Verifier。

  • Verify:输入为 a set of public keys Y ⃗ , A 1 \vec{Y},A_1 Y ,A1和the proof σ = ( A 2 , S 1 , S 2 , T 1 , T 2 , τ x , μ , z α , z s k , l ⃗ , r ⃗ , t ) \sigma=(A_2,S_1,S_2,T_1,T_2,\tau_x,\mu,z_{\alpha},z_{sk},\vec{l},\vec{r},t) σ=(A2,S1,S2,T1,T2,τx,μ,zα,zsk,l ,r ,t)。拼接string s t r = Y ⃗ ∣ ∣ A 1 ∣ ∣ A 2 ∣ ∣ S 1 ∣ ∣ S 2 str=\vec{Y}||A_1||A_2||S_1||S_2 str=Y A1A2S1S2,计算 y = H 2 ( s t r ) , z = H 3 ( s t r ) , w = H 4 ( s t r ) , x = H 1 ( w , y , z , T 1 , T 2 ) y=H_2(str),z=H_3(str), w=H_4(str), x=H_1(w,y,z,T_1,T_2) y=H2(str),z=H3(str),w=H4(str),x=H1(w,y,z,T1,T2)。定义 h ⃗ ’ = ( h 1 ’ , ⋯   , h n ’ ) ∈ G n \vec{h}’=(h_1’,\cdots,h_n’)\in\mathbb{G}^n h =(h1,,hn)Gn,其中 h i ’ = h i y − i + 1 h_i’=h_i^{y^{-i+1}} hi=hiyi+1 for i ∈ [ 1 , n ] i\in [1,n] i[1,n]。Verifier 验证以下公式是否成立即可:
    t = < l ⃗ , r ⃗ > t=<\vec{l},\vec{r}> t=<l ,r > …… (9)
    g t h τ x = g z 2 + w ( z − z 2 ) < 1 ⃗ n , y ⃗ n > − z 3 < 1 ⃗ n , 1 ⃗ n > ⋅ T 1 x ⋅ T 2 x 2 g^th^{\tau_x}=g^{z^2+w(z-z^2)<\vec{1}^n,\vec{y}^n>-z^3<\vec{1}^n,\vec{1}^n>}\cdot T_1^x\cdot T_2^{x^2} gthτx=gz2+w(zz2)<1 n,y n>z3<1 n,1 n>T1xT2x2 …… (10)
    h μ Y ⃗ l ⃗ h ⃗ ’ r ⃗ = A 1 ⋅ A 2 w ⋅ S 2 x ⋅ Y ⃗ − z ⋅ 1 ⃗ n ⋅ h ⃗ ’ w z ⋅ y ⃗ n + z 2 ⋅ 1 ⃗ n h^{\mu}\vec{Y}^{\vec{l}}\vec{h}’^{\vec{r}}=A_1\cdot A_2^w\cdot S_2^x\cdot \vec{Y}^{-z\cdot \vec{1}^n}\cdot \vec{h}’^{wz\cdot \vec{y}^n+z^2\cdot \vec{1}^n} hμY l h r =A1A2wS2xY z1 nh wzy n+z21 n …… (11)
    h z α g z s k = S 1 A 1 x h^{z_{\alpha}}g^{z_{sk}}=S_1A_1^x hzαgzsk=S1A1x …… (12)

以上证明过程中的 l ⃗ \vec{l} l r ⃗ \vec{r} r length 均为 O ( n ) O(n) O(n),可进一步优化为 O ( log ⁡ n ) O(\log n) O(logn)。注意,Verifier可自己计算 A 1 ⋅ A 2 w ⋅ S 2 x ⋅ Y ⃗ − z ⋅ 1 ⃗ n ⋅ h ⃗ ’ w z ⋅ y ⃗ n + z 2 ⋅ 1 ⃗ n A_1\cdot A_2^w\cdot S_2^x\cdot \vec{Y}^{-z\cdot \vec{1}^n}\cdot \vec{h}’^{wz\cdot \vec{y}^n+z^2\cdot \vec{1}^n} A1A2wS2xY z1 nh wzy n+z21 n,verify 方程式(9)和(11)相当于 verify the witness l ⃗ \vec{l} l r ⃗ \vec{r} r satisfying the inner-product relation,因此可借助Bulletproofs论文中的方案,give a zero knowledge proof π \pi π of l ⃗ , r ⃗ \vec{l},\vec{r} l ,r 使得:
P = Y ⃗ ’ l ⃗ h ⃗ ’ r ⃗ ∧ t = < l ⃗ , r ⃗ > P=\vec{Y}’^{\vec{l}}\vec{h}’^{\vec{r}}\wedge t=<\vec{l},\vec{r}> P=Y l h r t=<l ,r >
相应的proof π \pi π 的size为 2 ⋅ ⌈ log ⁡ 2 ( n ) ⌉ 2\cdot \left \lceil \log_2 (n)\right \rceil 2log2(n) elements in G \mathbb{G} G和2 elements in Z p \mathbb{Z}_p Zp。Prover的主要计算压力在于 log ⁡ n + 1 \log n+1 logn+1 multi-exponentiations in G \mathbb{G} G of size 2 n , n , n / 2 , ⋯   , 1 2n,n,n/2,\cdots,1 2n,n,n/2,,1 respectively。Verifier的主要计算压力在于a single multi-exponentiations in G \mathbb{G} G of size 2 n + 2 log ⁡ 2 n + 1 2n+2\log_2 n+1 2n+2log2n+1

最终,the set membership proof output为 σ = ( A 1 , A 2 , S 1 , S 2 , T 1 , T 2 , τ x , μ , z α , z s k , t , π ) \sigma=(A_1,A_2,S_1,S_2,T_1,T_2,\tau_x,\mu,z_{\alpha},z_{sk},t,\pi) σ=(A1,A2,S1,S2,T1,T2,τx,μ,zα,zsk,t,π),size为 2 ⋅ ⌈ log ⁡ 2 ( n ) ⌉ + 6 2\cdot \left \lceil \log_2 (n)\right \rceil + 6 2log2(n)+6 elements in G \mathbb{G} G and 7 7 7 elements in Z p \mathbb{Z}_p Zp。Prover(Signer)的主要计算压力在于three multi-exponentiations in G \mathbb{G} G of size 2 n + 1 , 2 n 2n+1,2n 2n+1,2n and n + 1 n+1 n+1 respectively,Verifier的主要计算压力在于 two multi-exponentiations in G \mathbb{G} G of size 2 n + 2 log ⁡ 2 n + 1 2n+2\log_2 n+1 2n+2log2n+1 and n + 4 n+4 n+4 respectively。

现有的各set membership proofs方案对比为:【对于ECC group, ∣ G ∣ ≈ ∣ Z p ∣ |\mathbb{G}|\approx |\mathbb{Z}_p| GZp,本文的set membership proof方案的communication size最小,尽管Prover和Verifier的算力压力略大一点,这种算力压力可通过the acceleration of computing multi-exponentiation来解决。】
在这里插入图片描述
[3] Bayer和Groth 2013年论文《Zero-Knowledge Argument for Polynomial Evaluation with Application to Blacklists
[7] Bootle等人2015年论文《Short accountable ring signatures based on DDH
[8] Bootle和Groth 2018年论文《Efficient Batch Zero-Knowledge Arguments for Low Degree Polynomials
[21] Groth等人2015年论文《One-out-of-Many Proofs: Or How to Leak a Secret and Spend a Coin

3.1.2 Linkable Ring Signatures for RingCT3.0

可直接使用3.1.1节的set membership proof 来构建ring signatures,签名者signer可直接give a zero-knowledge proof of knowing:
(1) a committed public key ( C = h β Y i ) (C=h^{\beta}Y_i) (C=hβYi) which is in the set of n n n public keys。
(2) 以及the secret key which corresponds to the committed public key。

直接使用3.1.1节的set membership proof 来构建ring signatures的详细实现为:【其实与3.1.1节一模一样,只是 A 1 → B , A 2 → A A_1\rightarrow B, A_2\rightarrow A A1B,A2A
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
但是以上ring signature并不具有linkable属性。【因为linkable ring signature的安全模式之一是:the adversary is allowed to know all the secret keys in the ring。】【linkable ring signature [9] 是指:
given any two signatures, the verifier knows whether they are generated by the same signer (even though the verifier still does not know who the actual signer is)。】
实现linkable ring signature的方式有:

  • 在ring signature的基础上,为每个signer额外增加a linkability tag (在Monero中也称为key image)。3.1.1节中的public key 为 Y i = g x i Y_i=g^{x_i} Yi=gxi,其中 x i x_i xi为user’s secret key;此处不再以 Y i Y_i Yi来表示用户身份,改为以 Y i g i d Y_ig_i^d Yigid为the user representation in the set Y ⃗ \vec{Y} Y ,其中 Y i Y_i Yi为the public key, g i g_i gi为the system parameter, d d d为the hash of all public keys in the ring。
    对于每一个user representation Y i g i d Y_ig_i^d Yigid,the g i g_i gi component cannot be canceled out by Y i Y_i Yi due to the exponent d d d added。此时,考虑the DL between user representations,尽管the adversary知道the secret keys x i x_i xi of other users (which is allowed in the security model),the DL relation between different users’ representation is still unknown guaranteed by the DL between g and g i g_i gi

3.1.3 Compressing Multiple Inputs for RingCT3.0

具有 M M M multiple input的RingCT的一种trivial 实现可为:包含 M M M linkable ring signatures,并证明 the sum of input amount is equal to the sum of output amount。对应的RingCT signature size为 O ( M log ⁡ n ) O(M\log n) O(Mlogn)

借助Bulletproofs中证明多个range proof的思路可进一步压缩RingCT 3.0,用 b ⃗ L \vec{b}_L b L的first n n n bit来表示第一个linkable ring signature,second n n n bit of b ⃗ L \vec{b}_L b L 来表示第二个linkable ring signature,以此类推。最终有 n M nM nM bit of b ⃗ L \vec{b}_L b L for M M M inputs。借助inner product argument,the correctness of b ⃗ L \vec{b}_L b L is proven with a proof of size O ( log ⁡ n M ) O(\log nM) O(lognM)。同时,还需要 M M M group elements 来表示the correctness of M M M key images,最终的RingCT 3.0 的proof size为 O ( M + log ⁡ n ) O(M+\log n) O(M+logn)

相对于Sun等人2017年论文《RingCT 2.0: A compact accumulator-based (linkable ring signature) protocol for blockchain cryptocurrency monero》,本文做了如下改进:

  • 移除了system parameters中的trapdoor信息,从而更适于公有链场景。
  • 对balance property做了更清晰的定义,balance property要求任何malicious user都不能:
    (1)花别人的钱,spend any account of an honest user;【unforgeability,不可伪造性】
    (2)花自己的钱,但是收支不平衡,spend her own accounts with the sum of input amount being different from that of output amount;【equivalency,等值性】
    (3)双花,double spend any of her accounts。【linkability,关联性】
  • 除了outsider attack之外,还考虑了insider attack,具有stronger security model of anonymity。

4. RingCT 3.0的实际构建

关注的场景为:
在这里插入图片描述
实际的构建为:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值