public:the_performance_of_sha256_and_sha512_algorithms_as_implemented_by_openssl
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
public:the_performance_of_sha256_and_sha512_algorithms_as_implemented_by_openssl [2020/09/21 23:50] – created fangfufu | public:the_performance_of_sha256_and_sha512_algorithms_as_implemented_by_openssl [2020/09/23 10:36] (current) – fangfufu | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== The performance of SHA256 and SHA512 algorithms as implemented by OpenSSL ====== | ====== The performance of SHA256 and SHA512 algorithms as implemented by OpenSSL ====== | ||
- | https:// | + | SHA256 and SHA512 are both cryptographic hash algorithms. They are used for detecting whether data had been modified. The digest size SHA256 and SHA512 are 256 bit and 512 bit respectively. SHA512 is more resistant to attacks compared to SHA256. However, interestingly enough, under x86-64 architecture, |
- | < | + | |
- | $ $ uname -a; grep -m 1 'model name' / | + | Below are the performance metrics from some of the machines I have. If you are not on x86-64, it is faster to use SHA256. |
+ | |||
+ | < | ||
+ | $ uname -a; grep -m 1 'model name' / | ||
Linux smithsonian 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux | Linux smithsonian 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux | ||
model name : Intel(R) Core(TM) i7-4900MQ CPU @ 2.80GHz | model name : Intel(R) Core(TM) i7-4900MQ CPU @ 2.80GHz | ||
Line 27: | Line 30: | ||
</ | </ | ||
+ | < | ||
+ | $ uname -a; grep -m 1 'model name' / | ||
+ | Linux gabriel 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux | ||
+ | model name : Intel(R) Atom(TM) CPU N2800 @ 1.86GHz | ||
+ | Doing sha512 for 3s on 16 size blocks: 1802470 sha512' | ||
+ | Doing sha512 for 3s on 64 size blocks: 1999076 sha512' | ||
+ | Doing sha512 for 3s on 256 size blocks: 813357 sha512' | ||
+ | Doing sha512 for 3s on 1024 size blocks: 294403 sha512' | ||
+ | Doing sha512 for 3s on 8192 size blocks: 41516 sha512' | ||
+ | Doing sha512 for 3s on 16384 size blocks: 21836 sha512' | ||
+ | Doing sha256 for 3s on 16 size blocks: 1525305 sha256' | ||
+ | Doing sha256 for 3s on 64 size blocks: 1117491 sha256' | ||
+ | Doing sha256 for 3s on 256 size blocks: 608597 sha256' | ||
+ | Doing sha256 for 3s on 1024 size blocks: 222215 sha256' | ||
+ | Doing sha256 for 3s on 8192 size blocks: 32397 sha256' | ||
+ | Doing sha256 for 3s on 16384 size blocks: 16463 sha256' | ||
+ | OpenSSL 1.1.1d | ||
+ | built on: Mon Apr 20 20:23:01 2020 UTC | ||
+ | options: | ||
+ | compiler: gcc -fPIC -pthread -m64 -Wa, | ||
+ | The ' | ||
+ | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes | ||
+ | sha256 | ||
+ | sha512 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | $ uname -a; grep -m 1 'model name' / | ||
+ | Linux hawkeye 5.4.51+ #1333 Mon Aug 10 16:38:02 BST 2020 armv6l GNU/Linux | ||
+ | model name : ARMv6-compatible processor rev 7 (v6l) | ||
+ | Doing sha512 for 3s on 16 size blocks: 122782 sha512' | ||
+ | Doing sha512 for 3s on 64 size blocks: 141168 sha512' | ||
+ | Doing sha512 for 3s on 256 size blocks: 50787 sha512' | ||
+ | Doing sha512 for 3s on 1024 size blocks: 16403 sha512' | ||
+ | Doing sha512 for 3s on 8192 size blocks: 2238 sha512' | ||
+ | Doing sha512 for 3s on 16384 size blocks: 1148 sha512' | ||
+ | Doing sha256 for 3s on 16 size blocks: 175136 sha256' | ||
+ | Doing sha256 for 3s on 64 size blocks: 137710 sha256' | ||
+ | Doing sha256 for 3s on 256 size blocks: 88038 sha256' | ||
+ | Doing sha256 for 3s on 1024 size blocks: 28676 sha256' | ||
+ | Doing sha256 for 3s on 8192 size blocks: 5448 sha256' | ||
+ | Doing sha256 for 3s on 16384 size blocks: 2430 sha256' | ||
+ | OpenSSL 1.1.1d | ||
+ | built on: Mon Apr 27 09:55:40 2020 UTC | ||
+ | options: | ||
+ | compiler: gcc -fPIC -pthread -Wa, | ||
+ | The ' | ||
+ | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes | ||
+ | sha256 | ||
+ | sha512 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | # uname -a; grep -m 1 ' | ||
+ | Linux windranger 4.9.120 #0 Thu Aug 16 07:51:15 2018 mips GNU/Linux | ||
+ | cpu model : MIPS 74Kc V4.12 | ||
+ | Doing sha512 for 3s on 16 size blocks: 115217 sha512' | ||
+ | Doing sha512 for 3s on 64 size blocks: 114340 sha512' | ||
+ | Doing sha512 for 3s on 256 size blocks: 39213 sha512' | ||
+ | Doing sha512 for 3s on 1024 size blocks: 13437 sha512' | ||
+ | Doing sha512 for 3s on 8192 size blocks: 1866 sha512' | ||
+ | Doing sha256 for 3s on 16 size blocks: 343958 sha256' | ||
+ | Doing sha256 for 3s on 64 size blocks: 236151 sha256' | ||
+ | Doing sha256 for 3s on 256 size blocks: 120511 sha256' | ||
+ | Doing sha256 for 3s on 1024 size blocks: 40789 sha256' | ||
+ | Doing sha256 for 3s on 8192 size blocks: 5696 sha256' | ||
+ | OpenSSL 1.0.2p | ||
+ | built on: reproducible build, date unspecified | ||
+ | options: | ||
+ | compiler: mips-openwrt-linux-musl-gcc -I. -I.. -I../ | ||
+ | The ' | ||
+ | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes | ||
+ | sha256 | ||
+ | sha512 | ||
+ | </ | ||
+ | < | ||
+ | # uname -a; grep -m 1 ' | ||
+ | Linux Aether 4.14.195 #0 SMP Sun Sep 6 16:19:39 2020 mips GNU/Linux | ||
+ | cpu model : MIPS 34Kc V5.6 | ||
+ | Doing sha512 for 3s on 16 size blocks: 88913 sha512' | ||
+ | Doing sha512 for 3s on 64 size blocks: 90304 sha512' | ||
+ | Doing sha512 for 3s on 256 size blocks: 31356 sha512' | ||
+ | Doing sha512 for 3s on 1024 size blocks: 10574 sha512' | ||
+ | Doing sha512 for 3s on 8192 size blocks: 1471 sha512' | ||
+ | Doing sha512 for 3s on 16384 size blocks: 740 sha512' | ||
+ | Doing sha256 for 3s on 16 size blocks: 152011 sha256' | ||
+ | Doing sha256 for 3s on 64 size blocks: 128152 sha256' | ||
+ | Doing sha256 for 3s on 256 size blocks: 76662 sha256' | ||
+ | Doing sha256 for 3s on 1024 size blocks: 29636 sha256' | ||
+ | Doing sha256 for 3s on 8192 size blocks: 4303 sha256' | ||
+ | Doing sha256 for 3s on 16384 size blocks: 2125 sha256' | ||
+ | OpenSSL 1.1.1g | ||
+ | built on: Sat Sep 19 17:48:27 2020 UTC | ||
+ | options: | ||
+ | compiler: mips-openwrt-linux-musl-gcc -fPIC -pthread -mabi=32 -Wa, | ||
+ | The ' | ||
+ | type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes | ||
+ | sha256 | ||
+ | sha512 | ||
+ | </ |
public/the_performance_of_sha256_and_sha512_algorithms_as_implemented_by_openssl.1600732258.txt.gz · Last modified: 2020/09/21 23:50 by fangfufu