高级搜索

留言板

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

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

面向环面全同态加密的基于FPGA专用自举加速器设计与实现

张冰玥,  贾博宇,  陈弈,  贾小涛

张冰玥, 贾博宇, 陈弈, 贾小涛. 面向环面全同态加密的基于FPGA专用自举加速器设计与实现[J]. 电子与信息学报. doi: 10.11999/JEIT260618
引用本文: 张冰玥, 贾博宇, 陈弈, 贾小涛. 面向环面全同态加密的基于FPGA专用自举加速器设计与实现[J]. 电子与信息学报. doi: 10.11999/JEIT260618
ZHANG Bingyue, JIA Boyu, CHEN Yi, JIA Xiaotao. Design and Implementation of an FPGA-Based Bootstrapping Accelerator for Torus Fully Homomorphic Encryption[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT260618
Citation: ZHANG Bingyue, JIA Boyu, CHEN Yi, JIA Xiaotao. Design and Implementation of an FPGA-Based Bootstrapping Accelerator for Torus Fully Homomorphic Encryption[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT260618

面向环面全同态加密的基于FPGA专用自举加速器设计与实现

doi: 10.11999/JEIT260618 cstr: 32379.14.JEIT260618
详细信息
    作者简介:

    张冰玥:女,硕士,研究方向为FPGA加速器设计、隐私计算等

    贾博宇:男,硕士,研究方向为计算机体系结构、隐私计算等

    陈弈:男,博士,研究方向为区块链系统、边缘计算、隐私计算等

    贾小涛:男,副教授,研究方向为领域专用计算及存内计算架构等

    通讯作者:

    贾小涛 jiaxt@buaa.edu.cn

  • 中图分类号: TP309.7; TP332.3

Design and Implementation of an FPGA-Based Bootstrapping Accelerator for Torus Fully Homomorphic Encryption

  • 摘要: 环面全同态加密(Torus Fully Homomorphic Encryption, TFHE)支持在密文域上直接评估布尔电路,是隐私计算领域的重要密码学技术。然而,TFHE在密文运算过程中会产生噪声累积,需通过自举操作刷新密文噪声。由于自举过程涉及大规模多项式运算和密钥数据访问,其计算复杂度高、访存开销大,已成为制约TFHE实用化部署的主要性能瓶颈。针对上述问题,本文设计并实现了一种基于现场可编程门阵列(Field-Programmable Gate Array, FPGA)的TFHE自举专用硬件加速器。该加速器采用全硬件化流水数据通路,可在无需中央处理器(Central Processing Unit, CPU)参与核心计算的情况下独立完成自举操作流程;同时设计了数论变换(Number Theoretic Transform, NTT)加速模块,以提高多项式乘法运算效率并降低自举延迟。针对自举密钥数据规模庞大、片外访存压力高的特点,本文进一步引入批处理机制,以提升密钥数据复用率和系统吞吐量,在保持合理单次自举延迟的同时,显著提升了批量自举吞吐率。本设计在Xilinx Alveo U280 FPGA平台上完成部署与验证,实验结果表明,在300 MHz工作频率下,其可在3.9 ms内完成8个密文的自举操作,平均单个密文自举延迟为0.49 ms。与现有CPU和GPU自举加速方案相比,本文设计在批处理吞吐能力方面分别实现约21.8倍和6.0倍提升。
  • 图  1  TFHE可编程自举过程

    图  2  自举加速器硬件架构图

    图  3  EWM模块

    图  4  约减模块

    图  5  自举加速器软硬件交互示意图

    图  6  加速器物理布局示意图

    表  1  TFHE算法相关符号

    符号 定义
    $ \lambda $ 加密参数
    $ Z $ 整数集
    $ R $ 实数集
    $ B $ 二进制数集,即{0,1}
    $ T $ 实数环面,即全部实数模1后的集合
    $ {\boldsymbol{T}}_{\boldsymbol{N}}[\boldsymbol{X}] $ N-1阶多项式在$ \boldsymbol{R}[\boldsymbol{X}]/({\boldsymbol{X}}^{\boldsymbol{N}}+\mathbf{1}) $模1下的表示
    $ {\boldsymbol{B}}_{\boldsymbol{N}}[\boldsymbol{X}] $ N-1阶多项式在$ \boldsymbol{R}[\boldsymbol{X}]/({\boldsymbol{X}}^{\boldsymbol{N}}+\mathbf{1}) $模1下的表示,
    系数来于B
    下载: 导出CSV

    表  2  TFHE参数设置

    定义数值
    TLWE密文维度n500
    TRLWE密文维度k1
    多项式阶数N1024
    多项式分解基数$ \boldsymbol{h} $10
    多项式分解个数l2
    下载: 导出CSV

    表  3  不同TFHE自举加速方案对比

    方案平台频率(MHz)自举延迟(ms)吞吐率(PBS/ms)资源(LUT, FF, DSP, BRAM)功耗(w)
    TFHE[6]CPU290011.50.09--
    cuFHE[7]GPU170011.30.34--
    MATCHA[8]ASIC20000.1610-40
    HOGE[10]FPGA2951.60.63216K 238K 1024 12.9Mb35.5
    FPT[9]FPGA2000.7428.4595K 1024K 5980 14.5Mb99
    UNIT[11]FPGA2002.077-377K 316K 6060 18.3Mb27.5
    本文设计FPGA3003.92.05334K 353K 1590 21.2Mb37.7
    下载: 导出CSV
  • [1] YAO Yifan, DUAN Jinhao, XU Kaidi, et al. A survey on large language model (LLM) security and privacy: The Good, The Bad, and The Ugly[J]. High-Confidence Computing, 2024, 4(2): 100211. doi: 10.1016/j.hcc.2024.100211.
    [2] CHEN Kang, ZHOU Xiuze, LIN Yuanguo, et al. A survey on privacy risks and protection in large language models[J]. Journal of King Saud University Computer and Information Sciences, 2025, 37(7): 163. doi: 10.1007/s44443-025-00177-1.
    [3] GENTRY C. Fully homomorphic encryption using ideal lattices[C]. Proceedings of the Forty-first Annual ACM Symposium on Theory of Computing, Bethesda, USA, 2009: 169–178. doi: 10.1145/1536414.1536440.
    [4] 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.
    [5] CHILLOTTI I, JOYE M, and PAILLIER P. Programmable bootstrapping enables efficient homomorphic inference of deep neural networks[C]. 5th International Symposium Cyber Security Cryptography and Machine Learning, Be’er Sheva, Israel, 2021: 1–19. doi: 10.1007/978-3-030-78086-9_1.
    [6] 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.
    [7] DAI W. cuFHE: CUDA-accelerated fully homomorphic encryption library[EB/OL]. https://github.com/vernamlab/cuFHE. (查阅网上资料,未找到本条文献信息,请确认).
    [8] JIANG Lei, LOU Qian, and JOSHI N. MATCHA: A fast and energy-efficient accelerator for fully homomorphic encryption over the torus[C]. Proceedings of the 59th ACM/IEEE Design Automation Conference, San Francisco, USA, 2022: 235–240. doi: 10.1145/3489517.3530435.
    [9] VAN BEIRENDONCK M, D'ANVERS J P, TURAN F, et al. FPT: A fixed-point accelerator for torus fully homomorphic encryption[C]. Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, Copenhagen, Denmark, 2023: 741–755. doi: 10.1145/3576915.3623159.
    [10] MATSUOKA K, BIAN Song, and SATO T. HOGE: Homomorphic gate on an FPGA[C]. Proceedings of the 29th Asia and South Pacific Design Automation Conference, Incheon, Republic of Korea, 2024: 325–332. doi: 10.1109/ASP-DAC58780.2024.10473861.
    [11] ZHANG Yuying, SINHA S, XU Jiang, et al. UNIT: A highly unified and memory-efficient FPGA-based accelerator for torus FHE[C]. 2025 Design, Automation & Test in Europe Conference (DATE), Lyon, France, 2025: 1–7. doi: 10.23919/DATE64628.2025.10993051.
    [12] ZHANG Jian, CUI Aijiao, and JIN Yier. Acceleration of the bootstrapping in TFHE by FPGA[J]. IEEE Transactions on Emerging Topics in Computing, 2025, 13(2): 496–511. doi: 10.1109/TETC.2024.3433473.
    [13] XIAO Yu, LIU Fenghao, KU Yute, et al. GPU acceleration for FHEW/TFHE bootstrapping[J]. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2024, 2025(1): 314–339. doi: 10.46586/tches. v2025. i1.314-339.
    [14] 李冰, 刘怀骏, 张伟功. 魔方派: 面向全同态加密的存算模运算加速器设计[J]. 电子与信息学报, 2023, 45(9): 3302–3310.

    LI Bing, LIU Huaijun, and ZHANG Weigong. M2PI: Processing-in-memory modular computing accelerator for full homomorphic encryption[J]. Journal of Electronics & Information Technology, 2023, 45(9): 3302–3310.
    [15] BAILEY D H. FFTs in external or hierarchical memory[C]. Proceedings of the 1989 ACM/IEEE Conference on Supercomputing, Reno, USA, 1989: 234–242. doi: 10.1145/76263.76288.
    [16] LONGA P and NAEHRIG M. Speeding up the number theoretic transform for faster ideal lattice-based cryptography[C]. 15th International Conference Cryptology and Network Security, Milan, Italy, 2016: 124–139. doi: 10.1007/978-3-319-48965-0_8.
    [17] REGEV O. The learning with errors problem (invited survey)[C]. Proceedings of the 2010 IEEE 25th Annual Conference on Computational Complexity, Cambridge, USA, 2010: 191–204. doi: 10.1109/CCC.2010.26.
    [18] TRAMA D, BOUDGUIGA A, CLET P E, et al. Designing a general-purpose 8-bit (T)FHE processor abstraction[J]. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2025, 2025(2): 535–578. doi: 10.46586/tches.v2025.i2.535-578.
    [19] XIA Han and WANG Mingsheng. Efficient and compact full-domain functional bootstrapping via subring folding[J]. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2025, 2025(4): 737–762. doi: 10.46586/tches.v2025.i4.737-762.
    [20] 何仁华, 李冰, 杜一博, 等. 基于容错学习问题的全同态加密算法和硬件优化综述[J]. 计算机研究与发展, 2025, 62(7): 1738–1753. doi: 10.7544/issn1000-1239.202331022.

    HE Renhua, LI Bing, DU Yibo, et al. Survey on algorithm and hardware optimization to LWE-based fully homomorphic encryption[J]. Journal of Computer Research and Development, 2025, 62(7): 1738–1753. doi: 10.7544/issn1000-1239.202331022.
    [21] 施佺, 韩赛飞, 黄新明, 等. 面向全同态加密的有限域FFT算法FPGA设计[J]. 电子与信息学报, 2018, 40(1): 57–62. doi: 10.11999/JEIT170312.

    SHI Quan, HAN Saifei, HUANG Xinming, et al. Design of finite field FFT for fully homomorphic encryption based on FPGA[J]. Journal of Electronics & Information Technology, 2018, 40(1): 57–62. doi: 10.11999/JEIT170312.
    [22] ZAMAN M A, KHAN M B, AHMAD W, et al. A lightweight and hardware-efficient NTT FPGA accelerator for FHE applications[J]. IEEE Transactions on Circuits and Systems II: Express Briefs, 2026, 73(1): 78–82. doi: 10.1109/TCSII.2025.3633181.
    [23] DENG Xianglong, FAN Shengyu, HU Zhicheng, et al. Trinity: A general purpose FHE accelerator[C]. 2024 57th IEEE/ACM International Symposium on Microarchitecture, Austin, USA, 2024: 338–351. doi: 10.1109/MICRO61859.2024.00033.
    [24] 边松, 毛苒, 朱永清, 等. 全同态加密软硬件加速研究进展[J]. 电子与信息学报, 2024, 46(7): 1790–1805. doi: 10.11999/JEIT230448.

    BIAN Song, MAO Ran, ZHU Yongqing, et al. A survey on software-hardware acceleration for fully homomorphic encryption[J]. Journal of Electronics & Information Technology, 2024, 46(7): 1790–1805. doi: 10.11999/JEIT230448.
  • 加载中
图(6) / 表(3)
计量
  • 文章访问数:  12
  • HTML全文浏览量:  1
  • PDF下载量:  0
  • 被引次数: 0
出版历程
  • 修回日期:  2026-10-16
  • 录用日期:  2026-10-16
  • 网络出版日期:  2026-10-25

目录

    /

    返回文章
    返回