se050: add support for WOLFSSL_SE050_NOECDHE#9853
se050: add support for WOLFSSL_SE050_NOECDHE#9853rizlik wants to merge 1 commit intowolfSSL:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a build-time switch to disable SE050 offloading for ECC key generation and ECDH shared secret operations, letting wolfCrypt software implementations handle those paths instead.
Changes:
- Documented new
WOLFSSL_SE050_NOECDHEbuild option for SE050 port. - Gated SE050 ECDH shared secret and ECC key creation offload behind
!defined(WOLFSSL_SE050_NOECDHE). - Registered the new macro in
.wolfssl_known_macro_extras.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| wolfcrypt/src/port/nxp/README_SE050.md | Documents the new macro and its behavioral impact. |
| wolfcrypt/src/ecc.c | Disables SE050 offload paths for key generation and shared secret when the macro is defined. |
| .wolfssl_known_macro_extras | Adds the macro to the known-macro list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -886,6 +886,7 @@ WOLFSSL_SE050_HASH | |||
| WOLFSSL_SE050_INIT | |||
| WOLFSSL_SE050_NO_RSA | |||
| WOLFSSL_SE050_NO_TRNG | |||
There was a problem hiding this comment.
WOLFSSL_SE050_NOECDHE is harder to parse than the surrounding SE050 macros (e.g., WOLFSSL_SE050_NO_RSA, WOLFSSL_SE050_NO_TRNG) which use word separators. Consider renaming to WOLFSSL_SE050_NO_ECDHE for consistency/readability, or providing a compatibility alias so both spellings work.
| WOLFSSL_SE050_NO_TRNG | |
| WOLFSSL_SE050_NO_TRNG | |
| 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 | ||
| use wolfCrypt software instead of the SE050. |
There was a problem hiding this comment.
This wording is inconsistent with the implementation: the WOLFSSL_SE050_NOECDHE guard disables the SE050 path for wc_ecc_make_key() in general (ECC key creation), not specifically “ECDH key generation”. Please adjust the text to say “ECC/EC key generation” (or “EC key pair generation”) plus shared secret, so the README matches the behavior.
| Disables offloading ECDH key generation and shared secret operations to the | |
| SE050. When defined, `wc_ecc_make_key()` and `wc_ecc_shared_secret()` will | |
| use wolfCrypt software instead of the SE050. | |
| Disables offloading ECC/EC key pair generation and ECDH shared secret | |
| operations to the SE050. When defined, `wc_ecc_make_key()` and | |
| `wc_ecc_shared_secret()` will use wolfCrypt software instead of the SE050. |
No description provided.