Forbid 192-bit without explicit choice #483

Merged
mpg merged 2 commits from hide-small-curves into development 2025-09-29 16:52:10 -05:00
mpg commented 2025-09-28 16:33:47 -05:00 (Migrated from github.com)

Description

Resolves #233

Depends on: https://github.com/Mbed-TLS/mbedtls/pull/10426 for a clean CI

Parametrized CI run with m10426: https://ci.trustedfirmware.org/job/mbed-tls-restricted-pr-test-parametrized/7/

Pushed only for CI feedback so far.

PR checklist

  • changelog not required because: already covered
  • framework PR not required
  • mbedtls development PR not required because: crypto only (TLS part already done)
  • mbedtls 3.6 PR not required because: 1.0 only
  • tests do we need tests for this?
## Description Resolves #233 **Depends on:** https://github.com/Mbed-TLS/mbedtls/pull/10426 for a clean CI Parametrized CI run with m10426: https://ci.trustedfirmware.org/job/mbed-tls-restricted-pr-test-parametrized/7/ Pushed only for CI feedback so far. ## PR checklist - [x] **changelog** not required because: already covered - [x] **framework PR** not required - [x] **mbedtls development PR** not required because: crypto only (TLS part already done) - [x] **mbedtls 3.6 PR** not required because: 1.0 only - **tests** do we need tests for this?
gilles-peskine-arm (Migrated from github.com) approved these changes 2025-09-29 07:11:39 -05:00
gilles-peskine-arm (Migrated from github.com) left a comment

As I wrote in https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/233#issuecomment-3332917983 I don't think this is strongly needed, but it is definitely better than not having it, so thanks for doing it.

As I wrote in https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/233#issuecomment-3332917983 I don't think this is strongly needed, but it is definitely better than not having it, so thanks for doing it.
yanesca (Migrated from github.com) reviewed 2025-09-29 07:32:12 -05:00
@ -603,1 +603,4 @@
#if (defined(PSA_WANT_ECC_SECP_K1_192) || defined(PSA_WANT_ECC_SECP_K1_192)) \
&& !defined(TF_PSA_CRYPTO_ALLOW_REMOVED_MECHANISMS) \
&& !defined(TF_PSA_CRYPTO_WE_ARE_IN_LIBTESTDRIVER1)
yanesca (Migrated from github.com) commented 2025-09-29 07:32:12 -05:00

I couldn't find this TF_PSA_CRYPTO_WE_ARE_IN_LIBTESTDRIVER1 macro, the name is pretty self explanatory, but would be helpful to see the context here. Could you please point me to some background on this?

I couldn't find this `TF_PSA_CRYPTO_WE_ARE_IN_LIBTESTDRIVER1` macro, the name is pretty self explanatory, but would be helpful to see the context here. Could you please point me to some background on this?
gilles-peskine-arm (Migrated from github.com) reviewed 2025-09-29 07:38:25 -05:00
@ -603,1 +603,4 @@
#if (defined(PSA_WANT_ECC_SECP_K1_192) || defined(PSA_WANT_ECC_SECP_K1_192)) \
&& !defined(TF_PSA_CRYPTO_ALLOW_REMOVED_MECHANISMS) \
&& !defined(TF_PSA_CRYPTO_WE_ARE_IN_LIBTESTDRIVER1)
gilles-peskine-arm (Migrated from github.com) commented 2025-09-29 07:38:24 -05:00

It just got added to tf_psa_crypto_config.c, which is the only place where tf_psa_crypto_check_config.h is included nowadays.

By the time you get to the manual config checks, build_info.h has been included, so there may be other ways to detect libtestdriver1, but TF_PSA_CRYPTO_WE_ARE_IN_LIBTESTDRIVER1 works.

It just got added to [`tf_psa_crypto_config.c`](https://github.com/Mbed-TLS/TF-PSA-Crypto/blob/development/core/tf_psa_crypto_config.c), which is the only place where `tf_psa_crypto_check_config.h` is included nowadays. By the time you get to the manual config checks, `build_info.h` has been included, so there may be other ways to detect libtestdriver1, but `TF_PSA_CRYPTO_WE_ARE_IN_LIBTESTDRIVER1` works.
yanesca (Migrated from github.com) approved these changes 2025-09-29 08:31:45 -05:00
yanesca (Migrated from github.com) left a comment

CI seems to be failing, but other than that, it looks good to me.

CI seems to be failing, but other than that, it looks good to me.
gilles-peskine-arm commented 2025-09-29 09:41:44 -05:00 (Migrated from github.com)

https://github.com/Mbed-TLS/mbedtls/pull/10426 needs to be merged before the CI can pass here. It's currently in the merge queue.

https://github.com/Mbed-TLS/mbedtls/pull/10426 needs to be merged before the CI can pass here. It's currently in the merge queue.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto!483
No description provided.