HMAC算法作为主流消息认证算法之一,面临着以纯软件方式运行速度慢,以传统的FPGA硬件实现方式更新维护困难的问题.针对上述问题,设计了HMAC-SHA256算法的定制计算架构并基于OpenCL以高层次描述方式进行了实现.具体包括计算路径优化、存储结构与查找表优化、HMAC-SHA256全流水结构设计.基于OpenCL的计算任务分组优化、数据存储优化、数据通道矢量化等手段实现了HMAC-SHA256算法的FPGA定制计算架构.实验结果表明:在Intel Stratix 10 FPGA平台上,所实现的HMAC-SHA256吞吐率达到174.236Gbps,与Intel Core I7-10700 CPU相比,性能提升了656%,能效提升了1514%;与NVIDIA GTX 1650 SUPER GPU相比,性能提升了14%,能效提升了288%.
As one of the mainstream message authentication algorithms,the HMAC algorithm runs slowly in software,and the traditional FPGA hardware implementation is difficult to update and maintain.To solve the above problems,a customized computing architecture of HMAC-SHA256 algorithm is designed and implemented in a high-level description method based on OpenCL.Spe-cifically,it includes calculation path optimization,storage structure and lookup table optimization,and HMAC-SHA256 full pipe-line structure design.Based on OpenCL instruction pipeline,data channel vectorization,data storage optimization and other meth-ods,the FPGA custom computing architecture of HMAC-SHA256 algorithm is realized.The experimental results show that on the Intel Stratix 10 FPGA platform,the achieved throughput rate of HMAC-SHA256 reaches 174.236Gbps,compared with Intel Core I7-10700 CPU,the performance is improved by 656%,and the energy efficiency is improved by 1514%.Compared with the NVID-IA GTX 1650 SUPER GPU,the performance is improved by 14%and the energy efficiency is improved by 288%.