Skip to main content
Add more speed test result for comparison (table is whitespace-compacted)
Source Link

2021 update with OpenSSL 1.1.1d: now we see md5 is often slower on newer CPU, and for larger chunks:

## PC i7-1165G7 @ 2.80GHz (2020)
OpenSSL 1.1.1d  10 Sep 2019 / built on: Mon Dec  7 20:44:45 2020 UTC
type      16 bytes    64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5     189018.70k  418310.85k   712090.28k   890189.14k   956293.12k   962560.00k
sha1    287134.62k  746529.17k  1474064.38k  1973607.08k  2197842.60k  2192179.20k
sha256  222301.71k  603962.47k  1213340.33k  1665262.59k  1849016.32k  1847388.84k

## Server AMD EPYC 7571 (2018)
OpenSSL 1.1.1d  10 Sep 2019 / built on: Mon Dec  7 20:44:45 2020 UTC
type      16 bytes    64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5      93668.33k  213979.18k   378971.56k   467472.38k   501205.67k   504064.68k
sha1    165020.82k  442991.72k   888443.48k  1188591.62k  1319236.95k  1330080.43k
sha256  142886.55k  375612.63k   791567.70k  1095950.34k  1234381.48k  1246827.86k

## Server E5-2682 v4 @ 2.50GHz (2016)
OpenSSL 1.1.1d  10 Sep 2019 / built on: Mon Dec  7 20:44:45 2020 UTC
type      16 bytes    64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5     101505.24k  207422.92k   393158.83k   453332.99k   527085.34k   490711.72k
sha1     98091.83k  249828.79k   389640.36k   675694.25k   686966.33k   721021.61k
sha256   55421.86k  130103.33k   251929.17k   302571.86k   296977.81k   338439.56k

2021 update with OpenSSL 1.1.1d: now we see md5 is often slower on newer CPU, and for larger chunks:

## PC i7-1165G7 @ 2.80GHz (2020)
OpenSSL 1.1.1d  10 Sep 2019 / built on: Mon Dec  7 20:44:45 2020 UTC
type      16 bytes    64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5     189018.70k  418310.85k   712090.28k   890189.14k   956293.12k   962560.00k
sha1    287134.62k  746529.17k  1474064.38k  1973607.08k  2197842.60k  2192179.20k
sha256  222301.71k  603962.47k  1213340.33k  1665262.59k  1849016.32k  1847388.84k

## Server AMD EPYC 7571 (2018)
OpenSSL 1.1.1d  10 Sep 2019 / built on: Mon Dec  7 20:44:45 2020 UTC
type      16 bytes    64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5      93668.33k  213979.18k   378971.56k   467472.38k   501205.67k   504064.68k
sha1    165020.82k  442991.72k   888443.48k  1188591.62k  1319236.95k  1330080.43k
sha256  142886.55k  375612.63k   791567.70k  1095950.34k  1234381.48k  1246827.86k

## Server E5-2682 v4 @ 2.50GHz (2016)
OpenSSL 1.1.1d  10 Sep 2019 / built on: Mon Dec  7 20:44:45 2020 UTC
type      16 bytes    64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5     101505.24k  207422.92k   393158.83k   453332.99k   527085.34k   490711.72k
sha1     98091.83k  249828.79k   389640.36k   675694.25k   686966.33k   721021.61k
sha256   55421.86k  130103.33k   251929.17k   302571.86k   296977.81k   338439.56k
added 60 characters in body
Source Link
Cristian Dobre
  • 10k
  • 1
  • 34
  • 51

It depends on the hardware and software you are running. Below are comparison results between MD5 and SHA using the openssl library on my computer. But different implementations that take into account hardware acceleration will give different results. Modern CPUs have hardware acceleration for hash functions. GPUs will have better results and specialised hardware exists to accelerate hashing even further. That is especially true for SHA because it is used for crypto currency mining.

$ openssl speed md5 sha1 sha256

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5              58318.02k   171878.31k   370689.37k   502232.78k   580493.45k
sha1             69045.26k   188431.38k   385979.53k   543316.53k   625854.82k
sha256           49638.66k   107537.27k   183872.51k   226793.47k   237228.26k

The 'numbers' are in 1000s of bytes per second processed.

It depends on the hardware and software you are running. Below are comparison results between MD5 and SHA using the openssl library on my computer. But different implementations that take into account hardware acceleration will give different results. Modern CPUs have hardware acceleration for hash functions. GPUs will have better results and specialised hardware exists to accelerate hashing even further especially for SHA.

$ openssl speed md5 sha1 sha256

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5              58318.02k   171878.31k   370689.37k   502232.78k   580493.45k
sha1             69045.26k   188431.38k   385979.53k   543316.53k   625854.82k
sha256           49638.66k   107537.27k   183872.51k   226793.47k   237228.26k

The 'numbers' are in 1000s of bytes per second processed.

It depends on the hardware and software you are running. Below are comparison results between MD5 and SHA using the openssl library on my computer. But different implementations that take into account hardware acceleration will give different results. Modern CPUs have hardware acceleration for hash functions. GPUs will have better results and specialised hardware exists to accelerate hashing even further. That is especially true for SHA because it is used for crypto currency mining.

$ openssl speed md5 sha1 sha256

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5              58318.02k   171878.31k   370689.37k   502232.78k   580493.45k
sha1             69045.26k   188431.38k   385979.53k   543316.53k   625854.82k
sha256           49638.66k   107537.27k   183872.51k   226793.47k   237228.26k

The 'numbers' are in 1000s of bytes per second processed.
Source Link
Cristian Dobre
  • 10k
  • 1
  • 34
  • 51

It depends on the hardware and software you are running. Below are comparison results between MD5 and SHA using the openssl library on my computer. But different implementations that take into account hardware acceleration will give different results. Modern CPUs have hardware acceleration for hash functions. GPUs will have better results and specialised hardware exists to accelerate hashing even further especially for SHA.

$ openssl speed md5 sha1 sha256

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5              58318.02k   171878.31k   370689.37k   502232.78k   580493.45k
sha1             69045.26k   188431.38k   385979.53k   543316.53k   625854.82k
sha256           49638.66k   107537.27k   183872.51k   226793.47k   237228.26k

The 'numbers' are in 1000s of bytes per second processed.