MPC based on Threshold FHE

references:

  1. [Can01] Canetti R. Universally composable security: A new paradigm for cryptographic protocols[C]//Proceedings 42nd IEEE Symposium on Foundations of Computer Science. IEEE, 2001: 136-145.
  2. [Gol04] Oded Goldreich. Foundations of Cryptography: Volume 2, Basic Applications. Cam bridge University Press, New York, NY, USA, 1st edition, 2004.
  3. [Reg05]Oded Regev. On lattices, learning with errors, random linear codes, and cryptography. In STOC, pages 84–93, 2005.
  4. [LP09] Yehuda Lindell and Benny Pinkas. A proof of security of yao’s protocol for two-party computation. J. Cryptology, 22(2):161–188, 2009.
  5. [AJW11] Asharov G, Jain A, López-Alt A, et al. Multiparty computation with low communication, computation and interaction via threshold FHE[C]//Advances in Cryptology–EUROCRYPT 2012: 31st Annual International Conference on the Theory and Applications of Cryptographic Techniques, Cambridge, UK, April 15-19, 2012. Proceedings 31. Springer Berlin Heidelberg, 2012: 483-501.
  6. [BGV12] Brakerski Z, Gentry C, Vaikuntanathan V. (Leveled) fully homomorphic encryption without bootstrapping[J]. ACM Transactions on Computation Theory (TOCT), 2014, 6(3): 1-36.
  7. [MP12] Micciancio D, Peikert C. Trapdoors for lattices: Simpler, tighter, faster, smaller[C]//Annual International Conference on the Theory and Applications of Cryptographic Techniques. Berlin, Heidelberg: Springer Berlin Heidelberg, 2012: 700-718.
  8. [GSW13] Gentry C, Sahai A, Waters B. Homomorphic encryption from learning with errors: Conceptually-simpler, asymptotically-faster, attribute-based[C]//Annual Cryptology Conference. Springer, Berlin, Heidelberg, 2013: 75-92.
  9. [CM15] Clear M, McGoldrick C. Multi-identity and multi-key leveled FHE from learning with errors[C]//Advances in Cryptology–CRYPTO 2015: 35th Annual Cryptology Conference, Santa Barbara, CA, USA, August 16-20, 2015, Proceedings, Part II 35. Springer Berlin Heidelberg, 2015: 630-656.
  10. [MW16] Mukherjee P, Wichs D. Two round multiparty computation via multi-key FHE[C]//Advances in Cryptology–EUROCRYPT 2016: 35th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Vienna, Austria, May 8-12, 2016, Proceedings, Part II 35. Springer Berlin Heidelberg, 2016: 735-763.

Note that "TFHE" below refers to: Tthreshold FHE (distributed threshold decryption), not TFHE scheme (optimization of GSW).

3 rounds of MPC based on TFHE

FHE can naturally implement the two-party MPC protocol: Alice generates FHE public and private keys to encrypt her input, Bob also uses Alice's public key to encrypt her input, and then Bob performs homomorphic calculations and only sends the resulting ciphertext to Alice for decryption.

To directly extend the above idea to multiple participants, the following questions arise:

  1. Each party independently generates its own public and private keys, so it is difficult to calculate the ciphertext encrypted by different public keys (this is actually MK-FHE, see [CM15] for details)
  2. A public and private key is generated by a single participant, and other participants use this public key, so once it is compromised, the privacy of all participants will be destroyed

[AJW11] proposed threshold fully homomorphic encryption ( TFHE , threshold fully homomorphic encryption). All participants collaborate to generate a public public-private key pair . Each participant only holds the secret share of the private key . The decryption process is a distributed decryption protocol , and " smudge " needs to be added to hide their private key information. In addition, the FHE of the BGV/BFV route also needs an evaluation key, and the process of generating it is relatively complicated (while GSW does not need it and can be simplified).

TFHE can be used to construct a secure 3-round MPC protocol under the semi-honest model (honest execution, random and uniform), and the multi-party coin toss protocol and ZKP can be transformed into a secure MPC protocol under the malicious model (arbitrary execution), but the round complexity will increase. In fact, [AJW11]'s TFHE is secure under the semi-malicious model (honest execution, but arbitrarily chosen random bands), thus allowing the multi-party coin-flipping protocol to be omitted. There is NIZKP in NP language under CRS model , so a 3-round malicious secure MPC protocol can be obtained, but it is not efficient. [AJW11] designed a dedicated Sigma protocol for LWE language under RO model .

Threshold FHE

The formal definition of threshold fully homomorphic encryption scheme (TFHE) is as follows:

  • K e y G e n ( s e t u p ) KeyGen(setup) KeyGen(setup) N N Interactive protocol among N participants, each participant P k , k ∈ [ N ] P_k,k \in [N]Pk,k[ N ] Execute the protocol together to generatethe public public key pk pkp k ,public relinearization key evk evkev k , andthe secret share of the private key skk sk_kskk, they imply public and private keys sk sksk
  • E nc ( pk , μ ) Enc(pk,\mu)Enc(pk,μ ) : non-interactive algorithm, each participant usespk pkp k independently encrypted messageμ \mum
  • E v a l ( p k , f , c 1 , ⋯   , c l ) Eval(pk,f,c_1,\cdots,c_l) Eval(pk,f,c1,,cl) : non-interactive algorithm, each participant usespk pkp k performs homomorphic operations independently
  • D e c ( s k 1 , ⋯   , s k N , c ) Dec(sk_1,\cdots,sk_N,c) Dec(sk1,,skN,c) N N N 个参与者之间的交互式协议,各个参与者 P k , k ∈ [ N ] P_k,k \in [N] Pk,k[N] 使用各自的 s k k sk_k skk 作为输入,协议结束后各方都获得明文 μ \mu μ

