diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 9c81e7083..c7b8415b0 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -6231,7 +6231,7 @@ int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash, word32 msgLenInBytes = hashlen; CRYS_ECPKI_HASH_OpMode_t hash_mode; #elif defined(WOLFSSL_SILABS_SE_ACCEL) - byte sigRS[ECC_MAX_CRYPTO_HW_SIZE * 4]; + byte sigRS[ECC_MAX_CRYPTO_HW_SIZE * 2]; #elif !defined(WOLFSSL_SP_MATH) || defined(FREESCALE_LTC_ECC) int did_init = 0; ecc_point *mG = NULL, *mQ = NULL; diff --git a/wolfcrypt/src/port/silabs/README.md b/wolfcrypt/src/port/silabs/README.md index 7c92067ad..d6d0f782b 100644 --- a/wolfcrypt/src/port/silabs/README.md +++ b/wolfcrypt/src/port/silabs/README.md @@ -29,6 +29,12 @@ Update was preformed under Simplicity Studio directory: versions requesting too much data or too quickly may result in system reset and setting `SESYSREQ`. +### Multi-threading + +The SE manager supports multi-threading for FreeRTOS and Micrium +([ref](https://docs.silabs.com/gecko-platform/latest/service/api/group-sl-se-manager#autotoc-md152)). +If a different OS is used with multi-threading, additional mutex +protection may be necessary. ## Benchmarks diff --git a/wolfssl/wolfcrypt/ecc.h b/wolfssl/wolfcrypt/ecc.h index 97b070ea2..777aa0e4d 100644 --- a/wolfssl/wolfcrypt/ecc.h +++ b/wolfssl/wolfcrypt/ecc.h @@ -404,6 +404,10 @@ struct ecc_key { #ifdef WOLFSSL_SILABS_SE_ACCEL sl_se_command_context_t cmd_ctx; sl_se_key_descriptor_t key; + /* Used for SiLabs "plaintext" with public X, public Y, and + * private D concatenated. These are respectively at offset `0`, + * offset `keysize`, and offset `2 * keysize`. + */ byte key_raw[3 * ECC_MAX_CRYPTO_HW_SIZE]; #endif