- 编译步骤:
- perl Configure VC-WIN32
- ms\do_nasm
- nmake -f ms\nt.mak
- crypto/object目录下的头文件动态更新:
- perl objects.pl objects.txt obj_mac.num > obj_mac.h
- perl obj_dat.pl obj_mac.h > obj_dat.h
- perl objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
- wincows系统下一些算法性能(Intel i5 M520 @2.40GHz windows8.1 X64):
>openssl.exe speed sm2enc
encrypt decrypt encrypt/s decrypt/s
256 bit sm2enc (sm2) 0.0014s 0.0012s 710.8 867.8
>openssl.exe speed sm2dsa
sign verify sign/s verify/s
256 bit sm2dsa (sm2) 0.0004s 0.0013s 2785.8 747.1
>openssl.exe speed sm3
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
sm3 11021.38k 27150.18k 53155.24k 70118.03k 77303.66k
>openssl.exe speed sm4
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
sm4-128 cbc 41475.63k 42321.60k 43208.06k 42854.06k 43106.90k
#同机器Ubuntu 16.04 X64系统测试结果:
>openssl speed sm2enc
enc dec enc/s dec/s
256 bits sm2enc (sm2_prime256) 0.0000s 0.0000s 118347.2 48944.8
>openssl speed sm2dsa
sign verify sign/s verify/s
256 bits sm2dsa (sm2_prime256) 0.0000s 0.0000s 184097.8 144267.0
>openssl speed sm3
type 16 bytes 32 bytes 64 bytes 128 bytes 256 bytes 1024 bytes 2048 bytes 4096 bytes 8192 bytes
sm3 284302.42k 1362591.24k 688088.41k 1305330.36k 1491227.96k 1169944.09k 1358778.97k 2829487.54k 3159024.25k
>openssl speed sm4
type 16 bytes 32 bytes 64 bytes 128 bytes 256 bytes 1024 bytes 2048 bytes 4096 bytes 8192 bytes
sm4 cbc 585568.29k 1067776.60k 1302234.02k 1482676.55k 3274519.34k 3372144.64k 1821217.56k 2617367.81k 2095669.25k