面向GmSSL密码库的SM2算法快速优化实现  

Optimized Implementation of the SM2 Algorithm on the GmSSL Cryptographic Library

在线阅读下载全文

作  者:乔晗 王安 王博 苏长山 李根 唐遇星 祝烈煌[3] QIAO Han;WANG An;WANG Bo;SU Chang-Shan;LI Gen;TANG Yu-Xing;ZHU Lie-Huang(School of Computer Science and Technology,Beijing Institute of Technology,Beijing 100081;Phytium Technology Co.,Ltd.,Beijing 100083;School of Cyber Science and Technology,Beijing Institute of Technology,Beijing 100081)

机构地区:[1]北京理工大学计算机学院,北京100081 [2]飞腾信息技术有限公司,北京100083 [3]北京理工大学网络空间安全学院,北京100081

出  处:《计算机学报》2025年第2期463-476,共14页Chinese Journal of Computers

基  金:supported by Project for Reconstruction of Industrial Foundation and High Quality Development of Manufacturing Industry (No.0747-2361SCCZA193)

摘  要:GmSSL是由国内密码学专家团队研发的支持国密算法的开源密码库,相比国际主流密码库,不仅严格遵循国家密码标准,还能满足特定的安全需求。SM2算法是GmSSL的重要组成部分,作为国密椭圆曲线密码算法,它在相同安全强度下所需的密钥空间更小、计算效率更高,更适用于资源受限的设备,在国内网络安全领域具有重要意义。尽管GmSSL中SM2算法在功能上相对完善,但在实现细节、性能优化及硬件资源利用方面仍存在明显不足。本文提出了一种系统化的优化方案,针对GmSSL 3中的SM2算法从底层到顶层进行了全方位的优化,在确保密码算法安全性的同时显著提升了算法的实现速度。首先,本文从提升计算效率的角度出发,通过优化模约减算法结构以减少变量间冗余计算,大幅提升了模乘和模平方运算的速度。其次,通过引入并行计算结构,充分利用硬件的并行处理能力,显著提高了点运算的效率。最后,通过采用更高效的算法展开形式,改进了标量乘法的实现方案,进一步提升了标量乘算法实现速度。结合上述三种优化方法,本文对原始GmSSL中的标量乘和签名算法进行了优化实现,优化后的速度分别提升了118.3%和89.3%。此外,与国际主流密码库OpenSSL相比,本文实现的标量乘和签名算法速度分别提升了101.4%和55.8%,这一结果不仅验证了本文优化方案的有效性,也凸显了GmSSL在国际竞争中的潜力。本文的优化方案不仅显著提升了国密算法在实际应用中的性能,对于物联网和移动支付等领域具有重要意义,同时也为后续密码算法研究提供了新的视角和思路。GmSSL is an open-source cryptographic library developed by a team of Chinese cryptography experts that supports Chinese cryptographic algorithms.Compared to mainstream international crypto-graphic libraries,it not only strictly adheres to national cryptographic standards but also meets specific security requirements.The SM2 algorithm,a crucial component of GmSSL and a state-secret elliptic curvecryptographic algorithm,requires less key space and offers higher computational efficiency at the same level of security,making it particularly suitable for resource-constrained devices.It plays a significant role in China's cybersecurity domain.Despite the relatively comprehensive functionality of the SM2 algorithm in GmSSL,there are notable deficiencies in implementation details,performance optimization,and hardware resource utilization.This paper proposes a systematic optimization approach,enhancing the SM2 algorithm in GmSSL 3 from the bottom up,significantly improving the implementation speed while ensuring the security of the cryptographic algorithms.Initially,this study focuses on enhancing computational efficiency by optimizing the structure of the modular reduction algorithm to minimize redundant calculations between variables,significantly increasing the speed of modular multiplication and squaring operations.Furthermore,introducing parallel computing structures fully utilizes the hardware's parallel processing capabilities,substantially improving the efficiency of point operations.Finally,adopting a more efficient algorithmic expansion form improves the implementation scheme of scalar multiplication,further accelerating the speed of scalar multiplication implementation.Combining these three optimization methods,this paper optimizes the original scalar multiplication and signing algorithms in GmSSL,with speeds increased by 118.3%and 89.3%,respectively.Moreover,compared to the mainstream international cryptographic library OpenSSL,the speeds of the implemented scalar multiplication and signing algorithms increased

关 键 词:GmSSL SM2 椭圆曲线加密算法 快速实现 标量乘 

分 类 号:TP309[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象