• Download Gist
Speed Test: OpenSSL Cryptographic Hash Functions MD5 vs SHA1 vs RMD160 vs SHA256
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
# cat /proc/cpuinfo | grep "^processor" | wc -l
16
 
# cat /proc/cpuinfo | grep "^model name" | head -1
model name : Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
 
# openssl speed md5
Doing md5 for 3s on 16 size blocks: 3787525 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 3016201 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 1856180 md5's in 3.00s
Doing md5 for 3s on 1024 size blocks: 732900 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 110783 md5's in 3.00s
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
built on: Thu Sep 3 14:22:06 EDT 2009
options:bn(64,64) md2(int) rc4(ptr,int) des(idx,cisc,16,int) aes(partial) blowf
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DM
available timing options: TIMES TIMEB HZ=100 [sysconf value]
timing function used: times
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
md5 20200.13k 64345.62k 158394.03k 250163.20k 302511.45k
 
# openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 3559440 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 2625417 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 1452086 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 520835 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 74595 sha1's in 3.00s
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
built on: Thu Sep 3 14:22:06 EDT 2009
options:bn(64,64) md2(int) rc4(ptr,int) des(idx,cisc,16,int) aes(partial) blowf
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DM
available timing options: TIMES TIMEB HZ=100 [sysconf value]
timing function used: times
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
sha1 18983.68k 56008.90k 123911.34k 177778.35k 203694.08k
 
# openssl speed rmd160
Doing rmd160 for 3s on 16 size blocks: 2786817 rmd160's in 3.00s
Doing rmd160 for 3s on 64 size blocks: 1855695 rmd160's in 3.00s
Doing rmd160 for 3s on 256 size blocks: 933987 rmd160's in 3.00s
Doing rmd160 for 3s on 1024 size blocks: 311666 rmd160's in 3.00s
Doing rmd160 for 3s on 8192 size blocks: 43238 rmd160's in 3.00s
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
built on: Thu Sep 3 14:22:06 EDT 2009
options:bn(64,64) md2(int) rc4(ptr,int) des(idx,cisc,16,int) aes(partial) blowf
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DM
available timing options: TIMES TIMEB HZ=100 [sysconf value]
timing function used: times
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
rmd160 14863.02k 39588.16k 79700.22k 106381.99k 118068.57k
 
# openssl speed sha256
Doing sha256 for 3s on 16 size blocks: 2699497 sha256's in 3.00s
Doing sha256 for 3s on 64 size blocks: 1637013 sha256's in 3.00s
Doing sha256 for 3s on 256 size blocks: 752374 sha256's in 3.00s
Doing sha256 for 3s on 1024 size blocks: 237569 sha256's in 3.00s
Doing sha256 for 3s on 8192 size blocks: 32225 sha256's in 3.00s
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
built on: Thu Sep 3 14:22:06 EDT 2009
options:bn(64,64) md2(int) rc4(ptr,int) des(idx,cisc,16,int) aes(partial) blowf
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DM
available timing options: TIMES TIMEB HZ=100 [sysconf value]
timing function used: times
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
sha256 14397.32k 34922.94k 64202.58k 81090.22k 87995.73k

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.