From 4c7fb1f428a2d08a298cf89ecb7af78afa6412c2 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Thu, 17 Apr 2025 10:07:58 +1000 Subject: [PATCH] ECC non-blocking: make sp_ecc_ctx data aligned Align data on 4 byte boundary for ARM chips. --- wolfssl/wolfcrypt/sp_int.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wolfssl/wolfcrypt/sp_int.h b/wolfssl/wolfcrypt/sp_int.h index fb202d4c5..7385e6800 100644 --- a/wolfssl/wolfcrypt/sp_int.h +++ b/wolfssl/wolfcrypt/sp_int.h @@ -387,11 +387,11 @@ extern "C" { /* Non-blocking ECC operation context. */ typedef struct sp_ecc_ctx { #ifdef WOLFSSL_SP_521 - byte data[66*80]; /* stack data */ + XALIGNED(4) byte data[66*80]; /* stack data */ #elif defined(WOLFSSL_SP_384) - byte data[48*80]; /* stack data */ + XALIGNED(4) byte data[48*80]; /* stack data */ #else - byte data[32*80]; /* stack data */ + XALIGNED(4) byte data[32*80]; /* stack data */ #endif } sp_ecc_ctx_t; #endif