Open 0x9527-zhou opened 2 years ago
收到,#139
speed 支持sm3算法 测试环境:Anolis OS 8.2 Babassl分支:master 修改前报错: root@test# openssl speed sm3 speed: Unknown algorithm sm3 修改后结果: [root@AnolisOS-163 BabaSSL.bak]# /usr/local/openssl/bin/openssl speed sm3 Doing sm3 for 3s on 16 size blocks: 12865472 sm3's in 3.00s Doing sm3 for 3s on 64 size blocks: 6807640 sm3's in 3.00s Doing sm3 for 3s on 256 size blocks: 2817914 sm3's in 2.99s Doing sm3 for 3s on 1024 size blocks: 853665 sm3's in 3.00s Doing sm3 for 3s on 8192 size blocks: 114388 sm3's in 3.00s Doing sm3 for 3s on 16384 size blocks: 57281 sm3's in 3.00s OpenSSL 1.1.1h 22 Sep 2020 built on: Mon Jan 10 08:44:31 2022 UTC options:bn(64,64) rc4(16x,int) des(int) aes(partial) idea(int) blowfish(ptr) compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes sm3 68615.85k 145229.65k 241266.22k 291384.32k 312355.50k 312830.63k
add my patch: fix-openssl-speed-support-SM3_patch.txt
@dongbeiouba
在BabaSSL 8.3.0-dev版本中,使用openssl speed 测试SM2/3/4算法性能时,发现只支持SM2,其他两个常用标准国密算法并不支持
使用-evp参数也是可以测试的。 例如:
openssl speed -evp sm3
openssl speed -evp sm4
在BabaSSL 8.3.0-dev版本中,使用openssl speed 测试SM2/3/4算法性能时,发现只支持SM2,其他两个常用标准国密算法并不支持
使用-evp参数也是可以测试的。 例如:
openssl speed -evp sm3 openssl speed -evp sm4
使用-evp参数,测试结果正常 [root@AnolisOS-163 ~]# /usr/local/openssl/bin/openssl speed -evp sm3 Doing sm3 for 3s on 16 size blocks: 10226565 sm3's in 2.99s Doing sm3 for 3s on 64 size blocks: 5951875 sm3's in 3.00s Doing sm3 for 3s on 256 size blocks: 2491255 sm3's in 3.00s Doing sm3 for 3s on 1024 size blocks: 824039 sm3's in 3.00s Doing sm3 for 3s on 8192 size blocks: 113189 sm3's in 3.00s Doing sm3 for 3s on 16384 size blocks: 57231 sm3's in 3.00s OpenSSL 1.1.1h 22 Sep 2020 built on: Mon Jan 10 08:44:31 2022 UTC options:bn(64,64) rc4(16x,int) des(int) aes(partial) idea(int) blowfish(ptr) compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes sm3 54724.09k 126973.33k 212587.09k 281271.98k 309081.43k 312557.57k
在BabaSSL 8.3.0-dev版本中,使用openssl speed 测试SM2/3/4算法性能时,发现只支持SM2,其他两个常用标准国密算法并不支持