高级搜索

留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

FINAL全同态加密方案的自举优化技术

赵秀凤 吴蒙 宋巍涛

赵秀凤, 吴蒙, 宋巍涛. FINAL全同态加密方案的自举优化技术[J]. 电子与信息学报, 2025, 47(7): 2183-2193. doi: 10.11999/JEIT241036
引用本文: 赵秀凤, 吴蒙, 宋巍涛. FINAL全同态加密方案的自举优化技术[J]. 电子与信息学报, 2025, 47(7): 2183-2193. doi: 10.11999/JEIT241036
ZHAO Xiufeng, WU Meng, SONG Weitao. Bootstrapping Optimization Techniques for the FINAL Fully Homomorphic Encryption Scheme[J]. Journal of Electronics & Information Technology, 2025, 47(7): 2183-2193. doi: 10.11999/JEIT241036
Citation: ZHAO Xiufeng, WU Meng, SONG Weitao. Bootstrapping Optimization Techniques for the FINAL Fully Homomorphic Encryption Scheme[J]. Journal of Electronics & Information Technology, 2025, 47(7): 2183-2193. doi: 10.11999/JEIT241036

FINAL全同态加密方案的自举优化技术

doi: 10.11999/JEIT241036 cstr: 32379.14.JEIT241036
基金项目: 国家密码科学基金(2025NCSF02044),先进计算与智能工程(国家级)实验室基金(2023-LYJJ-01-002)
详细信息
    作者简介:

    赵秀凤:女,博士,副教授,研究方向为全同态密码、格密码、密码协议等

    吴蒙:男,硕士生,研究方向为全同态加密

    宋巍涛:男,博士,副教授,研究方向为全同态密码、云计算等

    通讯作者:

    吴蒙 18733233053@163.com

  • 中图分类号: TN918.1

Bootstrapping Optimization Techniques for the FINAL Fully Homomorphic Encryption Scheme

