首页 > 编程语言 >SM4分组密码算法速度测试

SM4分组密码算法速度测试

时间:2023-03-15 17:35:15浏览次数:49  
标签:sm4 ++ SM4 int 算法 分组 root localhost 1000

 

 

 Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHz

 

一百万组,耗时约5.5秒

for (int i = 0; i < 1* 1000* 1000; i++)
{
cipher(data, text, key);
}

[root@localhost sm4]# g++ main.cpp
[root@localhost sm4]# time ./a.out
59,52,98,C7,
C6,FD,27,1F,
04,02,F8,04,
C3,3D,3F,66,

real 0m5.378s
user 0m5.369s
sys 0m0.007s
[root@localhost sm4]#

 

一千万组,耗时约50秒

for (int i = 0; i < 10* 1000* 1000; i++)
{
cipher(data, text, key);
}

[root@localhost sm4]# g++ main.cpp
[root@localhost sm4]# time ./a.out
EF,0E,D9,14,
B9,30,6C,74,
15,DC,EB,71,
E5,54,C5,6A,

real 0m48.186s
user 0m48.157s
sys 0m0.020s
[root@localhost sm4]#

标签:sm4,++,SM4,int,算法,分组,root,localhost,1000
From: https://www.cnblogs.com/baofengc/p/17219311.html

相关文章