计算机工程

• •    

基于OpenCL的3DES算法FPGA加速器

  

  • 发布日期:2020-12-10

FPGA Accelerator of 3DES algorithm based on OpenCL

  • Published:2020-12-10

摘要: 当前,加解密算法广泛应用于数字货币、区块链、云端数据加密等领域。传统的以软件方式运行的数据加密存在计 算速度慢、占用主机资源、功耗高等问题;而以 Verilog/VHDL 等方式实现的 FPGA 加解密系统又存在开发周期长、维护升级 困难等问题。针对上述问题,设计并实现了一种基于 OpenCL 的 3DES FPGA 加速器。通过数据存储调整、数据位宽改进、指 令流优化、内核矢量化和计算单元复制等方法,设计了具有 48 轮迭代的流水并行结构。针对数据传输模块采用数据存储调整、 数据位宽改进提高内核实际带宽利用率,针对算法加密模块采用指令流优化形成流水线并行架构。此外,采用内核矢量化、 计算单元复制策略进一步提高内核的性能。实验结果表明:在 Intel Stratix 10 GX2800 上可获得 111.801Gbps 的吞吐率。与 Intel Core i7-9700 CPU 相比,性能提升 372 倍、能效提升 644 倍;与 Nvidia GeForce GTX 1080Ti GPU 相比,性能提升 20%、能效 提升 9 倍。

Abstract: Nowadays, encryption and decryption algorithms are widely used in digital currency, blockchain, cloud data encryption and other fields. Traditional data encryption that runs in software has problems such as slow calculation speed, occupancy of host resources, and high power consumption. FPGA encryption and decryption systems implemented in Verilog/VHDL and other methods have problems such as long development cycles and difficult maintenance and upgrades. Aiming at the above problems, a 3DES FPGA accelerator based on OpenCL is designed and implemented. Through data storage adjustment, data bit width improvement, instruction stream optimization, kernel vectorization and compute unit replication methods, a pipeline parallel structure with 48 iterations is designed. For the data transmission module, data storage adjustment and data bit width improvement are adopted to improve the actual bandwidth utilization of the kernel. For the algorithm encryption module, the instruction stream is optimized to form a pipeline parallel architecture. In addition, the kernel vectorization and compute unit replication strategy are adopted to further improve the performance of the kernel.The experimental results show that the throughput rate of 111.801Gbps can be obtained on Intel Stratix 10 GX2800. Compared with the Intel Core i7-9700 CPU, the performance is increased by 372 times and the energy efficiency is increased by 644 times; compared with the Nvidia GeForce GTX 1080Ti GPU, the performance is increased by 20% and the energy efficiency is increased by 9 times.