Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules: mbedtls: Update with PSA dependencies #69586

Closed
wants to merge 1 commit into from

Conversation

mfischer
Copy link
Contributor

mbedtls wants matching PSA configuration options for some of the elliptic curve algoritmhs nowadays.

Thse checks are encoded in mbedTLS' check_config.h header.

mbedTLS wants matching PSA configuration options for
some of the elliptic curve algorithms nowadays.

These checks are encoded in mbedTLS's check_config.h header.

Signed-off-by: Moritz Fischer <[email protected]>
@mfischer
Copy link
Contributor Author

Updated the commit message to remove the typos.

@d3zd3z this seems like a pretty non controversial change

@mfischer
Copy link
Contributor Author

mfischer commented Mar 5, 2024

@cfriedt @d3zd3z ping

@MaureenHelm
Copy link
Member

@ceolin @d3zd3z @ithinuel can you take a look?

@MaureenHelm
Copy link
Member

@ceolin @d3zd3z @ithinuel can you take a look?

ping

@ithinuel
Copy link
Collaborator

@valeriosetti how does this interact with #72243 ?

@valeriosetti
Copy link
Collaborator

valeriosetti commented May 15, 2024

@valeriosetti how does this interact with #72243 ?

The scope of #72243 is exactly to introduce support for all the PSA_WANT symbols used in MbedTLS and, more in general, by any crypto client, so I think that PR can help here. However #72243 introduces support for PSA_WANT symbols on their own, whereas here those build symbols are auto-enabled starting from legacy MBEDTLS ones.

This last sentence makes me wonder a bit about the goal of this PR. In MbedTLS 3.6 there is already a header file which performs the "forward conversion" (from MBEDTLS symbols to PSA_WANT ones) and it's named config_adjust_psa_from_legacy.h. This header file is evaluated when MBEDTLS_PSA_CRYPTO_C && !MBEDTLS_PSA_CRYPTO_CONFIG (check build_info.h + config_psa.h), which is the case for Zephyr so far:

  • MBEDTLS_PSA_CRYPTO_C: if you are not building CRYPTO_C it would not make sense to evaluate PSA_WANT symbols at all;
  • MBEDTLS_PSA_CRYPTO_CONFIG: before Add Kconfigs for PSA_WANT symbols #72243 this symbol is not set in Zephyr.

In conclusion I suspect that this PR is duplicating some work already done by MbedTLS internally. But perhaps I'm missing some failure/issue @mfischer found, so if you can provide some more detail here I'm glad to help.

Note: if/when #72243 will be merged, there will be no need to convert MBEDTLS symbols to PSA_WANT ones, since the latter will have their own config. From the MbedTLS point of view, the adjusting header file in this case will be config_adjust_legacy_from_psa.h which, as you can imagine, does the opposite of the one I talked about before.

Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jul 15, 2024
@github-actions github-actions bot closed this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants