期刊文献+

基于RISC-V指令扩展方式的国密算法SM2、SM3和SM4的高效实现

Efficient Implementation of National Security Algorithms SM2,SM3 and SM4 Based on RISC-V Instruction Extension Method
下载PDF
导出
摘要 基于指令扩展的密码算法实现是兼顾性能和面积的轻量级实现方式,特别适用于日益普及的物联网设备.SM2、SM3和SM4等国密算法有利于提高自主可控设备的安全性,但针对这些算法进行指令扩展的相关研究还不够充分.RISC-V由于其开源、简洁及可扩展等优点已成为业界最流行的指令集架构之一,本文主要基于国产开源RISC-V处理器对国密算法SM2、SM3和SM4进行指令扩展和高效实现.本文基于软硬件协同的理念提出总体指令的扩展方案.对相关密码算法进行深入分析和方案对比,分别设计了硬件单元,提出高效的实现方式.设计实现的协处理器具有2级流水线结构,顺序派遣、乱序执行和顺序写回的指令执行模式,以及独立内存访问单元和大位宽寄存器.协处理器统一接管了密码算法的部分控制逻辑,降低硬件资源消耗.实验结果表明,本文设计的密码协处理器硬件结构精简,资源利用率高.SM2、SM3和SM4算法占用资源少,但执行速率相比纯硬件有一定程度下降,资源面积和花费时间的乘积与其他相关文献相比有不同程度的优势. The implementation of the cryptographic algorithm based on instruction extension is a lightweight scheme that balances both performance and area,which is especially suitable for the increasingly popular Internet of Things devices.The proposal of national cryptographic algorithms such as SM2,SM3,and SM4 is conducive to improving the security of self-controlled devices.However,the relevant research on instruction extensions for these algorithms is insufficient.RISCV has become one of the most popular instruction set architectures due to its advantages of open source,simplicity,extensi⁃bility,etc.This paper mainly focuses on the instruction extensions and efficient implementation of the SM2,SM3,and SM4 algorithms based on a domestic open-source RISC-V processor.Specifically,this paper proposes an overall instruction ex⁃pansion scheme based on the concept of hardware-software co-design;this paper conducts an in-depth analysis of the relat⁃ed cryptographic algorithms and comparison of the implementation schemes and then proposes efficient implementations of the hardware units,respectively.This paper designs and implements a coprocessor with a two-stage pipeline structure,se⁃quential dispatching,out-of-order execution,and sequential write-back instruction execution modes,as well as an indepen⁃dent memory access unit and a large bit-wide register.The coprocessor takes over part of the control logic of the crypto⁃graphic algorithm,reducing hardware resource consumption.The experimental results show that the hardware structure of the cryptographic coprocessor designed in this paper is simplified,and the utilization of hardware resources is high.SM2,SM3,and SM4 algorithms occupy very few resources,but the execution rate decreases only to a certain extent compared with pure hardware implementation.The product of resource area and time spent has varying degrees of advantages com⁃pared to other relevant literature.
作者 王明登 严迎建 郭朋飞 张帆 WANG Ming-deng;YAN Ying-jian;GUO Peng-fei;ZHANG Fan(School of Cryptography Engineering,Information Engineering University,Zhengzhou,Henan 450001,China;School of Cyber Science and Technology,Zhejiang University,Hangzhou,Zhejiang 310058,China)
出处 《电子学报》 EI CAS CSCD 北大核心 2024年第8期2850-2865,共16页 Acta Electronica Sinica
基金 国家自然科学基金(No.62072398) 河南省网络空间态势感知重点实验室开放课题(No.HNTS2022001)。
关键词 RISC-V 协处理器 国密算法 指令扩展 蜂鸟E203 嵌入式系统 RISC-V co-processors national cryptographic algorithm instruction extensions hummingbird E203 embedded system
  • 相关文献

参考文献16

二级参考文献58

共引文献131

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部