diff options
author | Jack Lloyd <[email protected]> | 2018-05-27 11:38:30 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-05-27 12:01:55 -0400 |
commit | 8df48e74987fb2ab3c97adb2b48c2cafc0ea381b (patch) | |
tree | 624df6b225783f611e893a16ffc1fe23f730fd2d /src/lib/hash/sha2_32/sha2_32.h | |
parent | f256e603ab93e2587fe0e38bcf06c437fcd41abf (diff) |
Add BMI2-specific SHA-256
Currently just a copy of the baseline compression function, but
compiled with BMI2 flags. On Skylake improves performance by about 40%.
Diffstat (limited to 'src/lib/hash/sha2_32/sha2_32.h')
-rw-r--r-- | src/lib/hash/sha2_32/sha2_32.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/hash/sha2_32/sha2_32.h b/src/lib/hash/sha2_32/sha2_32.h index 6a0d87ac7..bc883f77a 100644 --- a/src/lib/hash/sha2_32/sha2_32.h +++ b/src/lib/hash/sha2_32/sha2_32.h @@ -66,6 +66,12 @@ class BOTAN_PUBLIC_API(2,0) SHA_256 final : public MDx_HashFunction size_t blocks); #endif +#if defined(BOTAN_HAS_SHA2_32_X86_BMI2) + static void compress_digest_x86_bmi2(secure_vector<uint32_t>& digest, + const uint8_t input[], + size_t blocks); +#endif + #if defined(BOTAN_HAS_SHA2_32_X86) static void compress_digest_x86(secure_vector<uint32_t>& digest, const uint8_t input[], |