针对进口信息产品存在安全隐患以及RISC-V架构在安全领域产品严重缺乏的问题,设计了一种可以提高SM4密码算法运算效率且完全自主可控的协处理器。协处理器采用三级流水线结构提高指令执行效率,扩展5条自定义指令用于完成SM4运算,内部封装SM4运算单元以减小对数据通路的影响、便于后续扩展。借助FPGA开发板,在50 MHz的时钟频率下进行验证。验证结果表明,与无指令扩展的处理器相比,本设计密钥扩展运算效率提高了5.8倍,加密运算效率提高了5.5倍,解密运算效率提高了6.4倍,所提出的方案可显著提高SM4运算效率。
Abstract
In view of the hidden danger of imported information products and the serious shortage of RISC-V architecture products in the field of security,a fully autonomous and controllable coprocessor is designed to improve the efficiency of SM4 cryptography algorithm.The three-level pipeline structure is adopted to improve the instruction execution efficiency,and five customized instructions are extended to complete SM4 operation.The SM4 operation unit is encapsulated internally to reduce the impact on the data path and facilitate subsequent expansion.With the help of FPGA development board,verification is carried out at 50 MHz clock frequency.The results show that compared with the processor without instruction extension,the efficiency of key expansion operation is increased by 5.8 times,the efficiency of encryption operation is increased by 5.5 times,and the efficiency of decryption operation is increased by 6.4 times.The proposed scheme can significantly improve the efficiency of SM4 operation.
关键词
RISC-V /
协处理器 /
SM4算法 /
自定义指令
Key words
RISC-V /
coprocessor /
SM4 /
custom instruction
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
参考文献
[1] 胡振波.手把手教你设计CPU[M].北京:人民邮电出版社,2018.
[2] Wang Y,Tan N.An application-specific microprocessor for energy metering based on risc-v[C]//2019 Interna-tional Conference on IC Design and Technology (ICICDT),2019:1-4.
[3] 张雨昕,芮志清,李威威,等.PEC-V:基于RISC-V协处理器的内存溢出防御机制[J].计算机系统应用,2021,30(11):11-19.
[4] 李辉楷,韩军,翁新钎,等.精简指令集计算机协处理器设计[J].计算机工程,2012,38(23):240-242,246.
[5] 陈前.加密专用处理器指令集设计[D].哈尔滨:哈尔滨工业大学,2011.
[6] 韩光,陈光化,曾为民,等.基于可信计算应用的双域椭圆曲线密码协处理器研究与实现[J].微电子学与计算机,2020,37(12):53-58.
[7] 杨伊,何德彪,文义红,等.密钥管理服务系统下的多方协同SM4加/解密方案[J].信息网络安全,2021,21(8):17-25.
[8] 吕述望,苏波展,王鹏,等.SM4分组密码算法综述[J].信息安全研究,2016,2(11):995-1007.
[9] 黎明,吴丹,戴葵,等.高性能可扩展公钥密码协处理器研究与设计[J].电子学报,2011,39(3):665-670.
[10] 罗庆斌,李晓瑜,杨国武.SM4密码算法S盒的子电路实现[J].电子科技大学学报,2021,50(6):820-826.
[11] LIANG H,WU L,ZHANG X,et al.Design of a masked S-Box for SM4 based on composite field[C]//2014 Tenth International Conferenceon Computational Intelligence and Security.Kunming: IEEE,2014:387-391
[12] 乔庐峰.Verilog HDL算法与电路设计[M].北京:清华大学出版社,2021.
[13] 王腾飞,张海峰,许森.SM2专用指令协处理器设计与实现[J].计算机工程与应用,2022,58(2):102-109.
[14] 唐钏,白志华,李德建,等.面向SM4算法优化的指令集扩展方法与SoC实现[C]//第十五届全国信号和智能信息处理与应用学术会议论文集,2022:116-122.