参考文献:
- [NLV11] Naehrig M, Lauter K, Vaikuntanathan V. Can homomorphic encryption be practical?[C]//Proceedings of the 3rd ACM workshop on Cloud computing security workshop. 2011: 113-124.
- [MJS+16] Méaux P, Journault A, Standaert F X, et al. Towards stream ciphers for efficient FHE with low-noise ciphertexts[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 I 35. Springer Berlin Heidelberg, 2016: 311-343.
- [CDK+21] Chen H, Dai W, Kim M, et al. Efficient homomorphic conversion between (ring) LWE ciphertexts[C]//International Conference on Applied Cryptography and Network Security. Cham: Springer International Publishing, 2021: 460-479.
- [CHK+21] Cho J, Ha J, Kim S, et al. Transciphering framework for approximate homomorphic encryption[C]//International Conference on the Theory and Application of Cryptology and Information Security. Cham: Springer International Publishing, 2021: 640-669.
- [DGG+21] Dobraunig C, Grassi L, Guinet A, et al. Ciminion: symmetric encryption based on toffoli-gates over large finite fields[C]//Annual International Conference on the Theory and Applications of Cryptographic Techniques. Cham: Springer International Publishing, 2021: 3-34.
- [HKL+22] Ha J, Kim S, Lee B H, et al. Rubato: Noisy ciphers for approximate homomorphic encryption[C]//Annual International Conference on the Theory and Applications of Cryptographic Techniques. Cham: Springer International Publishing, 2022: 581-610.
- [DGH+23] Dobraunig C, Grassi L, Helminger L, et al. Pasta: A Case for Hybrid Homomorphic Encryption[J]. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2023, 2023(3): 30-73.
文章目录
HHE
[NLV11] 实现了 BV 算法,研究同态加密的实用性。为了解决 HE 密文规模太大的问题,他们提出了 Hybrid Homomorphic Encryption / Transciphering Framework,组合使用对称加密(SE)和同态加密(HE)。
对于 Client-Server Model,如图所示:
HHE 关注的场景:
- 2PC 场景(client + server),client 的计算/通信能力受限(云计算),或者 server 具有私有函数(机器学习)
- client 生成 SE 密钥,以及 HE 公私钥,发布公钥
- client 使用 SE 加密数据,并使用 HE 加密 SE 的密钥,发送两者给 server
- server 先同态解密 SE 密文,然后同态计算,最后发送 HE 密文给 client
- client 解密 HE 密文,获得计算结果
- MPC 场景(data providers + key holders + evaluators),可用于数据的秘密收集(物联网)
- key holders(分布式)生成 HE 公私钥,发布公钥
- data providers 生成各自的 SE 密钥,使用 SE 加密数据,并使用 HE 加密 SE 的密钥,发送两者给 evaluators
- evaluators 先同态解密 SE 密文,然后同态计算,最后发送 HE 密文给 key holders
- key holders(分布式)解密 HE 密文,获得计算结果
LWE-Native Encryption
[CDK+21] 使用 Galois 自同构实现了 RLWE 密文的相位某些系数的消除,于是可以把 LWE 密文嵌入到 RLWE 密文,然后使用 FFT-style 算法实现了多个 LWE 密文的打包(LWEs-to-RLWE)
基于此,[CDK+21] 建议在云计算场景中,使用对称版本的 Regev 加密方案。由于 LWE-based 都是 FHE 友好的,可以较为自然地在 RLWE 密文下同态解密(只需计算线性部分,不必纠错)。
- client 使用 PRF 生成各个 LWE 密文的随机带, a j = P R F ( s e e d , j ) ∈ Z q N a_j = PRF(seed, j) \in \mathbb Z_q^N aj=PRF(seed,j)∈ZqN
- client 将消息 m j ∈ Z t m_j \in \mathbb Z_t mj∈Zt 随机编码为 μ j ∈ Z q \mu_j \in \mathbb Z_q μj∈Zq(携带高斯噪声),计算 b j = ⟨ a j , s ⟩ + μ j b_j = \langle a_j, s\rangle + \mu_j bj=⟨aj,s⟩+μj
- client 发送的 SE 密文形如 ( s e e d , b 0 , b 1 , ⋯ ) (seed, b_0, b_1, \cdots) (seed,b0,b1,⋯),具有较低的 ciphertext expansion factor(但是 b j b_j bj 带噪,密文扩张总是不可避免),具体为 log q log t + ∣ s e e d ∣ \frac{\log q}{\log t} + |seed| logtlogq+∣seed∣
- server 同态线性解密,获得 μ j \mu_j μj 带噪的消息编码,然后直接同态运算(需要 Regev 本身就具有足够的 Levels,也就是 log q ≫ log t \log q \gg \log t logq≫logt)
- server 将得到的 RLWE 密文降低到最低的 Level,返回给 client
Filter Permutator & FLIP
[MJS+16] 考虑了两种对称加密,
- 分组密码(Block ciphers):各个消息分组上,解密电路的深度是固定的,但是由于使用了大轮数迭代,乘法深度很高。
- 流密码(Stream Ciphers):初始的消息分组,解密电路的深度很小,但随着密钥流的生成,乘法深度会越来越高。
综合考虑两者的优缺点,[MJS+16] 组合它们设计了新的流密码,即满足分组密码的常数深度,又满足流密码的较浅深度。
Filter Permutator
首先,他们提出了一个新的流密码结构,被称为 Filter Permutator Construction,它包含三部分:密钥寄存器、随机置换生成器(randomized linear layers)、滤波器(简单的非线性运算)。如图所示,
密钥流的每一个比特都是根据 F ∘ P i ( K ) F \circ P_i(K) F∘Pi(K) 计算出来的,电路深度是常数的,并且没有大轮数迭代。
FLIP
接着 [MJS+16] 构造了一族 Filter Permutators,称之为 FLIP。这个流密码是工作在布尔值 Z 2 \mathbb Z_2 Z2 上的(如果 FHE 的自然明文空间是 Z t , t ≥ 3 \mathbb Z_t, t\ge 3 Zt,t≥3,那么布尔电路的乘法深度会很高)。
首先,他们定义了布尔函数的直和,并证明了它可以将两个函数的 Non Linearity, Resiliency, Algebraic Immunity, Fast Algebraic Immunity 等安全属性组合并增强(细节请看原文)。
然后定义了三种简单的布尔函数,并给出了它们的安全属性(略):
[MJS+16] 使用 Filter Permutator Construction 去构造流密码,使用的滤波器 F : Z 2 n 1 + n 2 + n 3 → Z 2 F: \mathbb Z_2^{n_1+n_2+n_3} \to \mathbb Z_2 F:Z2n1+n2+n3→Z2 是上述三种布尔函数的直和,令 n 1 , n 2 , n , k , n 3 = n k ( k + 1 ) 2 n_1,n_2,n,k,n_3 = \frac{nk(k+1)}{2} n1,n2,n,k,n3=2nk(k+1) 是合适的整数,
F ( x 0 , ⋯ , x n 1 + n 2 + n 3 − 1 ) = L n 1 ⊕ Q n 2 / 2 ⊕ ⨁ i = 1 n T k F(x_0,\cdots,x_{n_1+n_2+n_3-1}) = L_{n_1} \oplus Q_{n_2/2} \oplus \bigoplus_{i=1}^{n} T_k F(x0,⋯,xn