Skip to content

Benchmarks

Pascal Junod edited this page Nov 24, 2013 · 16 revisions

Software protection is inevitably linked with increased code size and slower performances. On this page, we publish benchmarks for various combinations of compilation flags.

OpenSSL

OpenSSL is the most widely deployed open-source cryptographic toolkit.

  • OpenSSL 1.0.1e, compiled with no obfuscation and standard compilation flags, C-only 64-bit implementations, run on an Intel Core i7 clocked @ 2.4 GHz under Mac OS X 10.8.5.

    • Size of libcrypto.a: 3'371'184 bytes
    • Size of libssl.a : 592'336 bytes
OpenSSL 1.0.1e 11 Feb 2013
built on: Sun Nov 24 14:05:43 CET 2013
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) 
compiler: obfuscator-llvm/working_branch/obfuscator-llvm/build/bin/Release/clang -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
mdc2             10450.82k    12748.52k    13755.33k    14005.93k    14203.12k
md4              27248.45k    96638.50k   279214.93k   519984.13k   700391.42k
md5              23552.89k    78022.21k   202613.08k   337656.15k   412469.93k
hmac(md5)        37069.81k   111016.13k   251370.41k   362646.87k   420926.81k
sha1             21413.18k    66064.49k   148607.83k   235136.09k   290766.85k
rmd160           21309.08k    67215.81k   164454.49k   247258.45k   292099.41k
rc4             332297.13k   351840.43k   365429.42k   357199.19k   357253.12k
des cbc          64811.63k    66126.78k    67803.31k    67692.20k    66671.96k
des ede3         24516.60k    24958.23k    25100.03k    25250.47k    25171.29k
idea cbc         73158.38k    74576.09k    75967.66k    77267.09k    77381.63k
seed cbc         71983.39k    72445.91k    73584.21k    73431.38k    72663.04k
rc2 cbc          37102.64k    37653.50k    37897.73k    38077.44k    38180.18k
blowfish cbc    101456.64k   106090.73k   107352.06k   108227.93k   109370.05k
cast cbc        104081.62k   107719.83k   108543.74k   110250.33k   110968.83k
aes-128 cbc     166374.77k   170936.25k   172209.66k   174535.00k   172725.59k
aes-192 cbc     142979.93k   145100.86k   147934.55k   148022.27k   147606.19k
aes-256 cbc     125551.18k   129374.66k   132039.51k   126946.65k   131402.41k
camellia-128 cbc   130709.78k   132506.03k   130935.47k   132316.16k   132169.73k
camellia-192 cbc   101994.55k   103848.41k   102466.70k   102450.86k   101749.54k
camellia-256 cbc   100849.56k   102087.04k   102309.84k   103865.34k   103563.26k
sha256           20026.40k    48390.78k    85548.71k   106697.39k   113885.18k
sha512           16267.34k    64235.24k   112194.30k   167185.07k   190887.25k
whirlpool        24057.77k    50450.56k    81417.47k    96423.59k   102064.13k
aes-128 ige     161647.38k   170119.85k   169633.88k   171347.63k   169571.67k
aes-192 ige     140363.04k   143451.52k   145919.66k   143633.41k   144673.45k
aes-256 ige     121747.67k   124857.30k   126876.67k   128619.52k   132461.91k
ghash           177742.12k   185119.59k   186870.33k   187124.05k   189964.29k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000182s 0.000014s   5493.4  70164.1
rsa 1024 bits 0.000886s 0.000039s   1129.0  25898.6
rsa 2048 bits 0.005149s 0.000122s    194.2   8182.1
rsa 4096 bits 0.032712s 0.000440s     30.6   2272.5
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000170s 0.000162s   5873.6   6159.2
dsa 1024 bits 0.000437s 0.000481s   2290.4   2079.4
dsa 2048 bits 0.001388s 0.001623s    720.7    616.3
                              sign    verify    sign/s verify/s
 160 bit ecdsa (secp160r1)   0.0001s   0.0006s   7518.7   1807.3
 192 bit ecdsa (nistp192)   0.0001s   0.0005s   7684.5   1967.0
 224 bit ecdsa (nistp224)   0.0002s   0.0008s   5680.4   1277.1
 256 bit ecdsa (nistp256)   0.0002s   0.0008s   5232.3   1260.6
 384 bit ecdsa (nistp384)   0.0004s   0.0016s   2776.4    610.6
 521 bit ecdsa (nistp521)   0.0006s   0.0031s   1602.5    319.6
 163 bit ecdsa (nistk163)   0.0002s   0.0010s   4134.3    981.4
 233 bit ecdsa (nistk233)   0.0004s   0.0015s   2271.4    689.6
 283 bit ecdsa (nistk283)   0.0007s   0.0033s   1482.8    306.8
 409 bit ecdsa (nistk409)   0.0015s   0.0070s    664.6    143.8
 571 bit ecdsa (nistk571)   0.0031s   0.0151s    319.3     66.1
 163 bit ecdsa (nistb163)   0.0002s   0.0011s   4098.4    913.2
 233 bit ecdsa (nistb233)   0.0004s   0.0016s   2277.8    640.4
 283 bit ecdsa (nistb283)   0.0007s   0.0035s   1458.4    286.9
 409 bit ecdsa (nistb409)   0.0015s   0.0078s    659.0    128.6
 571 bit ecdsa (nistb571)   0.0032s   0.0169s    314.2     59.2
                              op      op/s
 160 bit ecdh (secp160r1)   0.0004s   2250.7
 192 bit ecdh (nistp192)   0.0004s   2445.7
 224 bit ecdh (nistp224)   0.0006s   1597.5
 256 bit ecdh (nistp256)   0.0007s   1516.1
 384 bit ecdh (nistp384)   0.0014s    718.7
 521 bit ecdh (nistp521)   0.0026s    388.0
 163 bit ecdh (nistk163)   0.0005s   1962.5
 233 bit ecdh (nistk233)   0.0007s   1379.7
 283 bit ecdh (nistk283)   0.0016s    623.0
 409 bit ecdh (nistk409)   0.0035s    285.9
 571 bit ecdh (nistk571)   0.0074s    135.3
 163 bit ecdh (nistb163)   0.0005s   1840.5
 233 bit ecdh (nistb233)   0.0008s   1291.0
 283 bit ecdh (nistb283)   0.0018s    571.1
 409 bit ecdh (nistb409)   0.0038s    261.6
 571 bit ecdh (nistb571)   0.0084s    118.7
  • OpenSSL 1.0.1e, compiled with -mllvm -sub and standard compilation flags, C-only 64-bit implementations, run on an Intel Core i7 clocked @ 2.4 GHz.

    • Size of libcrypto.a: 3'382'600 bytes
    • Size of libssl.a : 594'128 bytes
OpenSSL 1.0.1e 11 Feb 2013
built on: Sun Nov 24 14:37:49 CET 2013
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) 
compiler: obfuscator-llvm/working_branch/obfuscator-llvm/build/bin/Release/clang -mllvm -sub -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
mdc2             10079.43k    12281.02k    13002.58k    13241.69k    13202.77k
md4              25757.02k    88290.47k   247721.64k   474028.78k   646687.40k
md5              20147.98k    65221.23k   182223.70k   297061.38k   373598.89k
hmac(md5)        32945.88k    99261.72k   223352.23k   326418.77k   376141.14k
sha1             20874.20k    63700.71k   149144.32k   225432.92k   267168.43k
rmd160           19813.39k    60037.33k   139963.56k   210720.09k   247209.98k
rc4             332247.90k   356907.56k   371004.76k   376913.51k   373718.50k
des cbc          58760.95k    60434.09k    60455.94k    60237.48k    60730.03k
des ede3         23278.94k    23559.45k    23335.51k    23723.01k    23713.11k
idea cbc         68512.19k    70147.20k    70692.10k    71877.95k    71660.89k
seed cbc         70163.64k    70548.01k    70321.41k    70718.33k    70462.12k
rc2 cbc          35668.01k    35865.09k    36363.18k    36760.92k    36691.97k
blowfish cbc     98102.20k   102211.75k   104066.05k   104230.91k   104090.28k
cast cbc         86433.79k    90988.69k    91086.68k    91380.74k    92072.62k
aes-128 cbc     156821.19k   161432.51k   163689.48k   163353.94k   164645.55k
aes-192 cbc     135056.43k   140828.20k   140690.18k   139946.67k   139378.69k
aes-256 cbc     119601.82k   122727.00k   124001.45k   122870.44k   124248.06k
camellia-128 cbc   124126.27k   125675.67k   126702.34k   123909.80k   125550.59k
camellia-192 cbc    95002.64k    96644.69k    96728.41k    96873.13k    97984.51k
camellia-256 cbc    94947.01k    97460.10k    96943.36k    97002.84k    97752.41k
sha256           19108.26k    44928.41k    78770.94k    99937.96k   105537.54k
sha512           14304.69k    56231.81k    95766.36k   140968.96k   160869.03k
whirlpool        22066.05k    45570.07k    75723.95k    91325.44k    96048.47k
aes-128 ige     150417.87k   158847.17k   162078.29k   162871.30k   161314.13k
aes-192 ige     131627.32k   135542.55k   137612.80k   137676.12k   136915.63k
aes-256 ige     115674.07k   121130.15k   120194.90k   121600.00k   121101.87k
ghash           167145.96k   179007.57k   181323.18k   180864.68k   182435.84k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.000191s 0.000015s   5234.6  67866.9
rsa 1024 bits 0.000910s 0.000041s   1098.5  24574.0
rsa 2048 bits 0.005333s 0.000130s    187.5   7691.9
rsa 4096 bits 0.034364s 0.000469s     29.1   2132.5
                  sign    verify    sign/s verify/s
dsa  512 bits 0.000174s 0.000163s   5741.4   6117.7
dsa 1024 bits 0.000458s 0.000498s   2181.8   2008.6
dsa 2048 bits 0.001441s 0.001680s    694.2    595.1
                              sign    verify    sign/s verify/s
 160 bit ecdsa (secp160r1)   0.0001s   0.0005s   7362.9   1828.0
 192 bit ecdsa (nistp192)   0.0001s   0.0005s   7493.8   1951.7
 224 bit ecdsa (nistp224)   0.0002s   0.0007s   5760.8   1333.5
 256 bit ecdsa (nistp256)   0.0002s   0.0008s   5021.1   1194.8
 384 bit ecdsa (nistp384)   0.0004s   0.0017s   2709.9    587.3
 521 bit ecdsa (nistp521)   0.0006s   0.0033s   1585.9    307.6
 163 bit ecdsa (nistk163)   0.0003s   0.0011s   3968.4    888.6
 233 bit ecdsa (nistk233)   0.0005s   0.0016s   2184.0    631.5
 283 bit ecdsa (nistk283)   0.0007s   0.0035s   1406.5    285.0
 409 bit ecdsa (nistk409)   0.0016s   0.0076s    629.0    131.0
 571 bit ecdsa (nistk571)   0.0033s   0.0165s    301.8     60.8
 163 bit ecdsa (nistb163)   0.0003s   0.0012s   3918.5    836.5
 233 bit ecdsa (nistb233)   0.0005s   0.0017s   2163.5    589.5
 283 bit ecdsa (nistb283)   0.0007s   0.0039s   1389.1    259.6
 409 bit ecdsa (nistb409)   0.0016s   0.0089s    624.6    112.1
 571 bit ecdsa (nistb571)   0.0034s   0.0187s    293.6     53.5
                              op      op/s
 160 bit ecdh (secp160r1)   0.0005s   2100.4
 192 bit ecdh (nistp192)   0.0004s   2306.8
 224 bit ecdh (nistp224)   0.0007s   1500.9
 256 bit ecdh (nistp256)   0.0007s   1358.6
 384 bit ecdh (nistp384)   0.0015s    688.4
 521 bit ecdh (nistp521)   0.0028s    359.2
 163 bit ecdh (nistk163)   0.0006s   1712.8
 233 bit ecdh (nistk233)   0.0008s   1257.1
 283 bit ecdh (nistk283)   0.0018s    558.8
 409 bit ecdh (nistk409)   0.0040s    249.3
 571 bit ecdh (nistk571)   0.0086s    116.0
 163 bit ecdh (nistb163)   0.0006s   1624.2
 233 bit ecdh (nistb233)   0.0008s   1191.0
 283 bit ecdh (nistb283)   0.0019s    525.7
 409 bit ecdh (nistb409)   0.0043s    232.0
 571 bit ecdh (nistb571)   0.0093s    107.2
  • OpenSSL 1.0.1e, compiled with -mllvm -bcf and standard compilation flags, C-only 64-bit implementations, run on an Intel Core i7 clocked @ 2.4 GHz.

    • Size of libcrypto.a: 3'395'424 bytes
    • Size of libssl.a : 593'936 bytes
  • OpenSSL 1.0.1e, compiled with -mllvm -fla and standard compilation flags, C-only 64-bit implementations, run on an Intel Core i7 clocked @ 2.4 GHz.

    • Size of libcrypto.a: 4'388'912 bytes
    • Size of libssl.a : 867'456 bytes
OpenSSL 1.0.1e 11 Feb 2013
built on: Sun Nov 24 14:48:40 CET 2013
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) 
compiler: obfuscator-llvm/working_branch/obfuscator-llvm/build/bin/Release/clang -mllvm -fla -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
mdc2              3147.92k     5458.60k     6628.44k     7112.70k     7208.96k
md4               5270.57k    19013.69k    76678.14k   227155.63k   554146.33k
md5               4626.06k    17899.95k    63085.57k   175522.13k   357381.46k
hmac(md5)        18593.96k    59368.79k   166442.24k   303795.54k   399447.38k
sha1              5295.80k    19771.07k    63066.11k   151979.07k   251972.27k
rmd160            5320.31k    19637.99k    64942.85k   154044.07k   257329.83k
rc4             158282.67k   243777.07k   294796.97k   311411.03k   317041.32k
des cbc          53353.97k    59928.38k    62774.54k    61767.00k    62272.85k
des ede3         22366.79k    23386.33k    23551.83k    23786.84k    23786.84k
idea cbc         30553.26k    34631.66k    35675.22k    36117.16k    35995.65k
seed cbc         55056.38k    58866.22k    62876.50k    63363.07k    63709.18k
rc2 cbc          28771.61k    30533.89k    30707.37k    30971.56k    30801.92k
blowfish cbc     80185.83k    94998.36k    99342.68k    99886.08k   100898.13k
cast cbc         79391.55k    92747.71k    96983.47k    98133.33k    98344.96k
aes-128 cbc      91738.17k   100095.27k   107063.47k   109550.25k   109202.09k
aes-192 cbc      78510.10k    87663.06k    94199.30k    96413.01k    96343.38k
aes-256 cbc      74427.27k    81741.65k    85364.31k    85644.63k    86201.69k
camellia-128 cbc    61714.94k    64085.55k    68229.12k    67995.31k    67843.41k
camellia-192 cbc    47599.07k    53539.50k    56563.33k    57370.28k    57661.82k
camellia-256 cbc    52983.96k    55252.99k    57102.68k    57638.57k    57554.26k
sha256            6693.25k    15545.51k    28149.16k    35052.20k    38032.73k
sha512            4058.90k    16660.07k    27805.70k    40517.63k    46282.07k
whirlpool        11716.12k    28506.20k    52885.08k    66890.07k    72723.11k
aes-128 ige      52744.46k    71490.65k    81655.38k    83492.86k    83435.52k
aes-192 ige      47672.85k    65313.05k    73157.63k    74373.46k    76346.71k
aes-256 ige      46832.80k    60755.22k    67142.74k    69747.03k    69798.57k
ghash            81151.40k    93627.78k    99240.11k    98703.70k   100321.96k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.001960s 0.000160s    510.2   6266.2
rsa 1024 bits 0.009891s 0.000421s    101.1   2377.3
rsa 2048 bits 0.054645s 0.001368s     18.3    730.7
rsa 4096 bits 0.328710s 0.004602s      3.0    217.3
                  sign    verify    sign/s verify/s
dsa  512 bits 0.001745s 0.001921s    573.2    520.6
dsa 1024 bits 0.004500s 0.005285s    222.2    189.2
dsa 2048 bits 0.013680s 0.016529s     73.1     60.5
                              sign    verify    sign/s verify/s
 160 bit ecdsa (secp160r1)   0.0012s   0.0062s    831.1    160.1
 192 bit ecdsa (nistp192)   0.0012s   0.0062s    834.3    162.0
 224 bit ecdsa (nistp224)   0.0016s   0.0086s    617.0    116.3
 256 bit ecdsa (nistp256)   0.0018s   0.0094s    557.9    105.9
 384 bit ecdsa (nistp384)   0.0034s   0.0192s    293.3     52.1
 521 bit ecdsa (nistp521)   0.0060s   0.0348s    167.6     28.7
 163 bit ecdsa (nistk163)   0.0017s   0.0059s    592.7    170.4
 233 bit ecdsa (nistk233)   0.0031s   0.0078s    319.2    127.4
 283 bit ecdsa (nistk283)   0.0045s   0.0147s    221.0     68.2
 409 bit ecdsa (nistk409)   0.0098s   0.0271s    102.3     36.9
 571 bit ecdsa (nistk571)   0.0198s   0.0552s     50.4     18.1
 163 bit ecdsa (nistb163)   0.0017s   0.0063s    593.3    159.8
 233 bit ecdsa (nistb233)   0.0031s   0.0083s    325.3    120.8
 283 bit ecdsa (nistb283)   0.0046s   0.0161s    219.7     62.2
 409 bit ecdsa (nistb409)   0.0101s   0.0302s     99.0     33.1
 571 bit ecdsa (nistb571)   0.0203s   0.0626s     49.3     16.0
                              op      op/s
 160 bit ecdh (secp160r1)   0.0055s    181.9
 192 bit ecdh (nistp192)   0.0055s    180.6
 224 bit ecdh (nistp224)   0.0076s    132.1
 256 bit ecdh (nistp256)   0.0082s    121.5
 384 bit ecdh (nistp384)   0.0169s     59.1
 521 bit ecdh (nistp521)   0.0297s     33.7
 163 bit ecdh (nistk163)   0.0029s    340.1
 233 bit ecdh (nistk233)   0.0040s    251.7
 283 bit ecdh (nistk283)   0.0075s    132.7
 409 bit ecdh (nistk409)   0.0135s     73.9
 571 bit ecdh (nistk571)   0.0283s     35.4
 163 bit ecdh (nistb163)   0.0031s    323.2
 233 bit ecdh (nistb233)   0.0041s    243.9
 283 bit ecdh (nistb283)   0.0080s    125.5
 409 bit ecdh (nistb409)   0.0144s     69.6
 571 bit ecdh (nistb571)   0.0289s     34.6
  • OpenSSL 1.0.1e, compiled with -mllvm -fla -mllvm -bcf and standard compilation flags, C-only 64-bit implementations, run on an Intel Core i7 clocked @ 2.4 GHz.

    • Size of libcrypto.a: 5'704'064 bytes
    • Size of libssl.a : 1'191'376 bytes
  • OpenSSL 1.0.1e, compiled with -mllvm -sub -mllvm -fla -mllvm -bcf -mllvm -boguscf-loop=2 -mllvm -boguscf-prob=100 and standard compilation flags, C-only 64-bit implementations, run on an Intel Core i7 clocked @ 2.4 GHz.

    • Size of libcrypto.a: 21'441'280 bytes
    • Size of libssl.a : 5'003'640 bytes
Clone this wiki locally