forked from wolfSSL/wolfssl
SHA256: Intel flags has SHA but not AVX1 or AVX2
Reversal of bytes when IS_INTEL_SHA only is same as when AVX1 or AVX2.
This commit is contained in:
@ -209,7 +209,8 @@ on the specific device platform.
|
|||||||
#define SHA256_UPDATE_REV_BYTES(ctx) (sha256->sha_method == SHA256_C)
|
#define SHA256_UPDATE_REV_BYTES(ctx) (sha256->sha_method == SHA256_C)
|
||||||
#else
|
#else
|
||||||
#define SHA256_UPDATE_REV_BYTES(ctx) \
|
#define SHA256_UPDATE_REV_BYTES(ctx) \
|
||||||
(!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
|
(!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags) && \
|
||||||
|
!IS_INTEL_SHA(intel_flags))
|
||||||
#endif
|
#endif
|
||||||
#elif defined(FREESCALE_MMCAU_SHA)
|
#elif defined(FREESCALE_MMCAU_SHA)
|
||||||
#define SHA256_UPDATE_REV_BYTES(ctx) 0 /* reverse not needed on update */
|
#define SHA256_UPDATE_REV_BYTES(ctx) 0 /* reverse not needed on update */
|
||||||
@ -1652,7 +1653,8 @@ static int InitSha256(wc_Sha256* sha256)
|
|||||||
#ifdef WC_C_DYNAMIC_FALLBACK
|
#ifdef WC_C_DYNAMIC_FALLBACK
|
||||||
if (sha256->sha_method != SHA256_C)
|
if (sha256->sha_method != SHA256_C)
|
||||||
#else
|
#else
|
||||||
if (IS_INTEL_AVX1(intel_flags) || IS_INTEL_AVX2(intel_flags))
|
if (IS_INTEL_AVX1(intel_flags) || IS_INTEL_AVX2(intel_flags) ||
|
||||||
|
IS_INTEL_SHA(intel_flags))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user