Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20240617-fix-wc_Sha256-overalignment #7652

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions wolfssl/wolfcrypt/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -3086,12 +3086,6 @@ extern void uITRON4_free(void *p) ;
#define OPENSSL_EXTRA_X509_SMALL
#endif /* OPENSSL_EXTRA */

/* compatibility for EVP_CipherUpdate with AES-GCM */
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)
#undef WOLFSSL_AESGCM_STREAM
#define WOLFSSL_AESGCM_STREAM
#endif

/* support for converting DER to PEM */
#if (defined(WOLFSSL_KEY_GEN) && !defined(WOLFSSL_NO_DER_TO_PEM)) || \
defined(WOLFSSL_CERT_GEN) || defined(OPENSSL_EXTRA)
Expand Down
5 changes: 5 additions & 0 deletions wolfssl/wolfcrypt/sha256.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down