diff --git a/wolfssl/wolfcrypt/sha256.h b/wolfssl/wolfcrypt/sha256.h index d8239c2e3..a6c4ea46a 100644 --- a/wolfssl/wolfcrypt/sha256.h +++ b/wolfssl/wolfcrypt/sha256.h @@ -179,9 +179,14 @@ struct wc_Sha256 { #elif defined(WOLFSSL_HAVE_PSA) && !defined(WOLFSSL_PSA_NO_HASH) psa_hash_operation_t psa_ctx; #else +#ifdef WC_64BIT_CPU /* alignment on digest and buffer speeds up ARMv8 crypto operations */ ALIGN16 word32 digest[WC_SHA256_DIGEST_SIZE / sizeof(word32)]; ALIGN16 word32 buffer[WC_SHA256_BLOCK_SIZE / sizeof(word32)]; +#else + word32 digest[WC_SHA256_DIGEST_SIZE / sizeof(word32)]; + word32 buffer[WC_SHA256_BLOCK_SIZE / sizeof(word32)]; +#endif word32 buffLen; /* in bytes */ word32 loLen; /* length in bytes */ word32 hiLen; /* length in bytes */