Skip to content

Instantly share code, notes, and snippets.

@yongbin
Last active August 29, 2015 13:56
Show Gist options
  • Save yongbin/9340541 to your computer and use it in GitHub Desktop.
Save yongbin/9340541 to your computer and use it in GitHub Desktop.
Compare OSX 10.8.5(Mountain Lion) built-it openssl 0.9.8y speed and homebrewed openssl 1.0.1f speed

OSX built-in openssl

$ /usr/bin/openssl speed
OpenSSL 0.9.8y 5 Feb 2013
built on: Jun 27 2013
options:bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) blowfish(ptr2)
compiler: -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O3 -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DMD32_REG_T=int -DOPENSSL_NO_IDEA -DOPENSSL_PIC -DOPENSSL_THREADS -DZLIB -mmacosx-version-min=10.6
available timing options: TIMEB USE_TOD HZ=100 [sysconf value]
timing function used: getrusage
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md2               2644.45k     5353.54k     7530.93k     8283.87k     8498.40k
mdc2             10988.30k    12323.54k    12663.51k    12838.96k    12525.07k
md4              37554.73k   126519.16k   346449.73k   603848.55k   809579.90k
md5              31658.29k   104934.68k   252292.79k   450797.17k   550578.78k
hmac(md5)        38024.56k   123472.83k   304050.95k   462937.40k   561497.55k
sha1             28268.06k    66649.78k   136706.04k   287471.74k   329907.67k
rmd160           27281.20k    78240.36k   179197.09k   260791.40k   302136.85k
rc4             386748.16k   410057.64k   424046.92k   412892.05k   422002.48k
des cbc          57972.73k    60374.16k    61232.85k    62169.30k    63347.76k
des ede3         22990.94k    22631.10k    23410.24k    23343.13k    22688.81k
idea cbc             0.00         0.00         0.00         0.00         0.00
seed cbc         68859.12k    71658.89k    72129.56k    72709.00k    72435.25k
rc2 cbc          34426.00k    35316.76k    35208.43k    35488.79k    34783.34k
rc5-32/12 cbc   156858.37k   169649.84k   174848.82k   177445.93k   176559.68k
blowfish cbc     99737.80k   105327.17k   104345.80k   106416.32k   105790.12k
cast cbc         79307.29k    82200.64k    83257.32k    83935.19k    81880.99k
aes-128 cbc     121586.23k   128420.66k   132845.38k   129682.55k   127448.18k
aes-192 cbc     101968.96k   104350.56k   108093.58k   107400.47k   106988.33k
aes-256 cbc      90783.54k    92246.17k    96102.65k    96554.24k    96552.47k
camellia-128 cbc        0.00         0.00         0.00         0.00         0.00
camellia-192 cbc        0.00         0.00         0.00         0.00         0.00
camellia-256 cbc        0.00         0.00         0.00         0.00         0.00
sha256           19810.59k    48320.21k    93297.30k   116874.69k   123482.15k
sha512           15140.39k    59350.26k   112940.19k   168983.94k   200438.30k
aes-128 ige     130741.81k   137738.23k   138585.57k   132160.28k   138343.97k
aes-192 ige     108896.55k   117183.80k   120609.53k   119038.40k   119505.99k
aes-256 ige      99671.77k   104811.89k   106795.95k   103145.61k   101593.96k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000260s 0.000021s   3841.8  48571.6
rsa 1024 bits 0.001182s 0.000053s    846.1  18779.3
rsa 2048 bits 0.006497s 0.000174s    153.9   5736.8
rsa 4096 bits 0.042064s 0.000624s     23.8   1603.8
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000209s 0.000224s   4783.6   4457.6
dsa 1024 bits 0.000545s 0.000655s   1834.5   1526.8
dsa 2048 bits 0.001716s 0.002130s    582.8    469.5

homebrewed openssl

