高级搜索

留言板

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

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

大整数乘法器的FPGA设计与实现

谢星 黄新明 孙玲 韩赛飞

谢星, 黄新明, 孙玲, 韩赛飞. 大整数乘法器的FPGA设计与实现[J]. 电子与信息学报, 2019, 41(8): 1855-1860. doi: 10.11999/JEIT180836
引用本文: 谢星, 黄新明, 孙玲, 韩赛飞. 大整数乘法器的FPGA设计与实现[J]. 电子与信息学报, 2019, 41(8): 1855-1860. doi: 10.11999/JEIT180836
Xing XIE, Xinming HUANG, Ling SUN, Saifei HAN. FPGA Design and Implementation of Large Integer Multiplier[J]. Journal of Electronics & Information Technology, 2019, 41(8): 1855-1860. doi: 10.11999/JEIT180836
Citation: Xing XIE, Xinming HUANG, Ling SUN, Saifei HAN. FPGA Design and Implementation of Large Integer Multiplier[J]. Journal of Electronics & Information Technology, 2019, 41(8): 1855-1860. doi: 10.11999/JEIT180836

大整数乘法器的FPGA设计与实现

doi: 10.11999/JEIT180836
基金项目: 国家自然科学基金(61571246),江苏省研究生科研与实践创新计划项目(KYCX17-1920)
详细信息
    作者简介:

    谢星:男,1985年生,博士生,研究方向为信息安全

    黄新明:男,1974年生,教授,研究方向为VLSI设计、高性能计算

    孙玲:女,1976年生,教授,研究方向为专用集成电路设计、系统集成技术

    通讯作者:

    孙玲 sun.l@ntu.edu.cn

  • 中图分类号: TN918.91; TN492

FPGA Design and Implementation of Large Integer Multiplier

