针对SM2国密算法在有限域上大数运算结构复杂、运算开销大的问题,通过研究SM2国密算法在二元扩域下的椭圆曲线点乘运算及其相关基础运算,设计了一种基于RISC-V指令集的椭圆曲线点乘运算加速协处理器。协处理器采用三级流水线结构,提高了计算效率。处理器内部集成9条自定义指令,可协助支持RISC-V的主处理器快速完成SM2国密算法。Vivado仿真结果表明,本设计各流水级功能正常,将协处理器烧录至Xilinx XC7A100T FPGA 上,在200 MHz频率下运行结果正确,达到预期目标。
Abstract
In response to the complex structure and high computational overhead of the SM2 national secret algorithm in finite fields,the elliptic curve point multiplication and related basic operations of the SM2 national secret algorithm in binary extended domains are studied,and designs an elliptic curve point operation acceleration coprocessor based on the RISC-V instruction set.The coprocessor adopts a three-level pipeline structure,which improves computational efficiency.The processor integrates 9 custom instructions internally,which can assist the main processor supporting RISC-V to quickly complete the SM2 national security algorithm.The simulation results of Vivado show that the functions of each pipeline stage in this design are normal.The coprocessor is burned onto the Xilinx XC7A100T FPGA and runs correctly at a frequency of 200 MHz,achieving the expected goals.
关键词
RISC-V /
协处理器 /
多倍点运算 /
二元扩域
Key words
RISC-V /
coprocessor /
multiplication point operation /
binary extension domain
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
参考文献
[1] 国家密码管理局.SM2椭圆曲线公钥密码算法:GM/T0003-2012[S].北京:国家密码管理局,2012.
[2] 张建.GF(2n)上椭圆曲线标量乘法快速算法的研究[D].呼和浩特:内蒙古大学,2012.
[3] 韩光,陈光化,曾为民,等.基于可信计算应用的双域椭圆曲线密码协处理器研究与实现[J].微电子学与计算机,2020,37(12):53-58.
[4] 张丽,董秀则,明娇娇,伟.GF(2m)域Montgomery模乘器的高效设计及FPGA实现[J].计算机应用与软件,2019,36(6):292-295,326.
[5] 王腾飞,张海峰,许森.SM2专用指令协处理器设计与实现[J].计算机工程,2022,58(2):102-109.
[6] 李斌,周清雷,陈晓杰,等.可重构的素域SM2算法优化方法[J].通信学报,2022,43(3):30-41.
[7] Lai J Y,Huang C T.A Highly Efficient Cipher Processor for Dual-Field Elliptic Curve Cryptography[J].IEEE Transactions on Circuits & Systems II Express Briefs,2015,56(5):394-398.
[8] Lee J W,Chung S C,Chang H C,et al.Efficient Power-Analysis-Resistant Dual-Field Elliptic Curve Cryptograpgic Processor Using Heterogeneous Dual-Processing-Element Arshitecture[J].IEEE Transactionson Very Large Scale Integration Systems,2014,22(1):49-61.