4 ms·
SHA256 was chosen over SHA512 because the two most popular 64-bit ISAs (x86-64 and ARMv8) both define instruction extensions to provide hardware acceleration o
by silotis 9y ago
SHA256 was chosen over SHA512 because the two most popular 64-bit ISAs (x86-64 and ARMv8) both define instruction extensions to provide hardware acceleration of SHA256. Hardware support makes SHA256 much faster than SHA512 in software, even on 64-bit processors.
- RJIb8RBYxzAMX9u 9y agoHuh, I didn't know that's the case for x86. My quick search suggests that support is still quite limited though, and none of my HW (1~4 yrs old) support it. I suppose by the time the spec is finalized and widely adopted HW-accelerated SHA256 would be, too (and I should switch my zfs checksum back from SHA512/256 to SHA256).
- AbacusAvenger 9y agoI haven't found any Intel hardware with the SHA extensions actually implemented. I was expecting it in Skylake but apparently that's not the case... Not sure when we can expect to see them.
- silotis 9y agoRight now the most common x86 CPU which implements the SHA instructions is AMD's Ryzen. The only available Intel CPU which supports them is Goldmont, the latest generation of Atom CPU. It seems likely that Cannon Lake and possibly Coffee Lake will also implement them, but I haven't seen any rumors pointing one way or the other.
- mtgx 9y agoIntel has recently implemented SHA1 in hardware. So give it another decade or so.
- ko27 9y agoSHA-1 & SHA-256 were both implemented at the same time. https://en.wikipedia.org/wiki/Intel_SHA_extensions https://en.wikipedia.org/wiki/Intel_SHA_extensions
- baby 9y agohopefully SHA-3 (or better, the Keccak permutation) is implemented in hardware first.
- snakeanus 9y ago> SHA-3 (or better, the Keccak permutation) SHA-3 is just Keccak with specific capacities. If you mean that they should not implement only the standard SHA-3 functions then I agree, having c/raw/SHAKE256 as well would be nice.
- baby 9y agoImplementing the permutation would be even better, because other stuff like Strobe, Keyak, Ketje, etc... could use it.
- ComputerGuru 9y agohttps://neosmart.net/blog/2017/will-amds-ryzen-finally-bring-sha-extensions-to-intels-cpus/ https://neosmart.net/blog/2017/will-amds-ryzen-finally-bring...