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 multiple-precision addition and subtraction. SSE2 intrinsics were used for multiple-precision 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 64-bit multiplication instruction.

AlgorithmMegabytes(2^20 bytes) ProcessedTime TakenMB/Second
CRC-322.05e+0036.399320.050
Adler-324.1e+0033.5251161.986
MD2164.0063.994
MD51.02e+0034.726216.674
SHA-12563.76667.977
SHA-2562565.75844.460
SHA-512645.61811.392
HAVAL (pass=3)5124.717108.544
HAVAL (pass=4)2563.69569.283
HAVAL (pass=5)2563.79667.439
Tiger1283.36438.050
RIPE-MD1602564.86752.599
Panama Hash (little endian)1.02e+0033.375303.407
Panama Hash (big endian)1.02e+0034.637220.832
Whirlpool645.28812.103
MDC/MD52565.37747.610
Luby-Rackoff/MD5644.30714.860
DES1285.99821.340
DES-XEX31286.15920.783
DES-EDE3646.4999.848
IDEA643.37518.963
RC2645.54811.536
RC5 (r=16)2564.28659.729
Blowfish2563.97664.386
3-WAY1283.66534.789
TEA1285.37823.801
SAFER (r=8)1286.27920.385
GOST1283.50536.519
SHARK (r=6)1283.82633.455
CAST-1282565.98842.752
CAST-2561285.88921.735
Square1284.17630.651
SKIPJACK1286.32920.224
RC61283.38537.814
MARS1284.58627.911
Rijndael (128-bit key)2564.19661.010
Rijndael (192-bit key)2564.81753.145
Rijndael (256-bit key)2565.30848.229
Rijndael (128) CTR2564.43657.710
Rijndael (128) OFB2564.83752.925
Rijndael (128) CFB2565.37847.601
Rijndael (128) CBC2564.61755.447
Twofish1284.07531.411
Serpent1286.06921.091
ARC45124.517113.350
SEAL-3.0-BE1.02e+0033.485293.831
SEAL-3.0-LE2.05e+0034.937414.827
WAKE-CFB-BE5125.49893.125
WAKE-CFB-LE5123.615141.632
WAKE-OFB-BE5123.855132.815
WAKE-OFB-LE5123.836133.472
Panama Cipher (little endian)1.02e+0034.036253.717
Panama Cipher (big endian)1.02e+0035.317192.590
SHACAL-2 (128-bit key)1286.27920.385
SHACAL-2 (512-bit key)1286.27920.385
Camellia (128-bit key)643.35519.076
Camellia (192-bit key)644.43714.424
Camellia (256-bit key)644.41614.493
MD5-MAC1.02e+0035.528185.239
XMACC/MD51.02e+0035.999170.695
HMAC/MD51.02e+0034.726216.674
Two-Track-MAC2564.81753.145
CBC-MAC/Rijndael2564.44757.567
DMAC/Rijndael2564.47657.194
BlumBlumShub 5120.253.5850.070
BlumBlumShub 10240.1254.0960.031
BlumBlumShub 20480.06255.8690.011
OperationIterationsTotal TimeMilliseconds/Operation
RSA 1024 Encryption276075.0070.18
RSA 1024 Decryption10505.0074.77
Rabin 1024 Encryption30085.0071.66
Rabin 1024 Decryption7955.0076.30
LUC 1024 Encryption235445.0080.21
LUC 1024 Decryption6345.0077.90
DLIES 1024 Encryption11595.0074.32
DLIES 1024 Encryption with precomputation10615.0074.72
DLIES 1024 Decryption3505.00814.31
LUCELG 512 Encryption24335.0072.06
LUCELG 512 Encryption with precomputation24025.0072.08
LUCELG 512 Decryption27445.0071.82
RSA 2048 Encryption110225.0070.45
RSA 2048 Decryption1775.02828.41
Rabin 2048 Encryption12545.0073.99
Rabin 2048 Decryption1595.02731.62
LUC 2048 Encryption87565.0070.57
LUC 2048 Decryption1105.03745.79
DLIES 2048 Encryption2605.00719.26
DLIES 2048 Encryption with precomputation2695.01718.65
DLIES 2048 Decryption605.02783.78
LUCELG 1024 Encryption5325.0089.41
LUCELG 1024 Encryption with precomputation5315.0079.43
LUCELG 1024 Decryption7725.0076.49
RSA 1024 Signature10535.0074.75
RSA 1024 Verification274065.0070.18
Rabin 1024 Signature8165.0086.14
Rabin 1024 Verification31175.0071.61
RW 1024 Signature9515.0075.26
RW 1024 Verification555805.0070.09
LUC 1024 Signature6445.0077.77
LUC 1024 Verification243215.0080.21
NR 1024 Signature22605.0072.22
NR 1024 Signature with precomputation43765.0071.14
NR 1024 Verification19645.0072.55
NR 1024 Verification with precomputation27385.0071.83
DSA 1024 Signature23015.0082.18
DSA 1024 Signature with precomputation44445.0071.13
DSA 1024 Verification20075.0072.49
DSA 1024 Verification with precomputation27955.0071.79
LUC-HMP 512 Signature23655.0072.12
LUC-HMP 512 Signature with precomputation24015.0082.09
LUC-HMP 512 Verification23125.0072.17
LUC-HMP 512 Verification with precomputation22695.0072.21
ESIGN 1023 Signature98375.0070.51
ESIGN 1023 Verification276795.0070.18
ESIGN 1536 Signature48985.0081.02
ESIGN 1536 Verification119405.0070.42
RSA 2048 Signature1785.00728.13
RSA 2048 Verification110545.0070.45
Rabin 2048 Signature1585.02831.82
Rabin 2048 Verification12945.0073.87
RW 2048 Signature1765.01728.51
RW 2048 Verification245215.0070.20
LUC 2048 Signature1105.00745.52
LUC 2048 Verification90725.0080.55
NR 2048 Signature5115.0079.80
NR 2048 Signature with precomputation15305.0073.27
NR 2048 Verification4545.00711.03
NR 2048 Verification with precomputation9825.0085.10
LUC-HMP 1024 Signature5225.0079.59
LUC-HMP 1024 Signature with precomputation5275.0079.50
LUC-HMP 1024 Verification5205.0079.63
LUC-HMP 1024 Verification with precomputation4995.00710.03
ESIGN 2046 Signature42535.0081.18
ESIGN 2046 Verification110245.0070.45
XTR-DH 171 Key-Pair Generation28025.0071.79
XTR-DH 171 Key Agreement13605.0073.68
XTR-DH 342 Key-Pair Generation7775.0076.44
XTR-DH 342 Key Agreement4045.01812.42
DH 1024 Key-Pair Generation22835.0072.19
DH 1024 Key-Pair Generation with precomputation20725.0072.42
DH 1024 Key Agreement12985.0073.86
DH 2048 Key-Pair Generation5125.0079.78
DH 2048 Key-Pair Generation with precomputation5245.0079.56
DH 2048 Key Agreement3685.02713.66
LUCDIF 512 Key-Pair Generation46885.0071.07
LUCDIF 512 Key-Pair Generation with precomputation43395.0071.15
LUCDIF 512 Key Agreement28805.0081.74
LUCDIF 1024 Key-Pair Generation10575.0074.74
LUCDIF 1024 Key-Pair Generation with precomputation10375.0074.83
LUCDIF 1024 Key Agreement7765.0176.47
MQV 1024 Key-Pair Generation23115.0072.17
MQV 1024 Key-Pair Generation with precomputation45955.0081.09
MQV 1024 Key Agreement12245.0074.09
MQV 2048 Key-Pair Generation5225.0079.59
MQV 2048 Key-Pair Generation with precomputation15725.0073.19
MQV 2048 Key Agreement2825.01717.79
ECIES over GF(p) 168 Encryption7595.0086.60
ECIES over GF(p) 168 Encryption with precomputation13275.0073.77
ECIES over GF(p) 168 Decryption10625.0074.71
ECNR over GF(p) 168 Signature14975.0073.34
ECNR over GF(p) 168 Signature with precomputation26295.0071.90
ECNR over GF(p) 168 Verification7945.0086.31
ECNR over GF(p) 168 Verification with precomputation16185.0073.09
ECDHC over GF(p) 168 Key-Pair Generation15365.0073.26
ECDHC over GF(p) 168 Key-Pair Generation with precomputation25765.0071.94
ECDHC over GF(p) 168 Key Agreement14745.0073.40
ECMQVC over GF(p) 168 Key-Pair Generation15295.0083.28
ECMQVC over GF(p) 168 Key-Pair Generation with precomputation25885.0071.93
ECMQVC over GF(p) 168 Key Agreement7465.0076.71
ECIES over GF(2^n) 155 Encryption4145.00712.09
ECIES over GF(2^n) 155 Encryption with precomputation10715.0084.68
ECIES over GF(2^n) 155 Decryption6335.0077.91
ECNR over GF(2^n) 155 Signature8275.0076.05
ECNR over GF(2^n) 155 Signature with precomputation21325.0072.35
ECNR over GF(2^n) 155 Verification6555.0077.64
ECNR over GF(2^n) 155 Verification with precomputation12325.0084.06
ECDHC over GF(2^n) 155 Key-Pair Generation8065.0076.21
ECDHC over GF(2^n) 155 Key-Pair Generation with precomputation21245.0072.36
ECDHC over GF(2^n) 155 Key Agreement7805.0076.42
ECMQVC over GF(2^n) 155 Key-Pair Generation8165.0076.14
ECMQVC over GF(2^n) 155 Key-Pair Generation with precomputation21165.0082.37
ECMQVC over GF(2^n) 155 Key Agreement6605.0177.60

Notes


Written by: Wei Dai <webmaster@weidai.com> Last modified: 7/23/2004