Closed Pratyush closed 6 years ago
These instructions are not available on Skylake. The only shipping CPUs which presently have them are AMD Ryzen and Intel Goldmont.
As far as server-class CPUs, this feature will be in Cannonlake CPUs, which will "start to ship in the first half of 2018"
I have a draft for SHA1 and SHA2 (as code already structured around respective intrinsics/assembly instructions), but unfortunately I don't have access to CPU with this extension to properly test it. And as was correctly stated by @tarcieri Skylake does not have this extension.
You can see very raw draft for SHA1 in this branch.
The new Intel Skylake architecture introduces SHA1 and SHA2 specific instructions that should speed up computation of these two primitives: https://software.intel.com/en-us/articles/intel-sha-extensions
There is sample code in C for these that uses intrinsics to do this:
https://github.com/noloader/SHA-Intrinsics
It would be great to have an implementation of these in this library so that we can have blazingly fast hash functions.