commit | 3599db2e40df28f0f1335f5f00dd2bf0e5d2684a | [log] [tgz] |
---|---|---|
author | Brian Smith <brian@briansmith.org> | Tue Dec 05 19:15:30 2023 -0800 |
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Dec 18 18:04:04 2023 +0000 |
tree | a4935b18d9d170e5c1c3a296829b9e0041340003 | |
parent | 3d5a848d2fc081872123ba3d6e2b0f653281aa13 [diff] |
sha: Add SSSE3 check to SHAEXT SHA-256 implementation. The implementation does use SSSE3 (palignr, pshufb). Change-Id: I86a44c1dc505b27b87fdc3cc7f6e8115abb3dcc9 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/64567 Reviewed-by: David Benjamin <davidben@google.com> Reviewed-by: Bob Beck <bbe@google.com> Commit-Queue: Bob Beck <bbe@google.com>
diff --git a/crypto/fipsmodule/sha/internal.h b/crypto/fipsmodule/sha/internal.h index b55ea8e..0c05d73 100644 --- a/crypto/fipsmodule/sha/internal.h +++ b/crypto/fipsmodule/sha/internal.h
@@ -126,7 +126,8 @@ #define SHA256_ASM_HW OPENSSL_INLINE int sha256_hw_capable(void) { - return CRYPTO_is_x86_SHA_capable(); + // Note that the original assembly did not check SSSE3. + return CRYPTO_is_x86_SHA_capable() && CRYPTO_is_SSSE3_capable(); } #define SHA256_ASM_AVX