$ ~/homebrew/Cellar/openssl/1.0.1f/bin/openssl speed
OpenSSL 1.0.1f 6 Jan 2014
built on: Fri Jan 24 11:18:43 KST 2014
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx)
compiler: clang -fPIC -fno-common -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -Os -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
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md2                  0.00         0.00         0.00         0.00         0.00
mdc2             11583.42k    12290.87k    13098.38k    12767.70k    12898.98k
md4              66753.96k   195568.44k   453964.20k   701081.26k   831575.67k
md5              50194.94k   154626.90k   356641.48k   517218.65k   613580.80k
hmac(md5)        41546.56k   123655.50k   323819.35k   499691.11k   609804.29k
sha1             50145.17k   144669.91k   311048.13k   459805.65k   477541.02k
rmd160           41580.16k   108043.75k   206045.35k   259464.82k   304401.07k
rc4             366930.52k   385850.43k   406424.49k   410783.74k   408167.08k
des cbc          59741.18k    61361.88k    62366.22k    60728.01k    62922.23k
des ede3         23365.88k    23710.12k    23469.74k    23229.53k    22795.13k
idea cbc         60052.30k    63568.91k    66838.35k    65731.90k    66536.03k
seed cbc         73206.67k    74523.75k    74367.06k    78144.90k    77455.36k
rc2 cbc          31349.96k    32009.92k    32588.29k    32284.77k    32074.83k
rc5-32/12 cbc        0.00         0.00         0.00         0.00         0.00
blowfish cbc    100406.28k   104105.25k   109363.20k   111048.70k   111899.99k
cast cbc        102874.66k   103780.22k   109687.52k   112853.33k   111796.22k
aes-128 cbc      73825.70k    83261.24k    84734.96k    87868.48k    93499.13k
aes-192 cbc      73316.57k    80379.32k    82372.01k    82863.45k    81171.80k
aes-256 cbc      62932.42k    65583.35k    69134.13k    70035.09k    69722.11k
camellia-128 cbc    84272.54k   117553.23k   137025.96k   135541.98k   135885.83k
camellia-192 cbc    69237.88k    95028.10k   106190.08k   108822.53k   108027.90k
camellia-256 cbc    73136.33k    97202.58k   104470.35k   109069.99k   104729.26k
sha256           38971.14k    88136.28k   149689.96k   180972.89k   186370.73k
sha512           29475.49k   121051.42k   192310.95k   270259.54k   297825.62k
whirlpool        23895.09k    45220.86k    72743.49k    94203.22k    84802.27k
aes-128 ige      89737.65k    91672.41k    93397.19k    94166.02k    92333.98k
aes-192 ige      72357.07k    73587.46k    75016.22k    74584.22k    75514.35k
aes-256 ige      63371.76k    66795.97k    67061.42k    68051.97k    67166.21k
ghash           684015.68k  1132968.83k  1348034.92k  1260659.50k  1247776.30k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000097s 0.000008s  10292.2 123523.1
rsa 1024 bits 0.000309s 0.000019s   3233.5  51578.6
rsa 2048 bits 0.002052s 0.000064s    487.4  15509.2
rsa 4096 bits 0.014910s 0.000257s     67.1   3885.3
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000083s 0.000085s  12077.0  11804.9
dsa 1024 bits 0.000195s 0.000220s   5120.5   4549.3
dsa 2048 bits 0.000629s 0.000773s   1588.6   1294.2
                              sign    verify    sign/s verify/s
 160 bit ecdsa (secp160r1)   0.0001s   0.0003s  10285.2   2978.7
 192 bit ecdsa (nistp192)   0.0001s   0.0004s   8481.3   2463.7
 224 bit ecdsa (nistp224)   0.0001s   0.0002s  10141.2   5120.1
 256 bit ecdsa (nistp256)   0.0002s   0.0004s   6505.1   2754.3
 384 bit ecdsa (nistp384)   0.0003s   0.0015s   3047.2    682.6
 521 bit ecdsa (nistp521)   0.0005s   0.0012s   1903.6    862.0
 163 bit ecdsa (nistk163)   0.0003s   0.0007s   3766.7   1473.1
 233 bit ecdsa (nistk233)   0.0005s   0.0009s   1878.6   1147.9
 283 bit ecdsa (nistk283)   0.0008s   0.0016s   1303.4    625.8
 409 bit ecdsa (nistk409)   0.0018s   0.0027s    569.3    364.7
 571 bit ecdsa (nistk571)   0.0038s   0.0062s    261.9    160.5
 163 bit ecdsa (nistb163)   0.0003s   0.0007s   3752.7   1413.3
 233 bit ecdsa (nistb233)   0.0005s   0.0009s   1950.1   1099.3
 283 bit ecdsa (nistb283)   0.0008s   0.0017s   1265.1    581.6
 409 bit ecdsa (nistb409)   0.0018s   0.0030s    570.3    330.5
 571 bit ecdsa (nistb571)   0.0037s   0.0067s    268.1    148.2
                              op      op/s
 160 bit ecdh (secp160r1)   0.0003s   3410.4
 192 bit ecdh (nistp192)   0.0003s   2944.1
 224 bit ecdh (nistp224)   0.0001s   7854.3
 256 bit ecdh (nistp256)   0.0003s   3938.6
 384 bit ecdh (nistp384)   0.0012s    830.0
 521 bit ecdh (nistp521)   0.0008s   1211.0
 163 bit ecdh (nistk163)   0.0003s   3016.7
 233 bit ecdh (nistk233)   0.0004s   2363.9
 283 bit ecdh (nistk283)   0.0008s   1267.6
 409 bit ecdh (nistk409)   0.0014s    734.7
 571 bit ecdh (nistk571)   0.0031s    323.0
 163 bit ecdh (nistb163)   0.0004s   2834.8
 233 bit ecdh (nistb233)   0.0005s   2197.9
 283 bit ecdh (nistb283)   0.0008s   1222.1
 409 bit ecdh (nistb409)   0.0015s    678.3
 571 bit ecdh (nistb571)   0.0033s    302.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment