Crypto++ 5.2.1 Benchmarks
Here are speed benchmarks for some of the most commonly used cryptographic algorithms.
All were coded in C++, compiled with Microsoft Visual C++ .NET 2003
(whole program optimization, optimize for speed, P4 code generation), and ran on a Pentium 4
2.1 GHz processor under Windows XP SP 1. 386 assembly routines were used
for multipleprecision addition and subtraction. SSE2 intrinsics were used
for multipleprecision multiplication.
Also available are benchmarks that ran on an AMD Opteron 1.6 GHz processor under Linux 2.4.21.
Those were compiled with GCC 3.2.2 using O2 optimization, and inline assembly was used to access the 64bit multiplication instruction.
Algorithm  Megabytes(2^20 bytes) Processed  Time Taken  MB/Second

CRC32  2.05e+003  6.399  320.050


Adler32  4.1e+003  3.525  1161.986


MD2  16  4.006  3.994


MD5  1.02e+003  4.726  216.674


SHA1  256  3.766  67.977


SHA256  256  5.758  44.460


SHA512  64  5.618  11.392


HAVAL (pass=3)  512  4.717  108.544


HAVAL (pass=4)  256  3.695  69.283


HAVAL (pass=5)  256  3.796  67.439


Tiger  128  3.364  38.050


RIPEMD160  256  4.867  52.599


Panama Hash (little endian)  1.02e+003  3.375  303.407


Panama Hash (big endian)  1.02e+003  4.637  220.832


Whirlpool  64  5.288  12.103


MDC/MD5  256  5.377  47.610


LubyRackoff/MD5  64  4.307  14.860


DES  128  5.998  21.340


DESXEX3  128  6.159  20.783


DESEDE3  64  6.499  9.848


IDEA  64  3.375  18.963


RC2  64  5.548  11.536


RC5 (r=16)  256  4.286  59.729


Blowfish  256  3.976  64.386


3WAY  128  3.665  34.789


TEA  128  5.378  23.801


SAFER (r=8)  128  6.279  20.385


GOST  128  3.505  36.519


SHARK (r=6)  128  3.826  33.455


CAST128  256  5.988  42.752


CAST256  128  5.889  21.735


Square  128  4.176  30.651


SKIPJACK  128  6.329  20.224


RC6  128  3.385  37.814


MARS  128  4.586  27.911


Rijndael (128bit key)  256  4.196  61.010


Rijndael (192bit key)  256  4.817  53.145


Rijndael (256bit key)  256  5.308  48.229


Rijndael (128) CTR  256  4.436  57.710


Rijndael (128) OFB  256  4.837  52.925


Rijndael (128) CFB  256  5.378  47.601


Rijndael (128) CBC  256  4.617  55.447


Twofish  128  4.075  31.411


Serpent  128  6.069  21.091


ARC4  512  4.517  113.350


SEAL3.0BE  1.02e+003  3.485  293.831


SEAL3.0LE  2.05e+003  4.937  414.827


WAKECFBBE  512  5.498  93.125


WAKECFBLE  512  3.615  141.632


WAKEOFBBE  512  3.855  132.815


WAKEOFBLE  512  3.836  133.472


Panama Cipher (little endian)  1.02e+003  4.036  253.717


Panama Cipher (big endian)  1.02e+003  5.317  192.590


SHACAL2 (128bit key)  128  6.279  20.385


SHACAL2 (512bit key)  128  6.279  20.385


Camellia (128bit key)  64  3.355  19.076


Camellia (192bit key)  64  4.437  14.424


Camellia (256bit key)  64  4.416  14.493


MD5MAC  1.02e+003  5.528  185.239


XMACC/MD5  1.02e+003  5.999  170.695


HMAC/MD5  1.02e+003  4.726  216.674


TwoTrackMAC  256  4.817  53.145


CBCMAC/Rijndael  256  4.447  57.567


DMAC/Rijndael  256  4.476  57.194


BlumBlumShub 512  0.25  3.585  0.070


BlumBlumShub 1024  0.125  4.096  0.031


BlumBlumShub 2048  0.0625  5.869  0.011


Operation  Iterations  Total Time  Milliseconds/Operation

RSA 1024 Encryption  27607  5.007  0.18


RSA 1024 Decryption  1050  5.007  4.77


Rabin 1024 Encryption  3008  5.007  1.66


Rabin 1024 Decryption  795  5.007  6.30


LUC 1024 Encryption  23544  5.008  0.21


LUC 1024 Decryption  634  5.007  7.90


DLIES 1024 Encryption  1159  5.007  4.32


DLIES 1024 Encryption with precomputation  1061  5.007  4.72


DLIES 1024 Decryption  350  5.008  14.31


LUCELG 512 Encryption  2433  5.007  2.06


LUCELG 512 Encryption with precomputation  2402  5.007  2.08


LUCELG 512 Decryption  2744  5.007  1.82

RSA 2048 Encryption  11022  5.007  0.45


RSA 2048 Decryption  177  5.028  28.41


Rabin 2048 Encryption  1254  5.007  3.99


Rabin 2048 Decryption  159  5.027  31.62


LUC 2048 Encryption  8756  5.007  0.57


LUC 2048 Decryption  110  5.037  45.79


DLIES 2048 Encryption  260  5.007  19.26


DLIES 2048 Encryption with precomputation  269  5.017  18.65


DLIES 2048 Decryption  60  5.027  83.78


LUCELG 1024 Encryption  532  5.008  9.41


LUCELG 1024 Encryption with precomputation  531  5.007  9.43


LUCELG 1024 Decryption  772  5.007  6.49

RSA 1024 Signature  1053  5.007  4.75


RSA 1024 Verification  27406  5.007  0.18


Rabin 1024 Signature  816  5.008  6.14


Rabin 1024 Verification  3117  5.007  1.61


RW 1024 Signature  951  5.007  5.26


RW 1024 Verification  55580  5.007  0.09


LUC 1024 Signature  644  5.007  7.77


LUC 1024 Verification  24321  5.008  0.21


NR 1024 Signature  2260  5.007  2.22


NR 1024 Signature with precomputation  4376  5.007  1.14


NR 1024 Verification  1964  5.007  2.55


NR 1024 Verification with precomputation  2738  5.007  1.83


DSA 1024 Signature  2301  5.008  2.18


DSA 1024 Signature with precomputation  4444  5.007  1.13


DSA 1024 Verification  2007  5.007  2.49


DSA 1024 Verification with precomputation  2795  5.007  1.79


LUCHMP 512 Signature  2365  5.007  2.12


LUCHMP 512 Signature with precomputation  2401  5.008  2.09


LUCHMP 512 Verification  2312  5.007  2.17


LUCHMP 512 Verification with precomputation  2269  5.007  2.21


ESIGN 1023 Signature  9837  5.007  0.51


ESIGN 1023 Verification  27679  5.007  0.18


ESIGN 1536 Signature  4898  5.008  1.02


ESIGN 1536 Verification  11940  5.007  0.42

RSA 2048 Signature  178  5.007  28.13


RSA 2048 Verification  11054  5.007  0.45


Rabin 2048 Signature  158  5.028  31.82


Rabin 2048 Verification  1294  5.007  3.87


RW 2048 Signature  176  5.017  28.51


RW 2048 Verification  24521  5.007  0.20


LUC 2048 Signature  110  5.007  45.52


LUC 2048 Verification  9072  5.008  0.55


NR 2048 Signature  511  5.007  9.80


NR 2048 Signature with precomputation  1530  5.007  3.27


NR 2048 Verification  454  5.007  11.03


NR 2048 Verification with precomputation  982  5.008  5.10


LUCHMP 1024 Signature  522  5.007  9.59


LUCHMP 1024 Signature with precomputation  527  5.007  9.50


LUCHMP 1024 Verification  520  5.007  9.63


LUCHMP 1024 Verification with precomputation  499  5.007  10.03


ESIGN 2046 Signature  4253  5.008  1.18


ESIGN 2046 Verification  11024  5.007  0.45

XTRDH 171 KeyPair Generation  2802  5.007  1.79


XTRDH 171 Key Agreement  1360  5.007  3.68


XTRDH 342 KeyPair Generation  777  5.007  6.44


XTRDH 342 Key Agreement  404  5.018  12.42


DH 1024 KeyPair Generation  2283  5.007  2.19


DH 1024 KeyPair Generation with precomputation  2072  5.007  2.42


DH 1024 Key Agreement  1298  5.007  3.86


DH 2048 KeyPair Generation  512  5.007  9.78


DH 2048 KeyPair Generation with precomputation  524  5.007  9.56


DH 2048 Key Agreement  368  5.027  13.66


LUCDIF 512 KeyPair Generation  4688  5.007  1.07


LUCDIF 512 KeyPair Generation with precomputation  4339  5.007  1.15


LUCDIF 512 Key Agreement  2880  5.008  1.74


LUCDIF 1024 KeyPair Generation  1057  5.007  4.74


LUCDIF 1024 KeyPair Generation with precomputation  1037  5.007  4.83


LUCDIF 1024 Key Agreement  776  5.017  6.47


MQV 1024 KeyPair Generation  2311  5.007  2.17


MQV 1024 KeyPair Generation with precomputation  4595  5.008  1.09


MQV 1024 Key Agreement  1224  5.007  4.09


MQV 2048 KeyPair Generation  522  5.007  9.59


MQV 2048 KeyPair Generation with precomputation  1572  5.007  3.19


MQV 2048 Key Agreement  282  5.017  17.79

ECIES over GF(p) 168 Encryption  759  5.008  6.60


ECIES over GF(p) 168 Encryption with precomputation  1327  5.007  3.77


ECIES over GF(p) 168 Decryption  1062  5.007  4.71


ECNR over GF(p) 168 Signature  1497  5.007  3.34


ECNR over GF(p) 168 Signature with precomputation  2629  5.007  1.90


ECNR over GF(p) 168 Verification  794  5.008  6.31


ECNR over GF(p) 168 Verification with precomputation  1618  5.007  3.09


ECDHC over GF(p) 168 KeyPair Generation  1536  5.007  3.26


ECDHC over GF(p) 168 KeyPair Generation with precomputation  2576  5.007  1.94


ECDHC over GF(p) 168 Key Agreement  1474  5.007  3.40


ECMQVC over GF(p) 168 KeyPair Generation  1529  5.008  3.28


ECMQVC over GF(p) 168 KeyPair Generation with precomputation  2588  5.007  1.93


ECMQVC over GF(p) 168 Key Agreement  746  5.007  6.71

ECIES over GF(2^n) 155 Encryption  414  5.007  12.09


ECIES over GF(2^n) 155 Encryption with precomputation  1071  5.008  4.68


ECIES over GF(2^n) 155 Decryption  633  5.007  7.91


ECNR over GF(2^n) 155 Signature  827  5.007  6.05


ECNR over GF(2^n) 155 Signature with precomputation  2132  5.007  2.35


ECNR over GF(2^n) 155 Verification  655  5.007  7.64


ECNR over GF(2^n) 155 Verification with precomputation  1232  5.008  4.06


ECDHC over GF(2^n) 155 KeyPair Generation  806  5.007  6.21


ECDHC over GF(2^n) 155 KeyPair Generation with precomputation  2124  5.007  2.36


ECDHC over GF(2^n) 155 Key Agreement  780  5.007  6.42


ECMQVC over GF(2^n) 155 KeyPair Generation  816  5.007  6.14


ECMQVC over GF(2^n) 155 KeyPair Generation with precomputation  2116  5.008  2.37


ECMQVC over GF(2^n) 155 Key Agreement  660  5.017  7.60


Notes

Crypto++ 5.2.1 Benchmark Average for this platform: 135.54. This number
is computed by taking the geometric mean of the number of MB/second of each cipher,
hash function, and MAC, and operations/second of each asymmetric operation listed above.

RSA and LUC use 17 as the public exponent.

DH and ElGamal encryption and decryption use short exponents to save time.
The size of the secret exponents were chosen so that a meetinthemiddle
attack would be slower than the general discrete log algorithm (NFS). The
sizes used were:
modulus  exponent


512  120

1024  164

2048  226


EC means elliptic curve. Operations in GF(2^n) are implemented using
trinomial basis. Note that compared to other algorithms listed here,
Crypto++'s implementation of EC over GF(2^n) is less optimized.

All tests were done by repeating the crypto operations over small blocks
of random data. In practice you will likely see slower
speeds because time is needed to transfer data to and from memory.

For the ciphers that specify big endian byte order, the timing data
listed include time needed to convert to and from little endian
order. For some ciphers (WAKE and SHA) this is a large fraction (up
to 25%) of the total time.

The RSA, RW, DH, MQV, and elliptic curve schemes come from the IEEE P1363
standard. For more info see
http://grouper.ieee.org/groups/1363/index.html.

Precomputation means using a table of 16 precomputed powers of
each fixed base to speed up exponentiation.

Tiger, SHARK, SHA384, and SHA512 are designed to take advantage of 64bit
word operations.
Their relatives speeds can be expected to be much higher if the benchmarks
were done on a 64bit CPU.

Source code for these benchmarks is available as part of the Crypto++ library.
Written by: Wei Dai <webmaster@weidai.com> Last modified: 7/23/2004