From 8b01033d0b0d2d241b6d64d59f23a0e64f9a3430 Mon Sep 17 00:00:00 2001 From: Marco Oliverio Date: Wed, 15 Apr 2026 08:36:07 +0200 Subject: [PATCH] se050: reviewer's fixes --- .github/workflows/se050-sim.yml | 2 +- .wolfssl_known_macro_extras | 2 +- wolfcrypt/src/ecc.c | 6 +++--- wolfcrypt/src/port/nxp/README_SE050.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/se050-sim.yml b/.github/workflows/se050-sim.yml index 0f7cb3de49..08f94b93d9 100644 --- a/.github/workflows/se050-sim.yml +++ b/.github/workflows/se050-sim.yml @@ -20,7 +20,7 @@ concurrency: # We patch it to COPY the PR checkout instead so CI reflects the PR's source. env: - SE050SIM_REF: main + SE050SIM_REF: 8fda9212c306fbee0dcd66f2dd52b13f65f13e00 jobs: se050_sim: diff --git a/.wolfssl_known_macro_extras b/.wolfssl_known_macro_extras index 86fe9a36de..9ece8e072e 100644 --- a/.wolfssl_known_macro_extras +++ b/.wolfssl_known_macro_extras @@ -880,7 +880,7 @@ WOLFSSL_SE050_AUTO_ERASE WOLFSSL_SE050_CRYPT WOLFSSL_SE050_HASH WOLFSSL_SE050_INIT -WOLFSSL_SE050_NOECDHE +WOLFSSL_SE050_NO_ECDHE WOLFSSL_SE050_NO_ECDSA_VERIFY WOLFSSL_SE050_NO_RSA WOLFSSL_SE050_NO_RSA_VERIFY diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 82ecbab6b2..c622a8b434 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -291,7 +291,7 @@ ECC Curve Sizes: #undef HAVE_ECC_VERIFY_HELPER #define HAVE_ECC_VERIFY_HELPER #endif -#if defined(WOLFSSL_SE050_NO_ECDSA_VERIFY) +#if defined(WOLFSSL_SE050_NO_ECDSA_VERIFY) && defined(HAVE_ECC_VERIFY) #define HAVE_ECC_VERIFY_HELPER #endif @@ -4770,7 +4770,7 @@ int wc_ecc_shared_secret(ecc_key* private_key, ecc_key* public_key, byte* out, err = silabs_ecc_shared_secret(private_key, public_key, out, outlen); #elif defined(WOLFSSL_KCAPI_ECC) err = KcapiEcc_SharedSecret(private_key, public_key, out, outlen); -#elif defined(WOLFSSL_SE050) && !defined(WOLFSSL_SE050_NOECDHE) +#elif defined(WOLFSSL_SE050) && !defined(WOLFSSL_SE050_NO_ECDHE) err = se050_ecc_shared_secret(private_key, public_key, out, outlen); #else err = wc_ecc_shared_secret_ex(private_key, &public_key->pubkey, out, outlen); @@ -5764,7 +5764,7 @@ static int _ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key, else { err = NOT_COMPILED_IN; } -#elif defined(WOLFSSL_SE050) && !defined(WOLFSSL_SE050_NOECDHE) +#elif defined(WOLFSSL_SE050) && !defined(WOLFSSL_SE050_NO_ECDHE) err = se050_ecc_create_key(key, key->dp->id, key->dp->size); key->type = ECC_PRIVATEKEY; #elif defined(WOLFSSL_CRYPTOCELL) diff --git a/wolfcrypt/src/port/nxp/README_SE050.md b/wolfcrypt/src/port/nxp/README_SE050.md index dcbba50f39..ae10c91615 100644 --- a/wolfcrypt/src/port/nxp/README_SE050.md +++ b/wolfcrypt/src/port/nxp/README_SE050.md @@ -246,7 +246,7 @@ defined, wolfCrypt will instead fall back to using `/dev/random` and Disables using the SE050 for RSA, useful for the SE050E which does not have RSA support. -**`WOLFSSL_SE050_NOECDHE`** +**`WOLFSSL_SE050_NO_ECDHE`** Disables offloading ECDH key generation and shared secret operations to the SE050. When defined, `wc_ecc_make_key()` and `wc_ecc_shared_secret()` will