基于SM3并行实现的SM2-KDF快速实现算法  被引量:1

Optimized Implementation of SM2-KDF Based on Parallel SM3

在线阅读下载全文

作  者:陈学雷 付勇 王美琴[2,3,4] CHEN Xue-Lei;FU Yong;WANG Mei-Qin(Shandong Provincial Key Laboratory of Computer Networks,Shandong Computer Science Center(National Supercomputer Center in Jinan),Qilu University of Technology(Shandong Academy of Science),Jinan 250100,China;Shandong University School of Cyber Science And Technology,Shandong University,Qingdao 266237,China;Key Lab of Cryptologic Technology and Information Security Ministry of Education,Qingdao,266237,China;Quan Cheng Laboratory,Jinan,250001,China)

机构地区:[1]齐鲁工业大学(山东省科学院)山东省计算中心(国家超级计算济南中心)山东省计算机网络重点实验室,济南250010 [2]山东大学网络空间安全学院,青岛266237 [3]密码技术和信息安全教育部重点实验室,青岛266237 [4]泉城实验室,济南250010

出  处:《密码学报》2023年第4期813-822,共10页Journal of Cryptologic Research

基  金:国家自然科学基金(62032014);国家重点研发计划(2018YFA0704702);山东省自然科学基金重大基础研究项目(ZR202010220025);齐鲁工业大学(山东省科学院)基础研究加强项目(2021JC02017);齐鲁工业大学(山东省科学院)科教产融合试点工程重大创新专项(2022JBZ01-01)。

摘  要:本文提出了一种基于SIMD寄存器SM3并行算法的快速SM2-KDF实现方法.首先预计算KDF所需的计数器ct值,再根据消息长度分组执行串行/并行的SM3哈希运算,在SM3消息扩展与迭代压缩部分使用PSHUFB与VPGATHERDD指令并行处理,之后对数据重新装配以使用256位YMM寄存器进行轮函数的运算,最后将输出哈希值与消息异或得到密文.在AMD Ryzen 536006-Core@3.6 GHz和Intel I5-7200U@2.4 GHz两种测试环境下,SM2的KDF算法在消息长度大于1 KB时速度可提升至标准实现的3倍.在应用并行KDF算法后SM2公钥加密算法加密速度最快可提升47%,解密速度最快可提升53%,本方法同样适用于其他杂凑算法和公钥加解密算法的软件加速.In this paper,an efficient implementation of SM2-KDF based on SIMD operations and SM3 parallel algorithm is proposed.First,the KDF counter value ct is precomputed,and then serial/parallel SM3 hash is computed in groups according to message length.In the process of message expansion and iterative compression of SM3,PSHUFB and VPGATHERDD are used for parallel processing,and then the data is reassembled to conduct round function operation using 256-bit YMM register.Finally,the output hash value is XORed with the message to obtain the ciphertext.In the settings of both AMD Ryzen 536006-Core@3.6 GHz and Intel I5-7200U@2.4 GHz,the SM2-KDF algorithm can be up to three times faster than the standard implementation of SM2 when the message length is larger than 1 KB.When the parallel KDF implementation is used,the SM2 encryption and decryption speed can be improved by 47%and 53%respectively,compared to the standard implementation of SM2.Moreover,the proposed method can be applied to other HASH algorithms and Public Key Encryption algorithms.

关 键 词:SM2加解密 SM3 SIMD 软件快速实现 KDF 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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