Funds: The National Natural Science Foundation of China (61571246), The Postgraduate Research & Practice Innovation Program of Jiangsu Province (KYCX17-1920)
  • 摘要: 大整数乘法是公钥加密中最为核心的计算环节,实现运算快速的大数乘法单元是RSA, ElGamal,全同态等密码体制中急需解决的问题之一。针对全同态加密(FHE)应用需求,该文提出一种基于Schönhage-Strassen算法(SSA)的768 kbit大整数乘法器硬件架构。采用并行架构实现了其关键模块64k点有限域快速数论变换(NTT)的运算,并主要采用加法和移位操作以保证并行处理的最大化,有效提高了处理速度。该大整数乘法器在Stratix-V FPGA上进行了硬件验证,通过与CPU上使用数论库(NTL)和GMP库实现的大整数乘法运算结果对比,验证了该文设计方法的正确性和有效性。实验结果表明,该方法实现的大整数乘法器运算时间比CPU平台上的运算大约有8倍的加速。
  • 图  1  树形大数求和单元结构图

    图  2  基-32 NTT运算结构图

    图  3  1024点NTT架构图

    图  4  64k点硬件架构图

    图  5  大整数乘法器架构图

    表  1  主要大整数乘法算法时间复杂度

    算法时间复杂度
    grammar-school$O({N^2})$
    Karatsuba-Ofman$O({N^{\ln 3/\ln 2}})$
    Toom-Cook$O({N^{\ln (2k - 1)/\ln (k)}})$
    Schönhage-Strassen (SSA)$O(N\log N\log \log N)$
    下载: 导出CSV

    表  2  素数p的单位根${r_N}$

    NTT点数单位根${r_N}$
    2296
    4248
    8224
    16212
    3226
    6423
    下载: 导出CSV

    表  3  Stratix-V FGPA综合结果

    逻辑单元Stratix V
    占用资源数总资源数利用率(%)
    ALUTs24022971840033
    Logic registers236088143680016
    Total block Memory (bit)162529285406720030
    Total DSP blocks28835282
    最大频率(MHz)98.02
    下载: 导出CSV

    表  4  CPU和FPGA上性能比较

    计算时间(ms)加速倍数
    I7-7700 CPU3.3501
    本文设计0.4198
    下载: 导出CSV

    表  5  实现结果对比

    设计位数(kbit)频率(MHz)计算时间(ms)占用资源数
    文献[17]7681812.307.6k ALUTs+3.4k regisiters
    文献[18]768100463k ALUTs+336k regisiters
    本文76898.020.419240k ALUTs+236k regisiters
    下载: 导出CSV
  • 光炎, 祝跃飞, 顾纯祥, 等. 一种针对全同态加密体制的密钥恢复攻击[J]. 电子与信息学报, 2013, 35(12): 2999–3004. doi: 10.3724/SP.J.1146.2013.00300

    GUANG Yan, ZHU Yuefei, GU Chunxiang, et al. A key recovery attack on fully homomorphic encryption scheme[J]. Journal of Electronics &Information Technology, 2013, 35(12): 2999–3004. doi: 10.3724/SP.J.1146.2013.00300
    FENG Xiang and LI Shuguo. Design of an area-effcient million-bit integer multiplier using double modulus NTT[J]. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 2017, 25(9): 2658–2662. doi: 10.1109/TVLSI.2017.2691727
    陈智罡. 基于格的全同态加密研究与设计[D]. [博士论文], 南京航空航天大学, 2015: 1–5.

    CHEN Zhigang. Research and design of fully homomorphic encryption based on lattice[D]. [Ph.D. dissertation], Nanjing University of Aeronautics and Astronautics, 2015: 1–5.
    GENTRY C and HALEVI S. Implementing Gentry’s fully-homomorphic encryption scheme[C]. The 30th Annual International Conference on Theory and Applications of Cryptographic Techniques: Advances in Cryptology, Tallinn, Estonia, 2011: 129–148.
    GENTRY C. A fully homomorphic encryption scheme[D]. [Ph.D. dissertation], Stanford University, 2009.
    施佺, 韩赛飞, 黄新明, 等. 面向全同态加密的有限域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
    ÖZTÜRK E, DORÖZ Y, SAVAŞ E, et al. A custom accelerator for homomorphic encryption applications[J]. IEEE Transactions on Computers, 2017, 66(1): 3–16. doi: 10.1109/TC.2016.2574340
    YE J H and SHIEH M D. Low-complexity VLSI design of large integer multipliers for fully homomorphic encryption[J]. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 2018, 26(9): 1727–1736. doi: 10.1109/TVLSI.2018.2829539
    POLLARD J M. The fast Fourier transform in a finite field[J]. Mathematics of Computation, 1971, 25(114): 365–374. doi: 10.1090/S0025-5718-1971-0301966-0
    WANG Wei, HUANG Xinming, EMMART N, et al. VLSI design of a large-number multiplier for fully homomorphic encryption[J]. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 2014, 22(9): 1879–1887. doi: 10.1109/TVLSI.2013.2281786
    RAFFERTY C, O’NEILL M, and HANLEY N. Evaluation of large integer multiplication methods on hardware[J]. IEEE Transactions on Computers, 2017, 66(8): 1369–1382. doi: 10.1109/TC.2017.2677426
    ROY S S, VERCAUTEREN F, VLIEGEN J, et al. Hardware assisted fully homomorphic function evaluation and encrypted search[J]. IEEE Transactions on Computers, 2017, 66(9): 1562–1572. doi: 10.1109/TC.2017.2686385
    DORÖZ Y, ÖZTÜRK E, and SUNAR B. Accelerating fully homomorphic encryption in hardware[J]. IEEE Transactions on Computers, 2015, 64(6): 1509–1521. doi: 10.1109/TC.2014.2345388
    WANG Wei, HU Yin, CHEN Lianmu, et al. Accelerating fully homomorphic encryption using GPU[C]. 2012 IEEE Conference on High Performance Extreme Computing, Waltham, USA, 2012: 1–5.
    HUANG Xinming and WANG Wei. A novel and efficient design for an RSA cryptosystem with a very large key size[J]. IEEE Transactions on Circuits and Systems II: Express Briefs, 2015, 62(10): 972–976. doi: 10.1109/TCSII.2015.2458033
    JOHNSON L G. Conflict free memory addressing for dedicated FFT hardware[J]. IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing, 1992, 39(5): 312–316. doi: 10.1109/82.142032
    FENG Xiang and LI Shuguo. Accelerating an FHE integer multiplier using negative wrapped convolution and Ping-Pong FFT[J]. IEEE Transactions on Circuits and Systems II: Express Briefs, 2019, 66(1): 121–125. doi: 10.1109/TCSII.2018.2840108
    WANG Wei and HUANG Xinming. FPGA implementation of a large-number multiplier for fully homomorphic encryption[C]. Proceedings of 2013 IEEE International Symposium on Circuits and Systems, Beijing, China, 2013: 2589–2592.
  • 加载中
图(5) / 表(5)
计量
  • 文章访问数:  3915
  • HTML全文浏览量:  2265
  • PDF下载量:  203
  • 被引次数: 0
出版历程
  • 收稿日期:  2018-08-27
  • 修回日期:  2019-02-15
  • 网络出版日期:  2019-02-25
  • 刊出日期:  2019-08-01

目录

    /

    返回文章
    返回