「OpenSSLとLibreSSLのパフォーマンス比較」の版間の差分
提供: セキュリティ
(相違点なし)
|
2015年11月14日 (土) 22:56時点における最新版
OpenSSLとLibreSSLのパフォーマンスを比較してみました。
読み方
目次
概要
FreeBSDとCentOSの両方で試してみましたが、どちらも OpenSSL のほうが速いという結果でした。
ベンチマーク on FreeBSD with AMD Phenom2 X4 980
まとめ
FreeBSDの場合、OpenSSLのほうが速かった、という結論でした。
テスト環境
AMDのCPUの環境でテストを実施しました。
AMD Phenom(tm) II X4 980 Processor (4017.87-MHz K8-class CPU)
ベンチマーク LibreSSL 2.3.1
ビルドオプションは、 no-asm zlib です。
% env OPENSSL_CONF=$PWD/apps/openssl/openssl.cnf apps/openssl/openssl version LibreSSL 2.3.1 % env OPENSSL_CONF=$PWD/apps/openssl/openssl.cnf apps/openssl/openssl speed sha256 Doing sha256 for 3s on 16 size blocks: 6499420 sha256's in 2.99s Doing sha256 for 3s on 64 size blocks: 3666468 sha256's in 3.00s Doing sha256 for 3s on 256 size blocks: 1566111 sha256's in 3.00s Doing sha256 for 3s on 1024 size blocks: 479638 sha256's in 3.00s Doing sha256 for 3s on 8192 size blocks: 64187 sha256's in 3.00s LibreSSL 2.3.1 built on: date not available options:bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) compiler: information not available The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes sha256 34754.08k 78217.98k 133641.47k 163716.44k 175273.30k Time spent in user mode (CPU seconds) : 14.993s Time spent in kernel mode (CPU seconds) : 0.015s Total time : 0:15.01s CPU utilisation (percentage) : 99.9% Times the process was swapped : 0 Times of major page faults : 0 Times of minor page faults : 1622
ベンチマーク openssl 1.0.2d
ビルドオプションは、 zlib です。
% env OPENSSL_CONF=$PWD/apps/openssl.cnf apps/openssl version OpenSSL 1.0.2d 9 Jul 2015 % env OPENSSL_CONF=$PWD/apps/openssl.cnf apps/openssl speed sha256 Doing sha256 for 3s on 16 size blocks: 9568123 sha256's in 3.00s Doing sha256 for 3s on 64 size blocks: 5501981 sha256's in 3.00s Doing sha256 for 3s on 256 size blocks: 2399658 sha256's in 3.00s Doing sha256 for 3s on 1024 size blocks: 740101 sha256's in 3.01s Doing sha256 for 3s on 8192 size blocks: 99283 sha256's in 3.00s OpenSSL 1.0.2d 9 Jul 2015 built on: reproducible build, date unspecified options:bn(64,64) rc4(8x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) compiler: cc -I. -I.. -I../include -DZLIB -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes sha256 51029.99k 117375.59k 204770.82k 251964.98k 271108.78k
ベンチマーク on VMware Player CentOS with Intel i7
CentOSでもOpenSSLの方が早そう。
ベンチマーク LibreSSL 2.3.1
ビルドオプションは、 zlib です。
$ env OPENSSL_CONF=$PWD/apps/openssl/openssl.cnf ./apps/openssl/openssl version LibreSSL 2.3.1 $ env OPENSSL_CONF=$PWD/apps/openssl/openssl.cnf ./apps/openssl/openssl speed sha256 Doing sha256 for 3s on 16 size blocks: 2930830 sha256's in 2.40s Doing sha256 for 3s on 64 size blocks: 2067584 sha256's in 2.43s Doing sha256 for 3s on 256 size blocks: 1076073 sha256's in 2.46s Doing sha256 for 3s on 1024 size blocks: 282460 sha256's in 2.41s Doing sha256 for 3s on 8192 size blocks: 37092 sha256's in 2.50s LibreSSL 2.3.1 built on: date not available options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) compiler: information not available The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes sha256 19538.87k 54454.89k 111981.58k 120016.20k 121543.07k
ベンチマーク openssl 1.0.2d
ビルドオプションは、 zlib です。
$ env OPENSSL_CONF=$PWD/apps/openssl.cnf ./apps/openssl speed sha256 Doing sha256 for 3s on 16 size blocks: 4033104 sha256's in 2.34s Doing sha256 for 3s on 64 size blocks: 2145927 sha256's in 2.42s Doing sha256 for 3s on 256 size blocks: 1035370 sha256's in 2.44s Doing sha256 for 3s on 1024 size blocks: 324341 sha256's in 2.54s Doing sha256 for 3s on 8192 size blocks: 42265 sha256's in 2.45s OpenSSL 1.0.2d 9 Jul 2015 built on: reproducible build, date unspecified options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) compiler: gcc -I. -I.. -I../include -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes sha256 27576.78k 56751.79k 108628.98k 130757.95k 141320.36k