Alex Alex - 1 year ago 99
C Question

Are there in x86 any instructions to accelerate SHA (SHA1/2/256/512) encoding?

An example, in x86 are Instruction Set to hardware acceleration AES. But are there in x86 any instructions to accelerate SHA (SHA1/2/256/512) encoding, and what library is the fastet to encoding SHA on x86?

Answer Source

Once the Intel Skylake microarchitecture arrives in 2015, the accepted answer will be incorrect when it says: "Intel hasn't made dedicated instruction set for SHA-1 or two". Intel has upcomming instructions for accelerating the calculation of SHA1/256 hashes.

enter image description here

You can read more about them, how to detect if your CPU support them and how to use them here. Until Skylake arrives a C/C++ programmer is probably best off using OpenSSL.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download