Last active
August 22, 2016 07:17
-
-
Save tell/8135bd3ebb9aa67e1ff0 to your computer and use it in GitHub Desktop.
Benchmarking implementations of SSL/TLS: OpenSSL, LibreSSL, and BoringSSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Core i7 3630QM (2.4 GHz, 4 physical cores) | |
Mac OS X 10.9.4 | |
Variable CPU clock is enabled. | |
$ git log | head -1 | |
commit 55bbdb71b68bc085e1542d682b618733afbba7f0 | |
$ ./bssl speed | |
Did 2668 RSA 2048 signing operations in 3024997us (882.0 ops/sec) | |
Did 63000 RSA 2048 verify operations in 3013925us (20903.0 ops/sec) | |
Did 384 RSA 4096 signing operations in 3021658us (127.1 ops/sec) | |
Did 18648 RSA 4096 verify operations in 3061153us (6091.8 ops/sec) | |
Did 15826000 AES-128-GCM (16 bytes) seal operations in 3000086us (5275182.1 ops/sec): 84.4 MB/s | |
Did 2371000 AES-128-GCM (1350 bytes) seal operations in 3001295us (789992.3 ops/sec): 1066.5 MB/s | |
Did 459000 AES-128-GCM (8192 bytes) seal operations in 3003330us (152830.4 ops/sec): 1252.0 MB/s | |
Did 14188000 AES-256-GCM (16 bytes) seal operations in 3000172us (4729062.2 ops/sec): 75.7 MB/s | |
Did 2108000 AES-256-GCM (1350 bytes) seal operations in 3000831us (702472.1 ops/sec): 948.3 MB/s | |
Did 405000 AES-256-GCM (8192 bytes) seal operations in 3000866us (134961.0 ops/sec): 1105.6 MB/s | |
Did 1830000 ChaCha20-Poly1305 (16 bytes) seal operations in 3000261us (609946.9 ops/sec): 9.8 MB/s | |
Did 165000 ChaCha20-Poly1305 (1350 bytes) seal operations in 3003803us (54930.4 ops/sec): 74.2 MB/s | |
Did 31000 ChaCha20-Poly1305 (8192 bytes) seal operations in 3001209us (10329.2 ops/sec): 84.6 MB/s | |
Did 6916000 RC4-MD5 (16 bytes) seal operations in 3000439us (2304996.0 ops/sec): 36.9 MB/s | |
Did 1003000 RC4-MD5 (1350 bytes) seal operations in 3002208us (334087.4 ops/sec): 451.0 MB/s | |
Did 196000 RC4-MD5 (8192 bytes) seal operations in 3004536us (65234.7 ops/sec): 534.4 MB/s | |
Did 14270000 SHA-1 (16 bytes) operations in 3000123us (4756471.7 ops/sec): 76.1 MB/s | |
Did 5031000 SHA-1 (256 bytes) operations in 3000895us (1676499.8 ops/sec): 429.2 MB/s | |
Did 230000 SHA-1 (8192 bytes) operations in 3008167us (76458.5 ops/sec): 626.3 MB/s | |
Did 8701000 SHA-256 (16 bytes) operations in 3000102us (2900234.7 ops/sec): 46.4 MB/s | |
Did 2598000 SHA-256 (256 bytes) operations in 3000593us (865828.9 ops/sec): 221.7 MB/s | |
Did 114000 SHA-256 (8192 bytes) operations in 3002390us (37969.8 ops/sec): 311.0 MB/s | |
Did 5373000 SHA-512 (16 bytes) operations in 3000463us (1790723.6 ops/sec): 28.7 MB/s | |
Did 2568000 SHA-512 (256 bytes) operations in 3000312us (855911.0 ops/sec): 219.1 MB/s | |
Did 146000 SHA-512 (8192 bytes) operations in 3019743us (48348.5 ops/sec): 396.1 MB/s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Core i7 3630QM (2.4 GHz, 4 physical cores) | |
Mac OS X 10.9.4 | |
Variable CPU clock is enabled. | |
$ openssl version -a | |
OpenSSL 1.0.1h 5 Jun 2014 | |
built on: Thu Jun 5 09:52:04 PDT 2014 | |
platform: darwin64-x86_64-cc | |
options: bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) idea(int) blowfish(idx) | |
compiler: /usr/bin/clang -fPIC -fno-common -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -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 | |
OPENSSLDIR: "/opt/local/etc/openssl" | |
# OpenSSL is installed via MacPorts. | |
$ ./openssl version -a | |
WARNING: can't open config file: /etc/ssl/openssl.cnf | |
LibreSSL 2.0 | |
built on: date not available | |
platform: information not available | |
options: bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx) | |
compiler: information not available | |
OPENSSLDIR: "/etc/ssl" | |
# LibreSSL 2.0.1 is used. | |
$ openssl speed aes -multi 2 | |
OpenSSL 1.0.1h 5 Jun 2014 | |
built on: Thu Jun 5 09:52:04 PDT 2014 | |
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) | |
compiler: /usr/bin/clang -fPIC -fno-common -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -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 | |
aes-128 cbc 233987.61k 256944.00k 260955.77k 262276.78k 261668.86k | |
aes-192 cbc 200790.36k 215650.58k 218673.49k 215274.50k 221405.18k | |
aes-256 cbc 169768.54k 184920.17k 186631.42k 189642.07k 190270.12k | |
$ ./openssl speed aes -multi 2 | |
LibreSSL 2.0 | |
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 | |
aes-128 cbc 308235.13k 311109.44k 307163.48k 312201.22k 313532.42k | |
aes-192 cbc 264472.05k 235761.15k 268760.92k 268533.08k 269892.38k | |
aes-256 cbc 231601.74k 235600.47k 235135.15k 228865.37k 223232.00k | |
$ openssl speed rsa -multi 2 | |
OpenSSL 1.0.1h 5 Jun 2014 | |
built on: Thu Jun 5 09:52:04 PDT 2014 | |
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) | |
compiler: /usr/bin/clang -fPIC -fno-common -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -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 | |
sign verify sign/s verify/s | |
rsa 512 bits 0.000029s 0.000003s 35087.7 333333.3 | |
rsa 1024 bits 0.000089s 0.000007s 11267.7 142857.1 | |
rsa 2048 bits 0.000645s 0.000021s 1550.4 47619.0 | |
rsa 4096 bits 0.004682s 0.000076s 213.6 13157.9 | |
$ ./openssl speed rsa -multi 2 | |
LibreSSL 2.0 | |
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 | |
sign verify sign/s verify/s | |
rsa 512 bits 0.000084s 0.000006s 11904.8 166666.7 | |
rsa 1024 bits 0.000388s 0.000016s 2580.6 62500.0 | |
rsa 2048 bits 0.002250s 0.000050s 444.3 20000.0 | |
rsa 4096 bits 0.014314s 0.000189s 69.9 5277.2 | |
$ openssl speed ecdsa -multi 2 | |
OpenSSL 1.0.1h 5 Jun 2014 | |
built on: Thu Jun 5 09:52:04 PDT 2014 | |
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) | |
compiler: /usr/bin/clang -fPIC -fno-common -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -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 | |
sign verify sign/s verify/s | |
160 bit ecdsa (secp160r1) 0.0000s 0.0001s 25974.0 8033.3 | |
192 bit ecdsa (nistp192) 0.0000s 0.0002s 21978.0 6626.1 | |
224 bit ecdsa (nistp224) 0.0001s 0.0002s 16736.7 4902.1 | |
256 bit ecdsa (nistp256) 0.0001s 0.0002s 15094.6 4228.4 | |
384 bit ecdsa (nistp384) 0.0001s 0.0005s 8456.7 2076.0 | |
521 bit ecdsa (nistp521) 0.0002s 0.0010s 4689.4 984.3 | |
163 bit ecdsa (nistk163) 0.0001s 0.0003s 8620.7 3838.8 | |
233 bit ecdsa (nistk233) 0.0002s 0.0003s 4762.1 2934.7 | |
283 bit ecdsa (nistk283) 0.0003s 0.0007s 3238.9 1526.8 | |
409 bit ecdsa (nistk409) 0.0007s 0.0011s 1470.6 931.3 | |
571 bit ecdsa (nistk571) 0.0014s 0.0025s 737.5 404.9 | |
163 bit ecdsa (nistb163) 0.0001s 0.0003s 8714.6 3693.4 | |
233 bit ecdsa (nistb233) 0.0002s 0.0004s 4813.5 2758.6 | |
283 bit ecdsa (nistb283) 0.0003s 0.0007s 3252.0 1511.2 | |
409 bit ecdsa (nistb409) 0.0007s 0.0012s 1440.9 859.3 | |
571 bit ecdsa (nistb571) 0.0014s 0.0027s 730.7 372.2 | |
$ ./openssl speed ecdsa -multi 2 | |
LibreSSL 2.0 | |
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 | |
sign verify sign/s verify/s | |
160 bit ecdsa (secp160r1) 0.0001s 0.0003s 17391.3 3933.1 | |
192 bit ecdsa (nistp192) 0.0001s 0.0003s 15936.5 3992.4 | |
224 bit ecdsa (nistp224) 0.0001s 0.0004s 12461.2 2799.2 | |
256 bit ecdsa (nistp256) 0.0001s 0.0004s 11111.1 2623.1 | |
384 bit ecdsa (nistp384) 0.0002s 0.0008s 6060.6 1264.6 | |
521 bit ecdsa (nistp521) 0.0003s 0.0014s 3616.7 698.7 | |
163 bit ecdsa (nistk163) 0.0001s 0.0005s 8130.1 2196.6 | |
233 bit ecdsa (nistk233) 0.0002s 0.0007s 4282.7 1493.9 | |
283 bit ecdsa (nistk283) 0.0003s 0.0014s 2919.7 695.3 | |
409 bit ecdsa (nistk409) 0.0008s 0.0032s 1272.3 316.7 | |
571 bit ecdsa (nistk571) 0.0015s 0.0067s 659.5 148.9 | |
163 bit ecdsa (nistb163) 0.0001s 0.0005s 8213.6 2074.8 | |
233 bit ecdsa (nistb233) 0.0002s 0.0007s 4459.3 1426.6 | |
283 bit ecdsa (nistb283) 0.0003s 0.0016s 2896.5 639.7 | |
409 bit ecdsa (nistb409) 0.0008s 0.0035s 1311.0 287.1 | |
571 bit ecdsa (nistb571) 0.0016s 0.0076s 621.7 131.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Variable CPU clock is disabled. | |
$ ./openssl version -a | |
LibreSSL 2.0 | |
built on: date not available | |
platform: information not available | |
options: bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx) | |
compiler: information not available | |
OPENSSLDIR: "/etc/ssl" | |
$ ./openssl speed aes -multi 2 | |
LibreSSL 2.0 | |
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 | |
aes-128 cbc 413503.40k 424772.37k 424867.33k 427859.29k 428089.34k | |
aes-192 cbc 356533.98k 365271.77k 365217.88k 367305.05k 367266.47k | |
aes-256 cbc 308493.58k 320389.97k 320815.10k 322347.01k 322456.23k | |
$ ./openssl speed rsa -multi 2 | |
LibreSSL 2.0 | |
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 | |
sign verify sign/s verify/s | |
rsa 512 bits 0.000071s 0.000005s 14035.3 222222.2 | |
rsa 1024 bits 0.000356s 0.000013s 2805.0 76923.1 | |
rsa 2048 bits 0.002070s 0.000042s 483.1 23669.5 | |
rsa 4096 bits 0.012742s 0.000170s 78.5 5865.2 | |
$ ./openssl speed ecdsa -multi 2 | |
LibreSSL 2.0 | |
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 | |
sign verify sign/s verify/s | |
160 bit ecdsa (secp160r1) 0.0000s 0.0002s 21276.6 4576.8 | |
192 bit ecdsa (nistp192) 0.0000s 0.0002s 20725.9 4831.0 | |
224 bit ecdsa (nistp224) 0.0001s 0.0003s 15444.2 3281.8 | |
256 bit ecdsa (nistp256) 0.0001s 0.0003s 13698.6 2954.9 | |
384 bit ecdsa (nistp384) 0.0001s 0.0007s 7092.2 1440.9 | |
521 bit ecdsa (nistp521) 0.0002s 0.0013s 4158.0 789.1 | |
163 bit ecdsa (nistk163) 0.0001s 0.0004s 11111.1 2439.3 | |
233 bit ecdsa (nistk233) 0.0002s 0.0006s 5714.3 1712.3 | |
283 bit ecdsa (nistk283) 0.0003s 0.0013s 3619.9 763.9 | |
409 bit ecdsa (nistk409) 0.0006s 0.0028s 1585.4 356.7 | |
571 bit ecdsa (nistk571) 0.0013s 0.0060s 741.6 166.3 | |
163 bit ecdsa (nistb163) 0.0001s 0.0004s 11111.1 2280.5 | |
233 bit ecdsa (nistb233) 0.0002s 0.0006s 5763.7 1609.7 | |
283 bit ecdsa (nistb283) 0.0003s 0.0014s 3616.6 704.6 | |
409 bit ecdsa (nistb409) 0.0006s 0.0031s 1582.9 322.1 | |
571 bit ecdsa (nistb571) 0.0014s 0.0067s 740.5 148.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Variable CPU clock is disabled. | |
$ ./openssl version -a | |
OpenSSL 1.0.1h 5 Jun 2014 | |
built on: Tue Jul 15 17:08:00 JST 2014 | |
platform: linux-x86_64 | |
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx) | |
compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -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 | |
$ ./openssl speed aes -multi 2 | |
OpenSSL 1.0.1h 5 Jun 2014 | |
built on: Tue Jul 15 17:08:00 JST 2014 | |
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) | |
compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -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 | |
aes-128 cbc 272525.16k 298744.00k 305298.43k 307935.23k 308540.76k | |
aes-192 cbc 230838.17k 249378.26k 253916.25k 255751.51k 256199.34k | |
aes-256 cbc 200220.50k 214021.93k 217375.83k 218711.38k 219040.43k | |
$ ./openssl speed rsa -multi 2 | |
OpenSSL 1.0.1h 5 Jun 2014 | |
built on: Tue Jul 15 17:08:00 JST 2014 | |
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) | |
compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -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 | |
sign verify sign/s verify/s | |
rsa 512 bits 0.000022s 0.000002s 45454.5 500000.0 | |
rsa 1024 bits 0.000070s 0.000005s 14235.1 200000.0 | |
rsa 2048 bits 0.000546s 0.000017s 1829.8 60606.1 | |
rsa 4096 bits 0.003850s 0.000062s 259.7 16260.2 | |
$ ./openssl speed ecdsa -multi 2 | |
OpenSSL 1.0.1h 5 Jun 2014 | |
built on: Tue Jul 15 17:08:00 JST 2014 | |
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) | |
compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -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 | |
sign verify sign/s verify/s | |
160 bit ecdsa (secp160r1) 0.0000s 0.0001s 35714.3 10389.7 | |
192 bit ecdsa (nistp192) 0.0000s 0.0001s 29411.8 8639.3 | |
224 bit ecdsa (nistp224) 0.0000s 0.0002s 23809.5 6319.5 | |
256 bit ecdsa (nistp256) 0.0000s 0.0002s 20408.2 5479.6 | |
384 bit ecdsa (nistp384) 0.0001s 0.0004s 11049.7 2679.6 | |
521 bit ecdsa (nistp521) 0.0002s 0.0008s 6060.6 1263.5 | |
163 bit ecdsa (nistk163) 0.0001s 0.0002s 10309.3 5249.3 | |
233 bit ecdsa (nistk233) 0.0002s 0.0002s 5291.0 4032.4 | |
283 bit ecdsa (nistk283) 0.0003s 0.0004s 3546.1 2249.7 | |
409 bit ecdsa (nistk409) 0.0006s 0.0007s 1559.5 1410.4 | |
571 bit ecdsa (nistk571) 0.0014s 0.0017s 712.2 600.2 | |
163 bit ecdsa (nistb163) 0.0001s 0.0002s 10309.6 5098.5 | |
233 bit ecdsa (nistb233) 0.0002s 0.0003s 5340.5 3853.9 | |
283 bit ecdsa (nistb283) 0.0003s 0.0005s 3530.5 2118.6 | |
409 bit ecdsa (nistb409) 0.0006s 0.0008s 1552.8 1325.8 | |
571 bit ecdsa (nistb571) 0.0014s 0.0018s 719.3 557.8 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment