信息安全研究 ›› 2025, Vol. 11 ›› Issue (6): 490-.

• 学术论文 •    下一篇

资源节约型的SM4算法FPGA设计与实现

张磊1张修政2洪睿鹏2   

  1. 1(北京电子科技学院电子与通信工程系北京100070)
    2(北京电子科技学院网络空间安全系北京100070)
  • 出版日期:2025-06-22 发布日期:2025-06-22
  • 通讯作者: 张磊 博士,高级工程师.主要研究方向为网络与系统安全、芯片安全. zhanglei@besti.edu.cn
  • 作者简介:张磊 博士,高级工程师.主要研究方向为网络与系统安全、芯片安全. zhanglei@besti.edu.cn 张修政 硕士研究生.主要研究方向为密码学和信息安全. z20193214@163.com 洪睿鹏 博士研究生.主要研究方向为网络空间安全. ChinaDvBishop@outlook.com

Design and Implementation of Resourceefficient SM4 Algorithm on FPGA

Zhang Lei1, Zhang Xiuzheng2, and Hong Ruipeng2   

  1. 1(Department of Electronic & Communication Engineering, Beijing Electronics Science & Technology Institute, Beijing 100070)
    2(Department of Cyberspace Security, Beijing Electronics Science & Technology Institute, Beijing 100070)
  • Online:2025-06-22 Published:2025-06-22

摘要: 在SM4算法的硬件实现中通常采用查找表方法实现S盒,该方式将占用大量的硬件资源.提出了一种基于多项式基的SM4算法实现方案,对SM4算法使用8×8 S盒实现了基于复合域GF((24)2)和复合域GF(((22)2)2)的2种构造方案,测试结果表明,基于多项式基的GF((24)2)方案资源占用很少.在此基础上综合考虑资源占用和性能,设计了有限状态机和流水线2种SM4硬件实现结构.相比传统的查找表方式,有限状态机结构资源占用减少21.98%,运行主频提高14.40%;流水线结构资源占用减少54.23%.

关键词: SM4算法, 分组密码算法, 多项式基, FPGA, 复合域

Abstract: In the hardware implementation of the SM4 algorithm, the lookup table method is commonly adopted for realizing the Sbox, which consumes a significant amount of hardware resources. This paper proposes an implementation scheme for the SM4 algorithm based on polynomial basis. Two construction schemes are developed for the 8×8 Sbox used in the SM4 algorithm, one based on composite field GF((24)2) and the other on composite field GF(((22)2)2). The test results indicate that the scheme based on polynomial bases GF((24)2) is optimal. Taking into account both resource utilization and performance, this paper designs two hardware implementation structures for SM4: a state machine parallel structure and a pipelined structure. Compared with the traditional lookup table approach, the state machine parallel structure reduces resource utilization by 21.98% while increasing the operating frequency by 14.4%. The pipelined structure achieves a reduction in resource utilization by 54.23%.

Key words: SM4 algorithm, block cipher algorithm, polynomial basis, FPGA, composite field

中图分类号: