针对全同态加密(fully homomorphic encryption,FHE)中多项式乘法计算时间较长的问题,设计了1种硬件乘法结构对其进行加速.首先,结合2种硬件模加结构完成可配置的硬件模加单元设计,降低了硬件资源消耗;然后,利用特殊模数法对Barrett约减法进行改进,缩短了模约减计算时间,并将其用于改进优化的常数-几何数论变换(constant-geometrynumber-theoretic transform,CG-NTT)算法;最后,在现场可编程门阵列(field-programmable gate array,FPGA)平台上完成乘法模块设计.实验结果表明,使用硬件乘法结构能够减少96.26%的多项式乘法计算时间,并且查找表(look-up-table,LUT)的资源消耗能够减少50.71%$\sim$93.97%.
Aiming at the problem of long computation time of polynomial multiplication in fully homomorphic encryption (FHE), a hardware multiplication structure is designed to accelerate it. First, the design of the configurable hardware modular addition unit is completed by combining the two hardware modular addition structures. Then Barrett reduction method is improved through the utilization of a special modulus method, which serves to accelerate the modular reduction computation time. The optimized reduction method is then used to improve the optimized constant-geometry number-theoretic transform (CG-NTT) algorithm. At last, complete the design of the multiplication module on a field-programmable gate array (FPGA) platform. The experimental results show that by using the hardware multiplication structure, the polynomial multiplication computation time can be reduced by 96.26% and the resource consumption of look-up-table (LUT) can be reduced by 50.71% to 93.97%.
[1] 边松, 毛苒, 朱永清, 等. 全同态加密软硬件加速研究进展[J]. 电子与信息学报, 2024, 46(5): 1790-1805.
[2] 徐宇钦, 钱权. 基于区块链的数据版权保护与组合竞拍[J]. 上海大学学报(自然科学版), 2022, 28(3): 413-426.
[3] Gentry C. Fully homomorphic encryption using ideal lattices [C]// Proceedings of The Fortyflrst Annual ACM Symposium on Theory of Computing. 2009: 169-178.
[4] 李文卿, 马锐, 张文涛. 基于共用密钥的高效多密钥同态加密方案研究[J]. 计算机工程与科学, 2023, 45(2): 252-260.
[5] E M Z, Geng Y. Homomorphic encryption technology for cloud computing [J]. Procedia Computer Science, 2019, 154: 73-83.
[6] 范友涛. 基于RLWE的并行全同态加密算法研究[D]. 昆明: 云南大学, 2015.
[7] Yang Y H, Zhang H Z, Fan S Y, et al. Poseidon: practical homomorphic encryption accelerator [C]// 2023 IEEE International Symposium on High-Performance Computer Architecture (HPCA). 2023: 870-881.
[8] Latibari B S, Gubbi K I, Homayoun H, et al. A survey on FHE acceleration [C]// 2023 IEEE 16th Dallas Circuits and Systems Conference (DCAS). 2023: 1-6.
[9] Mert A C, Karabulut E E, Ozt urk E, et al. A flexible and scalable NTT hardware: applications from homomorphically encrypted deep learning to post-quantum cryptography [C]// 2020 Design, Automation & Test in Europe Conference & Exhibition (DATE). 2020: 346-351.
[10] Lee J W, Lee E, Lee Y, et al. High-precision bootstrapping of RNS-CKKS homomorphic encryption using optimal minimax polynomial approximation and inverse sine function [C]// Advances in Cryptology-EUROCRYPT. 2021: 618-647.
[11] 陈韬, 李慧琴, 李伟, 等. 面向格基后量子密码算法的可重构多项式乘法架构[J]. 电子与信息学报, 2023, 45(9): 3380-3392.
[12] 赵旭阳, 梁志闯, 胡跃, 等. NTT架构研究及其FPGA硬件优化实现[J]. 计算机学报, 2023, 46(12): 2670-2686.
[13] 陈洋. 面向格密码的可重构NTT快速算法设计与实现[D]. 哈尔滨: 哈尔滨理工大学, 2024.
[14] El-Kady A, Fournaris A P, Haleplidis E, et al. High-level synthesis design approach for number-theoretic multiplier [C]// IFIP/IEEE 30th International Conference on Very Large Scale Integration (VLSI-SoC). 2022: 1-6.
[15] Liu S H, Kuo C Y, Mo Y N, et al. An area-e-cient, conflict-free, and conflgurable architecture for accelerating NTT/INTT [J]. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 2024, 32(3): 519-529.
[16] 欧光槟. 基于FPGA的同态加密计算加速硬件设计与实现[D]. 成都: 电子科技大学, 2023.
[17] Riazi M S, Laine K, Pelton B, et al. HEAX: an architecture for computing on encrypted data [C]// Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems. 2020: 1295-1309.
[18] Su Y, Yang B L, Yang C, et al. A highly unifled reconflgurable multicore architecture to speed up NTT/INTT for homomorphic polynomial multiplication [J]. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 2022, 30(8): 993-1006.
[19] 韩明钦. 基于FPGA的同态加密加速器软硬件协同设计方法研究[D]. 济南: 山东大学, 2022.
[20] Mert A C, Ozt urk E, Sava E. FPGA implementation of a run-time conflgurable NTT-based polynomial multiplication hardware [J]. Microprocessors and Microsystems, 2020, 78: 103219.