[AJW11] 使用 BGV 方案作为基础加密方案,密文 c = ( a , b ) c=(a,b) c=(a,b) 可以被视为多变元线性多项式 ϕ c ( x ) : = b − a T x \phi_c(x):=b-a^Tx ϕc(x):=baT x, the decryption algorithm isD ec ( s , c ) = ( ϕ c ( s ) ( modq ) ) ( mod 2 ) Dec(s,c)=(\phi_c(s)\pmod q)\pmod 2Dec(s,c)=( ϕc(s)(modq))(mod2 ) . Homomorphic addition isϕ add ( x ) = ϕ c 1 ( x ) + ϕ c 2 ( x ) \phi_{add}(x) = \phi_{c_1}(x)+\phi_{c_2}(x)ϕadd(x)=ϕc1(x)+ϕc2( x ) , the ciphertext is still a linear polynomial; and the homomorphic multiplication isϕ mul ( x ) = ϕ c 1 ( x ) ⋅ ϕ c 2 ( x ) \phi_{mul}(x) = \phi_{c_1}(x) \cdot \phi_{c_2}(x)ϕmul(x)=ϕc1(x)ϕc2(x),多项式度数上升为 2 2 2,因此需要 “重线性化” 运算。假设原始私钥为 s s s,新的私钥为 s ′ s' s,令 s [ i ] = s i , i ∈ [ n ] : = { 1 , ⋯   , n } s[i]=s_i,i \in [n]:=\{1,\cdots,n\} s[i]=si,i[n]:={ 1,,n} 表述私钥向量的各分量,并设置 s [ 0 ] = 1 s[0]=1 s[0]=1 , then the corresponding relinearization key is:
evk : = { ψ i , j , τ ← S ym E nc ( s ′ , si ⋅ sj ⋅ 2 τ ) : i ∈ [ n ] , j ∈ [ n ] ∪ { 0 } , τ ∈ { 0 , ⋯ , ⌊ log ⁡ ( q ) ⌋ } } evk := \{\psi_{i,j,\tau} \leftarrow SymEnc(s', s_i \cdot s_j \cdot 2^\tau):\,\, i \in [n], j \in [n] \cup\{0\}, \tau \in \{0,\cdots,\lfloor\log (q)\rfloor\}\}e v k:={ psi , j , tSymEnc(s,sisj2t ):i[n],j[n]{ 0},t{ 0,,log(q)⌋}}

Key-Homomorphic

我们将判定型 LWE 问题记为 L W E n , q , ϕ , χ LWE_{n,q,\phi,\chi} LWEn,q,ϕ,χ,其中 ϕ \phi ϕ 是秘密 s s s 的分布, χ \chi χ 是噪声 e e e 的分布。容易证明,当模数 q q q 是奇数时, L W E n , q , ϕ , 2 χ LWE_{n,q,\phi,2\chi} LWEn,q,ϕ,2χ L W E n , q , ϕ , χ LWE_{n,q,\phi,\chi} LWEn,q,ϕ,χ 一样难,其中的 2 χ 2\chi 2χ 是指采样 e ← χ e \leftarrow \chi eχ 然后将 2 e 2e 2e 作为输出。

Uniqueness of LWE Secrets:安全参数 κ \kappa κ,令 n n n 是正整数, q q q 是素数,设置 m > n log ⁡ ( q ) + w ( log ⁡ ( κ ) ) m>n\log(q)+w(\log(\kappa)) m>nlog(q)+w(log(κ)) 以及 B < q / 8 B<q/8 B<q/8,那么均匀选取的 A ← Z q m × n A \leftarrow \mathbb Z_q^{m \times n} AZqm×n 以概率 1 − n e g l ( κ ) 1-negl(\kappa) 1negl(κ) 使得:对于任意的 p ∈ Z q m p \in \mathbb Z_q^m pZqm,存在至多单个 ( s , e ) (s,e) (s,e) 满足 s ∈ Z q n s \in \mathbb Z_q^n sZqn 以及 e ∈ [ − B , B ] m e \in [-B,B]^m e[B,B]m,使得 p = A s + 2 e p=As+2e p=As+2e。如果存在 ( s , e ) ≠ ( s ′ , e ′ ) (s,e) \neq (s',e') (s,e)=(s,e) 使得 p = A s + 2 e = A s ′ + 2 e ′ p=As+2e=As'+2e' p=As+2e _=As+2e _ , thenA ( s − s ′ ) = 2 ( e ′ − e ) ∈ [ − 2 B , 2 B ] m A(ss')=2(e'-e) \in [-2B,2B]^mA(ss)=2(ee)[ 2 B ,2B ] _m , for any fixeds ∗ = s − s ′ s^*=ss's=ss , the uniformly selectedAAA The probability that the above formula is true is only( 4 B / q ) m ≤ 2 − m (4B/q)^m \le 2^{-m}( 4 B / q )m2m

Now we give a basic encryption scheme based on LWE:

  • S e t u p ( 1 κ ) Setup(1^\kappa) Setup(1κ):输入安全参数 1 κ 1^\kappa 1κ,计算奇数 q = q ( κ ) q=q(\kappa) q=q(κ),维度 m = m ( κ ) , n = n ( κ ) m=m(\kappa),n=n(\kappa) m=m(κ),n=n(κ),环 Z q \mathbb Z_q Zq 上噪声分布 ϕ = ϕ ( κ ) , χ = χ ( κ ) \phi=\phi(\kappa),\chi=\chi(\kappa) ϕ=ϕ(κ),χ=χ(κ),输出参数 p a r a m s = ( 1 κ , q , m , n , ϕ , χ ) params=(1^\kappa,q,m,n,\phi,\chi) params=(1κ,q,m,n,ϕ,χ)
  • S y m K e y G e n ( p a r a m s ) SymKeyGen(params) SymKeyGen(params):采样秘密 s ← ϕ n s \leftarrow \phi^n sϕn,输出 s k : = s sk:=s sk:=s 作为对称秘钥
  • P u b K e y G e n ( s ) PubKeyGen(s) P u b Key G e n ( s ) : uniform samplingA ← Z qm × n A \leftarrow \mathbb Z_q^{m \times n}AZqm×n, sampling noise e ← χ me \leftarrow \chi^mehm,计算 p = A s + 2 e ∈ Z q m p=As+2e \in \mathbb Z_q^m p=As+2e _Zqm(Can be regarded as mmm ciphertextsSym E nc ( sk , 0 ) SymEnc(sk,0)S y m E n c ( s k ,0 ) ), outputpk : = ( A , p ) pk:=(A,p)pk:=(A,p ) as the corresponding public key
  • S y m E n c ( s k , μ ) SymEnc(sk,\mu) S y m E n c ( s k ,μ ) : input messageμ ∈ { 0 , 1 } \mu \in \{0,1\}m{ 0,1 } , uniform samplinga ← Z qna \leftarrow \mathbb Z_q^naZqn, sampling noise e ← χ e \leftarrow \chieχ,计算 b = a T s + 2 e + μ ∈ Z q b=a^Ts+2e+\mu \in \mathbb Z_q b=aTs+2e _+mZq, output ciphertext ct : = ( a , b ) ct:=(a,b)ct:=(a,b)
  • P u b E n c ( p k , μ ) PubEnc(pk,\mu) PubEnc(pk,μ):输入消息 μ ∈ { 0 , 1 } \mu \in \{0,1\} μ{ 0,1},均匀采样 r ← { 0 , 1 } m r \leftarrow \mathbb \{0,1\}^m r{ 0,1}m,计算 a = r T A ∈ Z q n a=r^TA \in \mathbb Z_q^n a=rTAZqn 以及 b = r T p + μ b=r^Tp+\mu b=rTp+μ(若 p = A s + 2 e p=As+2e p=As+2e,则 b b b 中的噪声为 2 r T e 2r^Te 2rT e), output ciphertextct : = ( a , b ) ct:=(a,b)ct:=(a,b)
  • D e c ( s k , c t ) Dec(sk,ct) Dec(sk,c t ) : input ciphertextct = ( a , b ) ct=(a,b)ct=(a,b),输出 ( b − a T s ( m o d q ) ) ( m o d 2 ) (b-a^Ts \pmod q) \pmod 2 (baTs(modq))(mod2)

According to the article in [Reg05], in LWE n , q , ϕ , χ LWE_{n,q,\phi,\chi}L W En , q , ϕ , x 假设下,上述加密方案是语义安全的,同时也是伪随机密文的。之后的一些著名全同态加密都是基于上述加密算法的,例如 BGV、BFV、CKKS 等等。除了加法同态和乘法同态,[AJW11] 进一步提出了“秘钥同态”,这可以用于构造分布式的门限解密协议。将系数 a , A a,A a,A 以及噪声 e e e 作为图灵机随机带,公钥生成算法的符号记为 P u b K e y G e n ( s ; A , e ) PubKeyGen(s;A,e) PubKeyGen(s;A,e),加密算法的符号记为 S y m E n c ( s k , μ ; a , e ) SymEnc(sk,\mu;a,e) SymEnc(sk,μ;a,e) P u b E n c ( p k , μ ; A , e ) PubEnc(pk,\mu;A,e) PubEnc(pk,m ;A,e)

Key-Homomorphic Properties : Given two private keys s 1 , s 2 ∈ Z qn s_1,s_2 \in \mathbb Z_q^ns1,s2Zqn, two plaintexts μ 1 , μ 2 ∈ { 0 , 1 } \mu_1,\mu_2 \in \{0,1\}m1,m2{ 0,1}

  1. Fix a coefficient a ∈ Z qna \in \mathbb Z_q^naZqn, given two noises e 1 , e 2 ∈ Z q e_1,e_2 \in \mathbb Z_qe1,e2Zq, Symmetric encryption ( a , b 1 ) = S ym E nc ( s 1 , μ 1 ; a , e 1 ) (a,b_1) = SymEnc(s_1,\mu_1;a,e_1)(a,b1)=SymEnc(s1,m1;a,e1) 以及 ( a , b 2 ) = S y m E n c ( s 2 , μ 2 ; a , e 2 ) (a,b_2) = SymEnc(s_2,\mu_2;a,e_2) (a,b2)=SymEnc(s2,m2;a,e2) , Natsumimon( a , b 1 + b 2 ) (a,b_1+b_2)(a,b1+b2) 满足
    ( a , b 1 + b 2 ) = S y m E n c ( s 1 + s 2 , μ 1 + μ 2 ; a , e 1 + e 2 ) (a,b_1+b_2) = SymEnc(s_1+s_2,\mu_1+\mu_2;a,e_1+e_2) (a,b1+b2)=SymEnc(s1+s2,m1+m2;a,e1+e2)
    is the addition of the second component of the ciphertext, and the resulting new ciphertext is the homomorphic addition ciphertext under the sum of the two private keys.

  2. Fix a coefficient A ∈ Z qm × n A \in \mathbb Z_q^{m \times n}AZqm×n,任给两个噪声 e 1 , e 2 ∈ Z q m e_1,e_2 \in \mathbb Z_q^m e1,e2Zqm,公钥生成 ( A , p 1 ) = P u b K e y G e n ( s 1 ; A , e 1 ) (A,p_1)=PubKeyGen(s_1;A,e_1) (A,p1)=PubKeyGen(s1;A,e1) 以及 ( A , p 2 ) = P u b K e y G e n ( s 2 ; A , e 2 ) (A,p_2)=PubKeyGen(s_2;A,e_2) (A,p2)=PubKeyGen(s2;A,e2),那么公钥 ( A , p 1 + p 2 ) (A,p_1+p_2) (A,p1+p2) 满足
    ( A , p 1 + p 2 ) = P u b K e y G e n ( s 1 + s 2 ; A , e 1 + e 2 ) (A,p_1+p_2)=PubKeyGen(s_1+s_2;A,e_1+e_2) (A,p1+p2)=PubKeyGen(s1+s2;A,e1+e2)
    is the addition of the second components of the public key, and the resulting new public key is the public key corresponding to the sum of the two private keys.

We expect the combined public key ( A , p 1 + p 2 ) (A,p_1+p_2)(A,p1+p2) , the above basic encryption scheme is still semantically secure, but the combined public key distribution is different from the original distribution. [AJW11] proposed that a large noise can be used to pollute (smudge out) any small value, and then prove that the distribution of the ciphertext under the combined public key after contamination is indistinguishable from the uniform distribution.

Smudging Lemma : Security parameter κ \kappaκ , letB 1 , B 2 B_1,B_2B1,B2is a positive integer, e 1 ∈ [ − B 1 , B 2 ] e_1 \in [-B_1,B_2]e1[B1,B2] is a fixed integer,e 2 ← [ B 2 , B 2 ] e_2 \leftarrow [B_2,B_2]e2[B2,B2] is a uniform random number. Then as long asB 1 / B 2 = negl ( κ ) B_1/B_2 = negl(\kappa)B1/B2=n e g l ( κ ) ,e 2 e_2e2The distribution of e 1 + e 2 e_1+e_2e1+e2The distributions of are statistically indistinguishable.
D=21x=(B1+B2)B1+B2 P r [ e2=x]P r [ e1+e2=x] =21 x=(B1+B2)B2B21+x=(B2)B1+B2B21 =B2B1
Security of combined keys : we define the adversary A \mathcal AA and ChallengerC \mathcal CGame between C J oin K ey A ( params , B 1 , B 2 ) JoinKey^{\mathcal A}(params,B_1,B_2)JoinKeyA(params,B1,B2)

  1. C \mathcal C C Generate private keys ← S ym K ey G en ( params ) s \leftarrow SymKeyGen(params)sS y m Key G e n ( p a r am s ) , calculate the public key( A , p ) = P ub Key G en ( s ) (A,p)=PubKeyGen(s)(A,p)=PubKeyGen(s),将公钥发送给 A \mathcal A A
  2. A \mathcal A A 自适应地选择 p ′ , s ′ , e ′ p',s',e' p,s,e,满足 p ′ = A s ′ + 2 e ′ p'=As'+2e' p=As+2e 以及 ∥ e ′ ∥ 1 ≤ B 1 \|e'\|_1 \le B_1 e1B1,选择明文 μ \mu μ,发送 ( p ′ , s ′ , e ′ , μ ) (p',s',e',\mu) (p,s,e,μ) C \mathcal C C
  3. C \mathcal C C 计算组合秘钥 ( A , p ∗ = p + p ′ ) (A,p^*=p+p') (A,p=p+p),均匀掷硬币 β ← { 0 , 1 } \beta \leftarrow \{0,1\} β{ 0,1},当 β = 0 \beta=0 β=0 时均匀采样 p k ∗ = ( a ∗ , b ∗ ) ← Z q n + 1 pk^*=(a^*,b^*) \leftarrow \mathbb Z_q^{n+1} pk=(a,b)Zqn+1,当 β = 1 \beta=1 β=1 时计算 ( a ∗ , b ) ← P u b E n c ( p k ∗ , μ ) (a^*,b) \leftarrow PubEnc(pk^*,\mu) (a,b)PubEnc(pk,μ ) , sampling "pollution noise"e ∗ ← [ − B 2 , B 2 ] e^* \leftarrow [-B_2,B_2]e[B2,B2] , setb ∗ = b + 2 e ∗ b^*=b+2e^*b=b+2e _ , send "polluted ciphertext"( a ∗ , b ∗ ) (a^*,b^*)(a,b )A\mathcal AA
  4. A \mathcal A Class A ( a ∗ , b ∗ ) (a^*,b^*)(a,b )In which case, outputβ ′ ∈ { 0 , 1 } \beta' \in \{0,1\}b{ 0,1}

我们说组合秘钥是安全的,如果对于任意的 PPT 敌手 A \mathcal A A,都有
∣ P r [ J o i n K e y A ( p a r a m s , B 1 , B 2 ) = 1 ] − 1 2 ∣ = n e g l ( κ ) \Big|Pr[JoinKey^{\mathcal A}(params,B_1,B_2)=1] - \dfrac{1}{2}\Big| = negl(\kappa) Pr[JoinKeyA(params,B1,B2)=1]21 =negl(κ)
可以证明,给定一组参数 p a r a m s params params 使得基础加密方案是语义安全的,那么对于任意的 B 1 , B 2 B_1,B_2 B1,B2,满足 B 1 / B 2 = n e g l ( κ ) B_1/B_2 = negl(\kappa) B1/B2=negl(κ),组合秘钥是安全的。否则,存在一个 PPT 敌手 A \mathcal A A 打破组合秘钥安全性。我们构造另一个敌手 B \mathcal B B,它的输入是公钥 p k = ( A , p ) pk=(A,p) pk=(A,p) 和密文 ( a , b ) (a,b) (a,b),它试图区分 ( a , b ) (a,b) (a,b) 是真正的密文 P u b E n c ( p k , 0 ) PubEnc(pk,0) PubEnc(pk,0) 还是均匀随机数。敌手 B \mathcal B B 以敌手 A \mathcal A A 作为子程序,为它模拟 J o i n K e y A JoinKey^{\mathcal A} JoinKeyA 游戏中的视图,

  1. B \mathcal B B 直接将 p k pk pk 发送给 A \mathcal A A,收到回应 ( p ′ , s ′ , e ′ , μ ) (p',s',e',\mu) (p,s,e,μ)
  2. B \mathcal B B 采样噪声 e ∗ ← [ − B 2 , B 2 ] e^* \leftarrow [-B_2,B_2] e[B2,B2],设置 a ∗ = a , b ∗ = b + a T s ′ + μ + 2 e ∗ a^*=a,b^*=b+a^Ts'+\mu+2e^* a=a,b=b+aTs+μ+2e,发送 ( a ∗ , b ∗ ) (a^*,b^*) (a,b) A \mathcal A A
  3. B \mathcal B B 输出 A \mathcal A A 所返回的 β \beta β

易知 B \mathcal B B 是 PPT 敌手。假设 ( a , b ) (a,b) (a,b) 是均匀的,那么 ( a ∗ , b ∗ ) (a^*,b^*) (a,b) 明显也是均匀的。假设 ( a , b ) ← P u b E n c ( p k , 0 ) (a,b) \leftarrow PubEnc(pk,0) (a,b)PubEnc(pk,0 ) , sincep ′ = A s ′ + 2 e ′ p'=As'+2e'p=As+2e _,那么有
b ∗ = ( r T p + 2 e ) + r T ( p ′ − 2 e ′ ) + μ + 2 e ∗ = r T p ∗ + μ + ( 2 e ∗ − 2 r T e ′ ) b^* = (r^Tp+2e)+r^T(p'-2e')+\mu+2e^* = r^Tp^*+\mu+(2e^*-2r^Te') b=(rTp+2e ) _+rT(p2e _)+m+2e _=rTp+m+( 2e _2 rThat's it )
rT e ′ ≤ ∥ e ′ ∥ 1 ≤ B 1 r^Te' \le \|e'\|_1 \le B_1rThat's ite1B1, is a small constant, so according to Smudging Lemma, b ∗ ≡ sr T p ∗ + μ + 2 e ∗ b^* \overset{s}{\equiv} r^Tp^*+\mu+2e^*bsrTp+m+2e _ , soB \mathcal BB toA \mathcal AA models statistically indistinguishable views. ThusA \mathcal AWhile A breaks the security of the combined key,B \mathcal BB also breaks the pseudo-randomness of the ciphertext of the basic encryption scheme, resulting in a contradiction. Therefore, the tainted ciphertext under the combined key is indistinguishable from the uniform random number, and the combined key is safe.

Construction

Using BGV as the basic encryption algorithm, TFHE is constructed as follows:

  • T F H E . S e t u p ( ) TFHE.Setup() TF H E . Set up ( ) : All participants reach a consensus on all the following parameters to determine the operation depth of BGV DDD , the encryption algorithm parameter of each layer isparamd : = ( 1 κ , qd , m , n , ϕ , χ ) param_d:=(1^\kappa,q_d,m,n,\phi,\chi)paramd:=(1Mr. _qd,m,n,ϕ ,χ ) , noise rangeB ϕ , B χ ∈ Z B_\phi,B_\chi \in \mathbb ZBϕ,BhZ , the range of pollution noiseB eval , B enc , B dec ∈ Z B_{eval},B_{enc},B_{dec} \in \mathbb ZBeval,Benc,BdecZ,系数 { A d ← Z q d m × n } \{A_d \leftarrow \mathbb Z_{q_d}^{m \times n}\} { AdZqdm×n} { a d , i , τ k ← Z q d n } \{a_{d,i,\tau}^k \leftarrow \mathbb Z_{q_d}^{n}\} { ad , i , tkZqdn}

  • T F H E . K e y G e n ( s e t u p ) TFHE.KeyGen(setup) TF H E . Key G e n ( se t u p ) :a two-round interactive protocol,

    The first round of communication (generate public public key ):

    1. Parties P k P_kPkIndependently generate the public-private key pair of each layer { ( sdk , ( A d , pdk : = A dsdk + 2 edk ) ) } \{(s_d^k,(A_d,p_d^k:=A_ds_d^k+2e_d^k))\}{(sdk,(Ad,pdk:=Adsdk+2e _dk))} , whereA d A_dAdis the public random string. Parties P k P_kPkindependent calculation ( ad , i , τ k , bd , i , τ k , k ) ← BGV . S ym E nc ( sdk , 2 τ ⋅ sd − 1 k [ i ] ; ad , i , rk , ed , i , τ k , k ) (a_{d,i,\tau}^k,b_{d,i,\tau}^{k,k}) \leftarrow BGV.SymEnc(s_d^k, 2^\tau \cdot s_{d-1}^k[i]; _{d,i,\tau}^{k,k})(ad , i , tk,bd , i , tk,k)BGV.SymEnc(sdk,2tsd1k[i];ad,i,rk,ed , i , tk,k) 以及 ( a d , i , τ l , b d , i , τ l , k ) ← B G V . S y m E n c ( s d k , 0 ; a d , i , r l , e d , i , τ l , k ) , l ≠ k (a_{d,i,\tau}^l,b_{d,i,\tau}^{l,k}) \leftarrow BGV.SymEnc(s_d^k, 0; a_{d,i,r}^l,e_{d,i,\tau}^{l,k}),l \neq k (ad , i , tl,bd , i , tl,k)BGV.SymEnc(sdk,0;ad,i,rl,ed , i , tl,k),l=k , these{ bd , i , rl , k } \{b_{d,i,r}^{l,k}\}{ bd,i,rl,k} will be used to create the relinearization key.

    2. All parties broadcast { pdk } , { bd , i , rl , k } \{p_d^k\},\{b_{d,i,r}^{l,k}\}{ pdk},{ bd,i,rl,k} , calculatepd ∗ : = ∑ lpdlp^*_d:=\sum_l p_d^lpd:=lpdlbd , i , τ l : = ∑ lbd , i , τ l , k b_{d,i,\tau}^l:=\sum_l b_{d,i,\tau}^{l,k}bd , i , tl:=lbd , i , tl,k,将 ( A d , p d ∗ ) (A_d,p_d^*) (Ad,pd) as the public public key of each layer, and{ bd , i , τ l } \{b_{d,i,\tau}^l\}{ bd , i , tl} is the ciphertext of the private key fragment.

    3. 可以验证,
      ( A , d , p d ∗ ) = B G V . P u b K e y G e n ( s d ∗ ; A d , e d ∗ ) , s d ∗ : = ∑ l = 1 N s d l , e d ∗ : = ∑ l = 1 N e d l ( a d , i , τ l , b d , i , τ l ) = B G V . S y m E n c ( s d ∗ , 2 τ ⋅ s d − 1 l [ i ] ; a d , i , τ l , e d , i , τ l ) , e d , i , τ l : = ∑ k = 1 N e d , i , τ l , k \begin{aligned} (A,d,p_d^*) &= BGV.PubKeyGen(s_d^*;A_d,e_d^*), s_d^*:=\sum_{l=1}^N s_d^l, e_d^*:=\sum_{l=1}^N e_d^l\\ (a_{d,i,\tau}^l, b_{d,i,\tau}^l) &= BGV.SymEnc(s_d^*,2^\tau \cdot s_{d-1}^l[i];a_{d,i,\tau}^l,e_{d,i,\tau}^l), e_{d,i,\tau}^l:=\sum_{k=1}^N e_{d,i,\tau}^{l,k} \end{aligned} (A,d,pd)(ad,i,τl,bd,i,τl)=BG V . P u b Key G e n ( pd;Ad,ed),sd:=l=1Nsdl,ed:=l=1Nedl=BGV.SymEnc(sd,2tsd1l[i];ad , i , tl,ed , i , tl),ed , i , tl:=k=1Ned , i , tl,k

    The second round of communication (generate public relinearization key ):

    1. Each participant P k P_kPk 采样 ( v d , i , j , τ l , k , w d , i , j , τ l , k ) ← B G V . P u b E n c ( p d ∗ , 0 ) (v_{d,i,j,\tau}^{l,k},w_{d,i,j,\tau}^{l,k}) \leftarrow BGV.PubEnc(p_d^*,0) (vd,i,j,τl,k,wd,i,j,τl,k)BGV.PubEnc(pd,0) 以及污染噪声 e ← [ − B e v a l , B e v a l ] e \leftarrow [-B_{eval},B_{eval}] e[Beval,Beval],计算 ( α d , i , j , τ l , k , β d , i , j , τ l , k ) : = s d − 1 k [ j ] ⋅ ( a d , i , τ l , b d , i , τ l ) + ( v d , i , j , τ l , k , w d , i , j , τ l , k + 2 e ) (\alpha_{d,i,j,\tau}^{l,k}, \beta_{d,i,j,\tau}^{l,k}) := s_{d-1}^k[j]\cdot(a_{d,i,\tau}^l, b_{d,i,\tau}^l) + (v_{d,i,j,\tau}^{l,k}, w_{d,i,j,\tau}^{l,k} + 2e) (αd,i,j,τl,k,βd,i,j,τl,k):=sd1k[j](ad,i,τl,bd , i , tl)+(vd,i,j,τl,k,wd,i,j,τl,k+2e ) _

    2. 各方广播 { ( α d , i , j , τ l , k , β d , i , j , τ l , k ) } \{(\alpha_{d,i,j,\tau}^{l,k}, \beta_{d,i,j,\tau}^{l,k})\} {(αd,i,j,τl,k,βd,i,j,τl,k)},对于 j ∈ [ n ] j \in [n] j[n] 计算 ϕ d , i , j , τ : = ∑ l ∑ k ( α d , i , j , τ l , k , β d , i , j , τ l , k ) \phi_{d,i,j,\tau} := \sum_l\sum_k(\alpha_{d,i,j,\tau}^{l,k}, \beta_{d,i,j,\tau}^{l,k}) ϕd,i,j,τ:=lk(αd,i,j,τl,k,βd,i,j,τl,k),对于 j = 0 j=0 j=0 ϕd , i , j , τ : = ∑ l ( ad , i , j , τ l , bd , i , j , τ l ) \phi_{d,i,j,\tau} := \sum_l(a_{d,i,j,\tau}^{l}, b_{d,i,j,\tau}^{l})ϕd,i,j,τ:=l(ad,i,j,τl,bd,i,j,τl)

    3. 可以验证,
      ( α d , i , j , τ l , k , β d , i , j , τ l , k ) = B G V . S y m E n c ( s d ∗ , 2 τ ⋅ s d − 1 l [ i ] ⋅ s d − 1 k [ j ] ) ϕ d , i , j , τ = B G V . S y m E n c ( s d ∗ , 2 τ ⋅ s d − 1 ∗ [ i ] ⋅ s d − 1 ∗ [ j ] ) \begin{aligned} (\alpha_{d,i,j,\tau}^{l,k}, \beta_{d,i,j,\tau}^{l,k}) &= BGV.SymEnc(s_d^*,2^\tau \cdot s_{d-1}^l[i]\cdot s_{d-1}^k[j])\\ \phi_{d,i,j,\tau} &= BGV.SymEnc(s_d^*,2^\tau \cdot s_{d-1}^*[i]\cdot s_{d-1}^*[j])\\ \end{aligned} ( ad,i,j,τl,k,bd,i,j,τl,k)ϕd,i,j,τ=BGV.SymEnc(sd,2tsd1l[i]sd1k[j])=BGV.SymEnc(sd,2tsd1[i]sd1[j])

    The output of the algorithm is: public public key pk : = ( A 0 , p 0 ∗ ) pk:=(A_0,p_0^*)pk:=(A0,p0) , public relinearization keyevk : = { ϕ d , i , j , τ } evk:=\{\phi_{d,i,j,\tau}\}e v k:={ pd,i,j,τ} , participantP k P_kPkholds the private key sk D sk_DskDSecret sharing s D k s_D^ksDk

  • T F H E . E n c ( p k , μ ) TFHE.Enc(pk,\mu) TFHE.Enc(pk,μ ) : in parameterparam 0 param_0param0Calculate the ciphertext ( v , w ) ← BGV . E nc ( pk , μ ) (v,w) \leftarrow BGV.Enc(pk,\mu)(v,w)BG V . E n c ( p k ,μ ) , and then sample additional pollution noisee ← [ − B enc , B enc ] e \leftarrow [-B_{enc},B_{enc}]e[Benc,Benc] , output ciphertextc : = ( ( v , w + 2 e ) , level = 0 ) c:=((v,w+2e),level=0)c:=((v,w+2e ) , _level=0)

  • T F H E . E v a l ( e v k , f , c 1 , ⋯   , c l ) TFHE.Eval(evk,f,c_1,\cdots,c_l) TFHE.Eval(evk,f,c1,,cl) : non-interactive algorithm, simply outputBGV . E val ( evk , f , c 1 , ⋯ , cl ) BGV.Eval(evk,f,c_1,\cdots,c_l)BGV.Eval(evk,f,c1,,cl)

  • T F H E . D e c ( s D 1 , ⋯   , s D N , c ) TFHE.Dec(s_D^1,\cdots,s_D^N,c) TFHE.Dec(sD1,,sDN,c ) :a round of interactive protocol,

    1. Suppose the ciphertext is of the form c = ( v , w , D ) c=(v,w,D)c=(v,w,D ) , the combined private key iss D ∗ : = ∑ ks D k s_D^*:=\sum_k s_D^ksD:=ksDk
    2. Parties P k P_kPkcalculationwk = v T s D k + 2 ekw^k = v^Ts_D^k+2e_kwk=vTsDk+2e _k, where ek ← [ − B dec , B dec ] e_k \leftarrow [-B_{dec},B_{dec}]ek[Bdec,Bdec] is the pollution noise, which will partially decrypt the valuewkw^kwk broadcast to other participants
    3. 各方设备ϕ c ( s D ) = w − ∑ kwk \phi_c(s_D) = w-\sum_k w^kϕc(sD)=wkwk , output plaintext( ϕ c ( s ) ( modq ) D ) ( mod 2 ) (\phi_c(s) \pmod q_D) \pmod 2( ϕc(s)(modq)D)(mod2)

We choose a set of parameters so that the basic FHE scheme is semantically safe, and then choose the appropriate pollution noise B eval , B enc , B dec B_{eval},B_{enc},B_{dec}Beval,Benc,BdecMake the combined secret key pd ∗ = ∑ lpdlp^*_d=\sum_l p_d^lpd=lpdlis safe. In addition, TFHE also needs to prove the security of its threshold decryption algorithm.

Semi-Malicious MPC

Now, we use the above TFHE, and immediately get a general MPC protocol: let f : ( { 0 , 1 } lin ) N → { 0 , 1 } loutf:(\{0,1\}^{l_{in}})^N \to \{0,1\}^{l_{out}}f:({ 0,1}lin)N{ 0,1}loutis a deterministic function of any common output , and the multiplication depth of the corresponding logic circuit is DDD , protocolΠ f \Pi_fPifProceed as follows:

  1. Initialization: Each participant negotiates the parameter setup setup of TFHEse t u p , letP k P_kPkThe input is xk ∈ { 0 , 1 } lin x_k \in \{0,1\}^{l_{in}}xk{ 0,1}lin

  2. The first round of communication: each participant P k P_kPk执行TFHE . KeyGen(setup) TFHE.KeyGen(setup)TF H E . The first round of Key G e n ( se t u p ) , get the public public key pk pkp k and private key secret shareskk sk_kskk

  3. The second round of communication: each participant P k P_kPkUse the obtained pk pkp k encrypts xk x_kbit by bitxk, get ciphertext ck , i ← TFHE . E nc ( pk , xk [ i ] ) c_{k,i} \leftarrow TFHE.Enc(pk,x_k[i])ck,iTFHE.Enc(pk,xk[ i ]) . Simultaneously executeTFHE . Key G en ( setup ) TFHE.KeyGen(setup)The second round of TF H E . Key G e n ( se t u p ) , obtain the public relinearization keyevk evke v k,将( { ck , i } , evk ) (\{c_{k,i}\},evk)({ ck,i},e v k ) pack and broadcast to other participants

  4. The third round of communication: order fj f_jfjis the function ffThe operation function of each output bit of f , the homomorphic calculation of all partiescj = E val ( evk , fj , { ck , i } ) c_j = Eval(evk,f_j,\{c_{k,i}\})cj=Eval(evk,fj,{ ck,i}) . When decryption is required, all participants cooperate to executeyj = TFHE . D ec ( s D 1 , ⋯ , s DN , cj ) y_j = TFHE.Dec(s_D^1,\cdots,s_D^N,c_j)yj=TFHE.Dec(sD1,,sDN,cj) to obtain the output valuey = f ( x 1 , ⋯ , x N ) y=f(x_1,\cdots,x_N)y=f(x1,,xN)

According to the standard transformation technique in [Gol04], for any random function g ( x 1 , ⋯ , x N ; r ) ↦ yg(x_1,\cdots,x_N;r) \mapsto yg(x1,,xN;r)y , we can define a deterministic function
f ( ( x 1 , r 1 ) , ⋯ , ( x N , r N ) ) : = g ( x 1 , ⋯ , x N ; ⨂ i = 1 N ri ) f((x_1,r_1),\cdots,(x_N,r_N)) := g(x_1,\cdots,x_N; bigotimes_{i=1}^N r_i)f((x1,r1),,(xN,rN)):=g(x1,,xN;i=1Nri)
As long as there is a participant who flips a coin evenly, then⨂ i = 1 N ri \bigotimes_{i=1}^N r_ii=1Nriwill be an unbiased random string. The above conversion process does not increase the round complexity of MPC.

According to the standard transformation technique in [LP09], for any private output function g ( x 1 , ⋯ , x N ) ↦ ( y 1 , ⋯ , y N ) g(x_1,\cdots,x_N) \mapsto (y_1,\cdots,y_N)g(x1,,xN)(y1,,yN) , we can all define a common output function
f ( ( x 1 , s 1 ) , ⋯ , ( x N , s N ) ) : = y 1 ⊗ s 1 ∥ ⋯ ∥ y N ⊗ s N f((x_1,s_1),\cdots,(x_N,s_N)) := y_1 \otimes s_1 \| \cdots \|y_N \otimes s_Nf((x1,s1),,(xN,sN)):=y1s1yNsN
where sk s_kskis a symmetric encrypted private key independently selected by each party. Execute the MPC protocol to calculate the above functions, and finally each participant P k P_kPkFor yk ⊗ sk y_k \otimes s_k in the calculation resultykskPartially decrypted. This only adds a local post-processing pass with minimal overhead and does not increase the round complexity of MPC.

It can be proved that the above MPC protocol is semi-malicious and secure under the UC framework. The UC framework is described in [Can01], the paper has more than 100 pages, and I haven't read it yet, so I won't write the security proof here. The "semi-malicious adversary" here is a stronger concept proposed by [AJW11] than the semi-honest adversary, so it will be easier to switch from a semi-malicious security protocol to a malicious security protocol.

Universal Composability Framework ([Can01]): Define PPT environment Z \mathcal ZZ , input as security parameter1 κ 1^\kappa1κ and auxiliary inputzzz , which operates in the real or ideal world.

  • Ideal world : There are several virtual participants P ~ 1 , ⋯ , P ~ N \tilde P_1,\cdots,\tilde P_NP~1,,P~N, an ideal rival S \mathcal SS invades some virtual participants, they calculate a functionalF \mathcal FF
  • Real World : There are several PPT participants P 1 , ⋯ , PN P_1,\cdots,P_NP1,,PN, a real adversary A \mathcal AA has hacked some participants, they execute a protocolπ \piPi
  • Environment Z \mathcal ZZ provides input to the participantinteracts with the adversaryduring execution, and finallyZ \mathcal ZZ judgeswhether it is in the real world or an ideal world. Define random variablesIDEALF , S , Z ( 1 κ , z ) IDEAL_{\mathcal F,S,\mathcal Z}(1^\kappa,z)IDEALF,S,Z(1Mr. _z ) is the view after interaction between the environment and the participants and opponents in the ideal world, letIDEALF , S , Z IDEAL_{\mathcal F,S,\mathcal Z}IDEALF,S,Zis a distribution cluster. Define the random variable REAL π , A , Z ( 1 κ , z ) REAL_{\pi,\mathcal A,\mathcal Z}(1^\kappa,z)REALπ , A , Z(1Mr. _z ) is the view after interaction between the environment and the participants and adversaries in the ideal world, letREAL π , A , Z REAL_{\pi,\mathcal A,\mathcal Z}REALπ , A , Zis a distribution cluster.

UC Security : Given a positive integer NNN , letF \mathcal FF is aNNN- variable functionality,π \piπ is aNNN- party agreement. We sayπ \piπ safe calculationF \mathcal FF , if for any PPT real adversaryA \mathcal AA , both exist in the PPT ideal opponentS \mathcal SS , such that any PPT environmentZ \mathcal ZZ都有
REAL π , A , Z ≡ c IDEALF , S , Z REAL_{\pi,\mathcal A,\mathcal Z} \overset{c}{\equiv} IDEAL_{\mathcal F,S,\mathcal Z}REALπ , A , ZcIDEALF,S,Z
In order to facilitate the construction of the protocol, we often restrict the capabilities of the adversary, for example: semi-honest adversary, malicious adversary, only a certain number of participants can be hacked, and so on. There is also " security-with-abort ", where the ideal opponent S \mathcal SS can abort, resulting in no functional output on some participants; and "fairness" means that the adversary does not have the ability to abort, and honest participants will always obtain functional output.

Semi-Malicious Adversaries : A semi-malicious adversary is an interactive Turing machine, which has a " witness tape " in addition to the standard input-output tape and random tape . In each round of interaction of the protocol, the adversary replaces P k P_kPksend message mmm , and write the tuple( x , r ) (x,r)(x,r ) , making the opponentP k ∗ P_k^*PkThe history records exactly match the honest execution P k ( x , r ) P_k(x,r)Pk(x,r ) view. In each round, after receiving the message from the honest party, the adversary adaptively chooses( m , ( x , r ) ) (m,(x,r))(m,(x,r )) , written ( x , r ) (x,r)in different rounds(x,r ) can be inconsistent. At the same time, the adversary can terminate the agreement in any round of interaction.

Any semi-honest adversary chooses random bands evenly, and can simply write the random bands on the witness tape, so semi-malicious opponents are more free than semi-honest adversaries. At the same time, all the actions of the semi-malicious adversary are written in ( x , r ) (x,r) on the witness tape(x,r ) , so it is indeed more limited than a malicious adversary. The capabilities of a semi-malicious adversary lie strictly between those of a semi-honest adversary and a malicious adversary.

Full-Malicious MPC

In order to obtain a secure MPC protocol under a malicious model, a standard compiler can be used to convert a semi-honest security protocol, which requires a fair coin-toss protocol and a zero-knowledge proof protocol. Since the MPC protocol based on TFHE constructed by [AJW11] is semi-malicious and secure , the coin tossing link can be omitted . There is a general NIZKP protocol under the CRS model, but it is less efficient. Therefore [AJW11] designed an efficient Gap Sigma protocol (the weakening of the Sigma protocol) for LWE language, and the NIZKP protocol under the RO model can be obtained by using the FS heuristic.

Gap Sigma Protocol:令 R z k ⊆ R s o u n d \mathcal R_{zk} \subseteq \mathcal R_{sound} RzkRsoundare two NP relations, and the corresponding language is L zk ⊆ L sound L_{zk} \subseteq L_{sound}LzkLsound. About language ( L zk , L sound ) (L_{zk},L_{sound})(Lzk,Lsound) Gap Sigma protocol⟨ P , V ⟩ \langle P,V \rangleP,V , is a three-round interactive protocol that statesxxx , givenwww , process⟨ P ( w ) , V ⟩ ( x ) \langle P(w),V \rangle(x)P(w),V ( x ) produces copies of the form( a , c , z ) (a,c,z)(a,c,z ) . It satisfies the following properties:

  1. Correctness : For any ( x , w ) ∈ R zk (x,w) \in \mathcal R_{zk}(x,w)Rzk, have ⟨ P ( w ) , V ⟩ ( x ) = 1 \langle P(w),V \rangle(x)=1P(w),V(x)=1
  2. Special Soundness : Exist PPT Extractor EEE , any statementxxTwo acceptable copies of x ( a , c , z ) , ( a , c ′ , z ′ ) , c ≠ c ′ (a,c,z),(a,c',z'),c \neq c'(a,c,z),(a,c,z),c=c,那么 E ( x , a , c , z , c ′ , z ′ ) ∈ R s o u n d ( x ) E(x,a,c,z,c',z') \in \mathcal R_{sound}(x) E ( x ,a,c,z,c,z)Rsound(x)
  3. Honest-Verifier Zero-Knowledge : There is a PPT simulator SSS , given any statementx ∈ L zkx \in L_{zk}xLzkand challenge ccc,使得 ( a ′ , z ′ ) ← S ( x , c ) (a',z') \leftarrow S(x,c) (a,z)S(x,c) 满足 { ( a ′ , c , z ′ ) } ≡ s { ( a , c , z ) } \{(a',c,z')\} \overset{s}{\equiv} \{(a,c,z)\} {(a,c,z)}s{(a,c,z )} , where( a , c , z ) (a,c,z)(a,c,z ) is determined by both parties⟨ P ( w ) , V ⟩ ( x ) \langle P(w),V \rangle(x)P(w),V ( x ) generated interactively

In the Gap Sigma protocol, its completeness and zero knowledge are about the relation R zk \mathcal R_{zk}Rzk, while reliability is about the relation R sound \mathcal R_{sound}Rsound, satisfy the relation R zk ⊆ R sound \mathcal R_{zk} \subseteq \mathcal R_{sound}RzkRsound. That is, in R zk \mathcal R_{zk}Rzk( x , w ) in (x,w)(x,w ) all satisfy the above three properties; and forR sound \mathcal R_{sound}RsoundSome of ( x , w ) in (x,w)(x,w ) Only reliability is satisfied, and the protocol does not guarantee correctness and zero-knowledge.

[AJW11] constructed a Gap Sigma protocol for the LWE language. Order BBB is the scale of noise, we define an NP relation:
RLWEB : = { ( ( A , b ) , ( s , 2 e ) ) : b = A s + 2 e , A ∈ Z qm × n , b ∈ Z qm , s ∈ Z qn , 2 e ∈ [ − B , B ] m } \mathcal R_{LWE}^B := \ { ((A,b),(s,2e)): b=As+2e, A \in \mathbb Z_q^{m \times n}, b \in \mathbb Z_q^{m}, s \in \mathbb Z_q^{n}, 2e \in [-B,B]^m \}RL W EB:={((A,b),(s,2e ) ):b=As+2 e ,AZqm×n,bZqm,sZqn,2e _[B,B]m }
Its corresponding language is recorded asLLWEB L_{LWE}^BLL W EB, for B ∗ ≥ BB^* \ge BBB,易知 R L W E B ⊆ R L W E B ∗ \mathcal R_{LWE}^{B} \subseteq \mathcal R_{LWE}^{B^*} RL W EBRL W EB 以及 L L W E B ⊆ L L W E B ∗ L_{LWE}^{B} \subseteq L_{LWE}^{B^*} LL W EBLL W EB. Now we construct about ( RLWEB , RLWEB ∗ ) (\mathcal R_{LWE}^{B}, \mathcal R_{LWE}^{B^*})(RL W EB,RL W EB) Gap Sigma protocol⟨ P , V ⟩ LWE \langle P,V \rangle_{LWE}P,VLW E _, statement for ( A , b ) ∈ LLWEB (A,b) \in L_{LWE}^B(A,b)LL W EB, given that ( s , 2 e ) ∈ RLWEB ( A , b ) (s,2e) \in \mathcal R_{LWE}^B(A,b)(s,2e ) _RL W EB(A,b)

  1. P P P uniform sampling masks ′ ← Z qn s' \leftarrow \mathbb Z_q^nsZqnAnd even noise 2 e ′ ← [ − ( B ∗ / 2 − B ) , B ∗ / 2 − B ] m 2e' \leftarrow [-(B^*/2-B), B^*/2-B]^m2e _[(B/2B),B/2B]m , calculateb ′ = A s ′ + 2 e ′ b'=As'+2e'b=As+2e _ and send toVVV
  2. VVV randomly chooses to challengec ∈ { 0 , 1 } c \in \{0,1\}c{ 0,1 } Send toPPP
  3. P P P calculationz = s ′ + csz=s'+csz=s+cs and send toVVV
  4. VVV calculation2 e ∗ = b ′ + cb − A z 2e^* = b'+cb-Az2e _=b+cbA z , judge whether it is a short even noise2 e ∗ ∈ [ − B ∗ / 2 , B ∗ / 2 ] m 2e^* \in [-B^*/2,B^*/2]^m2e _[B/2,B/2]m

It can be proved that when B / B ∗ = negl ( κ ) B/B^* = negl(\kappa)B/B=ne g l ( κ ) , the above protocol is a Gap Sigma protocol.

  • Proof completeness: for the honest prover PPP , easy to verifyA z = ( b ′ − 2 e ′ ) + c ( b − 2 e ) = b ′ + cb − 2 ( e ′ + e ) Az=(b'-2e')+c(b-2e)=b'+cb-2(e'+e)The z=(b2e _)+c(b2e ) _=b+cb2(e+e),其中 2 e ′ ∈ [ − ( B ∗ / 2 − B ) , B ∗ / 2 − B ] m , 2 e ∈ [ − B , B ] 2e' \in [-(B^*/2-B), B^*/2-B]^m, 2e \in [-B,B] 2e _[(B/2B),B/2B]m,2e _[B,B ],thereforeb ′ + cb − A z = 2 ( e ′ + e ) b'+cb-Az=2(e'+e)b+cbThe z=2(e+e ) is a short even noise
  • Proving special reliability: Given the statement ( A , b ) (A,b)(A,Two acceptable copies of b ) ( b ′ , 1 , z 1 ) , ( b ′ , 0 , z 2 ) (b',1,z_1), (b',0,z_2)(b,1,z1),(b,0,z2) , we construct the extractorEEE , which computess ∗ = z 1 − z 2 s^*=z_1-z_2s=z1z2 2 e ∗ = b − A s ∗ 2e^*=b-As^* 2e _=bAs , output( s ∗ , 2 e ∗ ) (s^*,2e^*)(s,2e _ ). It is easy to verify thatb = A s ∗ + 2 e ∗ b=As^*+2e^*b=As+2e _ 2 e ∗ ∈ [ − B ∗ , B ∗ ] 2e^* \in [-B^*,B^*] 2e _[B,B ],let( s ∗ , 2 e ∗ ) ∈ RLWEB ∗ ( A , b ) (s^*,2e^*) \in \mathcal R_{LWE}^{B^*}(A,b)(s,2e _)RL W EB(A,b ) is a proof.
  • Prove that the honest verifier is zero-knowledgeable: given ( A , b ) (A,b)(A,b ) andccc , we construct the simulatorEEE , which uniformly samplesz ← Z qnz \leftarrow \mathbb Z_q^nzZqn 2 e ∗ ← [ − ( B ∗ / 2 − B ) , B ∗ / 2 − B ] m 2e^* \leftarrow [-(B^*/2-B), B^*/2-B]^m 2e _[(B/2B),B/2B]m , calculateb ′ = A z + 2 e ∗ − cb b'=Az+2e^*-cbb=The z+2e _c b , output simulation view( b ′ , c , z ) (b',c,z)(b,c,z)。由于 b ′ = A z + 2 e ∗ − c ( A s + 2 e ) b'=Az+2e^*-c(As+2e) b=The z+2e _c(As+2 e ) , so lets ′ = z − cs , 2 e ′ = 2 e ∗ − 2 ce s'=z-cs, 2e'=2e^*-2ces=zcs,2e _=2e _2 ce , thenb ′ = A s ′ + 2 e ′ b'=As'+2e'b=As+2e _' . whenc = 0 c=0c=0 , the analog view is exactly the same asVVThe real view of V is identically distributed. Whenc = 1 c=1c=1 , in the real viewb ′ = A s ′ + 2 e ′ b'=As'+2e'b=As+2e _,其中 2 e ′ ← [ − ( B ∗ / 2 − B ) , B ∗ / 2 − B ] m 2e' \leftarrow [-(B^*/2-B), B^*/2-B]^m 2e _[(B/2B),B/2B]m . Whereas b ′ = A s ′ + 2 e ′ b'=As'+2e'in the simulation viewb=As+2e _ , of which2 e ′ = 2 e ∗ − 2 e 2e'=2e^*-2e2e _=2e _2 e , where2 e ∈ [ − B , B ] m 2e \in [-B,B]^m2e _[B,B]m is a fixed small noise, because2 e ∗ ← [ − ( B ∗ / 2 − B ) , B ∗ / 2 − B ] m 2e^* \leftarrow [-(B^*/2-B), B^*/2-B]^m2e _[(B/2B),B/2B]m . According to Smudging Lemma, whenB / B ∗ = negl ( κ ) B/B^* = negl(\kappa)B/B=When n e g l ( κ ) , 2 e ′ 2e'in the simulated view and the real view2e _ distribution is statistically indistinguishable.

Using the above protocol ⟨ P , V ⟩ LWE \langle P,V \rangle_{LWE}P,VLW E _, can construct multiple ZKP protocols on other related languages, and then use the FS heuristic to obtain NIZKP under the RO model. Assemble them into the semi-malicious secure MPC protocol based on TFHE, and force all participants to implement the protocol honestly, so as to realize the maliciously secure MPC protocol. In addition, it needs to be proved that the gap does not affect the security of the protocol.

Guess you like

Origin blog.csdn.net/weixin_44885334/article/details/131656974