sha_sse(4) is like aesni(4)Some x86 class CPUs have accelerated intrinsics for SHA1 and SHA256 -- some x86 class CPUs6.
have accelerated intrinsics for these hashProvide this functions. This driver will
attach on any x86 machine with the right feature bitsality on CPUs that support it.
ItThis implements CRYPTO_SHA1, CRYPTO_SHA1_HMAC, and CRYPTO_SHA2_256_HMAC.
Correctness: The cryptotest.py suite in tests/sys/opencrypto has been
enhanced to verify SHA1 and SHA256 HMAC using standard NIST test
vectors. The test passes on this driver.
Performance is untested. Presumably it is faster than cryptosoft.
The driver itself is loosely forkedborrows SHA update code from aesni(4),sys/crypto sha1 and borrows updatesha256. The
step code from sys/crypto sha1 and sha256.intrinsic step function comes from Intel under a 3-clause BSDL.[0] The
intel_sha_extensions_sha<foo>_intrinsic.c files were renamed and lightly
modified (added const, resolved a warning or two; included the sha_sse
header to declare the functions).
[0]: https://software.intel.com/en-us/articles/intel-sha-extensions-implementations