Funds: The National Cryptologic Science Fund of China (2025NCSF02044), The Fund of Laboratory for Advanced Computing and Intelligence Engineering (2023-LYJJ-01-002)
  • 摘要: 自举是实现全同态加密的有效方法,同时也是影响全同态加密效率的关键环节。FINAL方案是2022年亚密会提出的全同态密码方案,比TFHE方案自举速度快28%,可以进行高效的同态布尔运算。自举主要包括盲旋转算法和密钥转换算法。针对盲旋转算法,该文提出累加器压缩方法,即对基于容错学习(LWE)的加密方案的密钥生成引入块二进制分布,利用块二进制密钥特性,使得密钥的每个分块只需进行1次外积运算,减少盲旋转算法所需的外积数量。针对密钥转换算法,给出了密钥复用技术,即在生成NGS密钥时复用LWE密钥且复用部分不参与密钥转换的密钥生成,减小了密钥转换密钥规模,进而减少密钥转换算法运算次数,提高了密钥转换算法的效率。分析表明,在安全性相当的情况下,优化的FINAL方案自举所需要执行的外积数量和快速傅里叶变换的数量分别由610和3 940减少到305和1 970,数量上优化50%。密钥转换密钥规模由11 264减少到4 554,密钥转换中标量乘法以及标量加法的运算次数大约由13.8×106减少到5.6×106,密钥转换的密钥规模和计算开销均优化约60%。
  • 图  1  优化前后的密钥转换

    图  2  优化前后的密钥转换密钥

    图  3  c的系数向量

    1  自举算法

     输入:盲旋转密钥BRK,
        加密消息为$m$的LWE密文${\boldsymbol{c}} = (b,{\boldsymbol{a}}) \in \mathbb{Z}_q^{n + 1}$,
        密钥转换密钥${\text{ks}}{{\text{k}}_{{\text{NTRU}} \to {\text{LWE}}}}$。
     输出:新的LWE密文${\boldsymbol{c}}'$,加密消息为$m$。
     (1) $ \left\lceil {2N\cdot {\boldsymbol{c}}/q} \right\rfloor =(\bar b,\bar a_0,\bar a_1,\cdots,\bar a_{n-1})$
     (2) $ {\mathrm{ACC}}\leftarrow\left\lceil {Q/8} \right\rfloor\cdot X^{(N/2)+\bar b} \cdot \displaystyle\sum\nolimits_{i=0}^{N-1}X^i $
     (3) for $0 \le j < n$ do
     (4)  ${\text{ACC}} \leftarrow {\text{ACC}} + {\text{[ACC}} \cdot ({X^{{{\bar a}_j}}} - 1){\text{]}} \odot {\text{BR}}{{\text{K}}_i}$    (4)
     (5)end for
     (6) $ {\mathrm{ACC}}\leftarrow {\mathrm{ACC}}+\left\lceil{Q/8} \right\rfloor \cdot \displaystyle\sum\nolimits_{i=0}^{N-1}X^i $
     (7) ${\text{ACC}} \leftarrow {\text{ModSwitch}}({\text{ACC}})$
     (8) ${\boldsymbol{c}}' \leftarrow {\text{KeySwitc}}{{\text{h}}_{{\text{NTRU}} \to {\text{LWE}}}}({\text{ACC}},{\text{ks}}{{\text{k}}_{{\text{NTRU}} \to {\text{LWE}}}})$
     (9) return ${\boldsymbol{c}}'$
    下载: 导出CSV

    2  NewBlindRotate$ ({\text{BRK}},{\boldsymbol{c}})$

     输入:盲旋转密钥BRK和一个LWE密文${\boldsymbol{c}} = (b,{\boldsymbol{a}}) \in \mathbb{Z}_q^{n + 1}$
     输出:NTRU(NGS)密文$c = g/f + \epsilon + \varDelta {{\cdot m}} \in {R_{{q}}} $
     (1) $ \left\lceil {2N\cdot {\boldsymbol{c}}/q} \right\rfloor =(\bar b,\bar a_0,\bar a_1,\cdots,\bar a_{n-1})$
     (2) $ {\mathrm{ACC}}\leftarrow\left\lceil {Q/8} \right\rfloor\cdot X^{(N/2)+\bar b} \cdot \displaystyle\sum\nolimits_{i=0}^{N-1}X^i$
     (3) for $0 \le j < k$ do
     (4)  $ {\text{ACC}} \leftarrow {\text{ACC}} + {\text{ACC}} \odot [\mathop \sum \nolimits_{i \in {I_j}} ({X^{{{\bar a}_i}}} - 1) \cdot {\text{BR}}{{\text{K}}_i}] $   (6)
     (5) end for
     (6) return ACC
    下载: 导出CSV

    表  1  盲旋转算法的性能分析

    方案 FFT 标量乘法
    FINAL[14] $(\ell + 1) \cdot n$ $\ell \cdot N\cdot n$
    本文方案 $(\ell + 1) \cdot k$ $\ell \cdot N\cdot n$
    下载: 导出CSV

    表  2  密钥转换的性能分析

    方案标量乘法标量加法密钥转换密钥
    FINAL[14]$N \cdot L \cdot (n + 1)$$(N \cdot L - 1) \cdot (n + 1)$$N \cdot L$
    本文方案$(N - n) \cdot L \cdot (n + 1) + n$$((N - n) \cdot L - 1) \cdot (n + 1) + n$$(N - n) \cdot L$
    下载: 导出CSV

    3  NewBoot(BRK,${\text{ks}}{{\text{k}}_{{\text{NTRU}} \to {\text{LWE}}}},{\boldsymbol{c}}{\text{)}}$

     输入: 盲旋转密钥BRK,密钥转换密钥${\text{ks}}{{\text{k}}_{{\text{NTRU}} \to {\text{LWE}}}}$, LWE
     密文${\boldsymbol{c}} = (b,{\boldsymbol{a}}) \in \mathbb{Z}_q^{n + 1}$。
     输出: LWE密文${\boldsymbol{c}}' \in \mathbb{Z}_q^{n + 1}$。
     (1) ${\text{ACC}} \leftarrow {\text{NewBlindRotate}}({\text{BRK}},{\boldsymbol{c}})$
     (2) ACC$\leftarrow {\mathrm{AAC}}+\left\lceil {Q/8} \right\rfloor \cdot \displaystyle\sum\nolimits_{i=0}^{N-1}X^i $
     (3) ${\text{ACC}} \leftarrow {\text{ModSwitch}}({\text{ACC}})$
     (4) ${\boldsymbol{c}}' \leftarrow {\text{NewKeySwitc}}{{\text{h}}_{{\text{NTRU}} \to {\text{LWE}}}}({\text{ks}}{{\text{k}}_{{\text{NTRU}} \to {\text{LWE}}}},{\text{ACC}})$
    下载: 导出CSV

    表  3  安全性分析

    nNlkqMitMPrimalDual
    6101 024161092 683170125134
    6101 024230592 683135124131
    6101 024320492 683113123129
    6101 024415392 68398122128
    6101 024512292 68388121126
    下载: 导出CSV

    表  4  原FINAL方案的参数设置

    方案nqNQ(B1, n1)(B2, n2)Bksk${\ell _1}$${\ell _2}$
    FINAL[14]61092 6831 024912 829(8,140)(16,470)375
    下载: 导出CSV

    表  5  盲旋转算法的性能比较

    方案FFT标量乘法
    FINAL[14]3 940(×1)3 409 920(×1)
    本文方案1 970(×0.5)3 409 920(×1)
    下载: 导出CSV

    表  6  密钥转换算法的性能比较

    方案标量乘法标量加法密钥转换密钥
    FINAL[14]6 882 3046 881 69311 264
    本文方案2 783 1042 782 4934 554
    下载: 导出CSV
  • [1] GENTRY C. Fully homomorphic encryption using ideal lattices[C]. The Forty-First Annual ACM Symposium on Theory of Computing, Bethesda, USA, 2009: 169–178. doi: 10.1145/1536414.1536440.
    [2] BRAKERSKI Z, GENTRY C, and VAIKUNTANATHAN V. (Leveled) fully homomorphic encryption without bootstrapping[J]. ACM Transactions on Computation Theory (TOCT), 2014, 6(3): 13. doi: 10.1145/2633600.
    [3] BRAKERSKI Z. Fully homomorphic encryption without modulus switching from classical GapSVP[C]. The 32nd Annual Cryptology Conference on Advances in Cryptology, Santa Barbara, USA, 2012: 868–886. doi: 10.1007/978-3-642-32009-5_50.
    [4] FAN Junfeng and VERCAUTEREN F. Somewhat practical fully homomorphic encryption[EB/OL]. https://eprint.iacr.org/2012/144, 2012.
    [5] GENTRY C, SAHAI A, and WATERS B. Homomorphic encryption from learning with errors: Conceptually-simpler, asymptotically-faster, attribute-based[C]. The 33rd Annual Cryptology Conference on Advances in Cryptology, Santa Barbara, USA, 2013: 75–92. doi: 10.1007/978-3-642-40041-4_5.
    [6] CHEON J H, KIM A, KIM M, et al. Homomorphic encryption for arithmetic of approximate numbers[C]. The 23rd International Conference on the Theory and Applications of Cryptology and Information Security Advances in Cryptology, Hong Kong, China, 2017: 409–437. doi: 10.1007/978-3-319-70694-8_15.
    [7] DUCAS L and MICCIANCIO D. FHEW: Bootstrapping homomorphic encryption in less than a second[C]. The 34th Annual International Conference on the Theory and Applications of Cryptographic Techniques Advances in Cryptology, Sofia, Bulgaria, 2015: 617–640. doi: 10.1007/978-3-662-46800-5_24.
    [8] CHILLOTTI I, GAMA N, GEORGIEVA M, et al. TFHE: Fast fully homomorphic encryption over the torus[J]. Journal of Cryptology, 2020, 33(1): 34–91. doi: 10.1007/s00145-019-09319-x.
    [9] CARPOV S, IZABACHÈNE M, and MOLLIMARD V. New techniques for multi-value input homomorphic evaluation and applications[C]. The Cryptographers’ Track at the RSA Conference 2019 Topics in Cryptology, San Francisco, USA, 2019: 106–126. doi: 10.1007/978-3-030-12612-4_6.
    [10] CHILLOTTI I, LIGIER D, ORFILA J B, et al. Improved programmable bootstrapping with larger precision and efficient arithmetic circuits for TFHE[C]. The 27th International Conference on the Theory and Application of Cryptology and Information Security Advances in Cryptology, Singapore, Singapore, 2021: 670–699. doi: 10.1007/978-3-030-92078-4_23.
    [11] GUIMARÃES A, BORIN E, and ARANHA D F. Revisiting the functional bootstrap in TFHE[J]. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2021, 2021(2): 229–253. doi: 10.46586/tches.v2021.i2.229-253.
    [12] CHEN Hao, CHILLOTTI I, and SONG Y. Multi-key homomorphic encryption from TFHE[C]. The 25th International Conference on the Theory and Application of Cryptology and Information Security Advances in Cryptology, Kobe, Japan, 2019: 446–472. doi: 10.1007/978-3-030-34621-8_16.
    [13] KWAK H, MIN S, and SONG Y. Towards practical multi-key TFHE: Parallelizable, key-compatible, quasi-linear complexity[C]. The 27th IACR International Conference on Practice and Theory of Public-Key Cryptography Public-Key Cryptography, Sydney, Australia, 2024: 354–385. doi: 10.1007/978-3-031-57728-4_12.
    [14] BONTE C, ILIASHENKO I, PARK J, et al. FINAL: Faster FHE instantiated with NTRU and LWE[C]. The 28th International Conference on the Theory and Application of Cryptology and Information Security Advances in Cryptology, Taipei, China, 2022: 188–215. doi: 10.1007/978-3-031-22966-4_7.
    [15] KLUCZNIAK K. NTRU-v-um: Secure fully homomorphic encryption from NTRU with small modulus[C]. The 2022 ACM SIGSAC Conference on Computer and Communications Security, Los Angeles, USA, 2022: 1783–1797. doi: 10.1145/3548606.3560700.
    [16] LEE Y, MICCIANCIO D, KIM A, et al. Efficient FHEW bootstrapping with small evaluation keys, and applications to threshold homomorphic encryption[C]. The 42nd Annual International Conference on the Theory and Applications of Cryptographic Techniques Advances in Cryptology, Lyon, France, 2023: 227–256. doi: 10.1007/978-3-031-30620-4_8.
    [17] LEE C, MIN S, SEO J, et al. Faster TFHE bootstrapping with block binary keys[C]. The 2023 ACM Asia Conference on Computer and Communications Security, Melbourne, Australia, 2023: 2–13. doi: 10.1145/3579856.3595804.
    [18] XIANG Binwu, ZHANG Jiang, DENG Yi, et al. Fast blind rotation for bootstrapping FHEs[C]. The 43rd Annual International Cryptology Conference on Advances in Cryptology, Santa Barbara, USA, 2023: 3–36. doi: 10.1007/978-3-031-38551-3_1.
    [19] MA Shihe, HUANG Tairong, WANG Anyu, et al. Accelerating BGV bootstrapping for large p using null polynomials over $ \mathbb{Z}_{p^{e}} $[C]. The 43rd Annual International Conference on the Theory and Applications of Cryptographic Techniques Advances in Cryptology, Zurich, Switzerland, 2024: 403–432. doi: 10.1007/978-3-031-58723-8_14.
    [20] WANG Ruida, WEN Yundi, LI Zhihao, et al. Circuit bootstrapping: Faster and smaller[C]. The 43rd Annual International Conference on the Theory and Applications of Cryptographic Techniques Advances in Cryptology, Zurich, Switzerland, 2024: 342–372. doi: 10.1007/978-3-031-58723-8_12.
    [21] PEIKERT C. A decade of lattice cryptography[J]. Foundations and Trends® in Theoretical Computer Science, 2016, 10(4): 283–424. doi: 10.1561/0400000074.
    [22] GOLDWASSER S, KALAI Y, PEIKERT C, et al. Robustness of the learning with errors assumption[C]. Proceedings of the Innovations in Computer Science–ICS 2010, Beijing, China, 2010: 230–240.
    [23] ALBRECHT M R. On dual lattice attacks against small-secret LWE and parameter choices in HElib and SEAL[C]. The 36th Annual International Conference on the Theory and Applications of Cryptographic Techniques Advances in Cryptology, Paris, France, 2017: 103–129. doi: 10.1007/978-3-319-56614-6_4.
    [24] MAY A. How to meet ternary LWE keys[C]. The 41st Annual International Cryptology Conference on Advances in Cryptology, 2021: 701–731. doi: 10.1007/978-3-030-84245-1_24.
    [25] ALBRECHT M R, PLAYER R, and SCOTT S. On the concrete hardness of Learning with Errors[J]. Journal of Mathematical Cryptology, 2015, 9(3): 169–203. doi: 10.1515/jmc-2015-0016.
    [26] CHEN Yuanmi and NGUYEN P Q. BKZ 2.0: Better lattice security estimates[C]. The 17th International Conference on the Theory and Application of Cryptology and Information Security Advances in Cryptology, Seoul, South Korea, 2011: 1–20. doi: 10.1007/978-3-642-25385-0_1.
    [27] GUO Qian and JOHANSSON T. Faster dual lattice attacks for solving LWE with applications to CRYSTALS[C]. The 27th International Conference on the Theory and Application of Cryptology and Information Security Advances in Cryptology, Singapore, Singapore, 2021: 33–62. doi: 10.1007/978-3-030-92068-5_2.
  • 加载中
图(3) / 表(9)
计量
  • 文章访问数:  202
  • HTML全文浏览量:  117
  • PDF下载量:  34
  • 被引次数: 0
出版历程
  • 收稿日期:  2024-11-22
  • 修回日期:  2025-05-19
  • 网络出版日期:  2025-06-24
  • 刊出日期:  2025-07-22

目录

    /

    返回文章
    返回