Here are speed benchmarks for some of the most popular hash algorithms and symmetric and asymmetric ciphers. All were coded in C++ or ported to C++ from C implementations, compiled with Microsoft Visual C++ 5.0 (optimize for speed, Pentium Pro code generation), and ran on a Pentium II 266MHz machine under Windows NT 4.0. No assembly language was used. (Be careful not to lose your decimal place - MD5 is 32 MB/s not 3.2 MB/s.) Cipher Total Bytes Time Bytes/S MD5 1073741824 33.128 32411914 MD5-MAC 1073741824 38.525 27871298 XMACC/MD5 1073741824 38.095 28185898 HMAC/MD5 1073741824 33.138 32402130 SHA-1 536870912 37.283 14399885 HAVAL (pass=3) 536870912 22.082 24312602 HAVAL (pass=4) 536870912 31.185 17215678 HAVAL (pass=5) 536870912 39.667 13534447 Tiger 268435456 31.505 8520408 RIPE-MD160 536870912 39.467 13603034 MDC/MD5 268435456 30.684 8748385 Luby-Rackoff/MD5 67108864 24.506 2738466 DES 134217728 32.356 4148156 IDEA 134217728 34.99 3835888 RC5 (r=12) 536870912 33.288 16128062 Blowfish (r=16) 134217728 24.636 5448032 Diamond2 (r=10) 33554432 20.99 1598591 Diamond2 Lite (r=8) 67108864 29.873 2246472 3-WAY (r=11) 201326592 34.239 5880037 TEA 134217728 36.313 3696134 SAFER (r=8) 67108864 21.741 3086742 GOST 67108864 23.013 2916128 SHARK (r=6) 268435456 34.83 7707018 CAST-128 134217728 26.769 5013924 Square 268435456 25.646 10466952 SEAL 1073741824 28.812 37267172 WAKE 536870912 20.99 25577462 Sapphire 134217728 33.118 4052712 BlumBlumShub 512 524288 33.698 15558 BlumBlumShub 1024 131072 20.049 6537 BlumBlumShub 2048 65536 27.189 2410 Operation Iterations Total Time Milliseconds/Operation RSA 512 Encryption 73235 30 0 RSA 512 Decryption 3662 30 8 RSA 512 Signature 3691 30 8 RSA 512 Verification 77806 30 0 RSA 1024 Encryption 27963 30 1 RSA 1024 Decryption 653 30 45 RSA 1024 Signature 652 30 46 RSA 1024 Verification 30360 30 0 RSA 2048 Encryption 9307 30 3 RSA 2048 Decryption 103 30.2 293 RSA 2048 Signature 103 30 291 RSA 2048 Verification 10100 30 2 ElGamal 512 Encryption 2652 30 11 ElGamal 512 Decryption 5071 30 5 ElGamal 512 E. w/ precomp. 4417 30 6 ElGamal 1024 Encryption 606 30 49 ElGamal 1024 Decryption 1185 30 25 ElGamal 1024 E. w/ precomp. 1613 30 18 ElGamal 2048 Encryption 139 30.2 217 ElGamal 2048 Decryption 270 30 111 ElGamal 2048 E. w/ precomp. 397 30.1 75 ElGamal 512 Signature 5197 30 5 ElGamal 512 Verification 4237 30 7 ElGamal 512 S. w/ precomp. 8614 30 3 ElGamal 512 V. w/ precomp. 4903 30 6 ElGamal 1024 Signature 1208 30 24 ElGamal 1024 Verification 1003 30 29 ElGamal 1024 S. w/ precomp. 3157 30 9 ElGamal 1024 V. w/ precomp. 1886 30 15 ElGamal 2048 Signature 275 30 109 ElGamal 2048 Verification 228 30.1 131 ElGamal 2048 S. w/ precomp. 889 30 33 ElGamal 2048 V. w/ precomp. 544 30 55 LUC 512 Encryption 44397 30 0 LUC 512 Decryption 1663 30 18 LUC 512 Signature 1651 30 18 LUC 512 Verification 51343 30 0 LUC 1024 Encryption 18335 30 1 LUC 1024 Decryption 332 30.1 90 LUC 1024 Signature 331 30.1 90 LUC 1024 Verification 19240 30 1 LUC 2048 Encryption 5974 30 5 LUC 2048 Decryption 56 30.2 539 LUC 2048 Signature 56 30.3 540 LUC 2048 Verification 6386 30 4 LUCELG 512 Encryption 1106 30 27 LUCELG 512 Decryption 2039 30 14 LUCELG 1024 Encryption 259 30.1 116 LUCELG 1024 Decryption 485 30 61 LUCELG 512 Signature 2200 30 13 LUCELG 512 Verification 1095 30 27 LUCELG 1024 Signature 518 30.1 58 LUCELG 1024 Verification 259 30 115 Rabin 512 Encryption 10007 30 2 Rabin 512 Decryption 2642 30 11 Rabin 512 Signature 2682 30 11 Rabin 512 Verification 9322 30 3 Rabin 1024 Encryption 4216 30 7 Rabin 1024 Decryption 581 30 51 Rabin 1024 Signature 572 30 52 Rabin 1024 Verification 4201 30 7 Rabin 2048 Encryption 1493 30 20 Rabin 2048 Decryption 97 30.2 311 Rabin 2048 Signature 97 30.2 311 Rabin 2048 Verification 1545 30 19 BlumGoldwasser 512 Encryption 22979 30 1 BlumGoldwasser 512 Decryption 3098 30 9 BlumGoldwasser 1024 Encryption 10179 30 2 BlumGoldwasser 1024 Decryption 606 30 49 BlumGoldwasser 2048 Encryption 3532 30 8 BlumGoldwasser 2048 Decryption 100 30.3 302 DSA 512 Signature 3817 30 7 DSA 512 Verification 3183 30 9 DSA 512 S. w/ precomputation 6808 30 4 DSA 512 V. w/ precomputation 1315 30 22 DSA 1024 Signature 1226 30 24 DSA 1024 Verification 990 30 30 DSA 1024 S. w/ precomputation 3144 30 9 DSA 1024 V. w/ precomputation 1481 30 20 EC over GF(p) 168 Encryption 368 30.1 81 EC over GF(p) 168 Decryption 736 30 40 EC over GF(p) 168 Signature 735 30 40 EC over GF(p) 168 Verification 606 30 49 EC over GF(p) 168 E. w/ pc. 1132 30 26 EC over GF(p) 168 S. w/ pc. 2241 30 13 EC over GF(p) 168 V. w/ pc 1325 30 22 EC over GF(2^n) 155 Encryption 417 30 71 EC over GF(2^n) 155 Decryption 822 30 36 EC over GF(2^n) 155 Signature 835 30 35 EC over GF(2^n) 155 Verificati 689 30 43 EC over GF(2^n) 155 E. w/ pc. 1235 30 24 EC over GF(2^n) 155 S. w/ pc. 2406 30 12 EC over GF(2^n) 155 V. w/ pc 1414 30 21 Notes. 1. RSA and LUC use 17 as the public exponent. 2. ElGamal encryption and decryption use short exponents to save time. The size of the secret exponents were chosen so that a meet-in-the-middle attack would be slower than the general discrete log algorithm. The sizes used were: modulus exponent 512 122 1024 166 2048 228 3. BlumGoldwasser is timed on a 16-byte plaintext. The lowest log(log(n)) bits of each square are used. 4. EC means elliptic curve. Operations in GF(2^n) are implemented using trinomial basis. 5. All tests were done by repeating the crypto operations over small blocks of random (and changing) data. In practice you will likely see slower speeds because time is needed to transfer data to and from memory. 6. 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. 7. The ElGamal and elliptic curve schemes come from the IEEE P1363 draft standard. For more info see http://stdsbbs.ieee.org/groups/1363/index.html. 8. Precomputation means using a table of 16 precomputed powers of each fixed base to speed up exponentiation. 9. Tiger and SHARK are designed to take advantage of 64-bit word operations. Their relatives speeds can be expected to be much higher if the benchmarks were done on a 64-bit CPU. 10. Code for the benchmark is available at http://www.eskimo.com/~weidai/cryptlib.html.