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

Study: PSA_CRYPTO_CONFIG always on #8153

Open
4 tasks
daverodgman opened this issue Sep 1, 2023 · 4 comments
Open
4 tasks

Study: PSA_CRYPTO_CONFIG always on #8153

daverodgman opened this issue Sep 1, 2023 · 4 comments
Labels
api-break This issue/PR breaks the API and must wait for a new major version component-platform Portability layer and build scripts enhancement

Comments

@daverodgman
Copy link
Contributor

daverodgman commented Sep 1, 2023

Remove all options from mbedtls_config.h which have equivalent functionality via the crypto config (PSA_WANT_xxx) mechanism.

Look at corresponding clean-up in the library to see if references to the legacy option can be replaced with a suitable PSA macro, or if it needs to be kept as a non-user-visible macro (i.e., set via config_psa.h to control what gets built).

The list of options is probably simply everything that gets set automatically via config_adjust_legacy_from_psa.h and config_adjust_psa_superset_legacy.h, i.e. grep '#define MBEDTLS_' config_adjust_legacy_from_psa.h|sort|uniq|perl -pe 's/#define ([^ ]*).*/\1/'

Also remove config_adjust_psa_from_legacy.h and config_adjust_psa_superset_legacy.h (and verify that this does not result in any changes in configuration as a result).

config_adjust_ssl.h should stay but a few references to legacy options probably need to be replaced with the PSA equivalent (e.g. replace MBEDTLS_ECDH_Cwith PSA_WANT_ALG_ECDH ).

Remove obsolete parts of psa/crypto_adjust_config_key_pair_types.h

In summary:

  • Remove legacy options which have PSA_WANT equivalents from mbedtls_config.h NOT IN SCOPE OF THE REPO SPLIT WORK. IT WILL BE DONE AS PART OF THE 4.0 WORK AND LIKELY AFTER THE REPO SPLIT.
  • Remove / update the config_adjust headers
  • Remove MBEDTLS_PSA_CRYPTO_CONFIG from mbedtls_config.
  • Remove references to MBEDTLS_PSA_CRYPTO_CONFIG from the library and tests
  • Study: breakdown work to update test dependencies and eliminate tests which use legacy config to do the same thing as a test using crypto config.

Subset of #8147

@daverodgman daverodgman changed the title Remove config options which have a PSA_WANT equivalent PSA_CRYPTO_CONFIG always on Oct 11, 2023
@daverodgman daverodgman added component-platform Portability layer and build scripts api-break This issue/PR breaks the API and must wait for a new major version size-s Estimated task size: small (~2d) enhancement labels Oct 11, 2023
@daverodgman daverodgman added size-m Estimated task size: medium (~1w) and removed size-s Estimated task size: small (~2d) labels Nov 28, 2023
@daverodgman
Copy link
Contributor Author

Note: there is also significant work to update lots of test dependencies

@daverodgman
Copy link
Contributor Author

Remove tests which test the same thing with/without PSA_CRYPTO_CONFIG

@daverodgman
Copy link
Contributor Author

Note: TF-PSA-Crypto has tasks to do some of this already

@daverodgman daverodgman changed the title PSA_CRYPTO_CONFIG always on Study: PSA_CRYPTO_CONFIG always on Nov 28, 2023
@daverodgman daverodgman added size-l Estimated task size: large (2w+) and removed size-m Estimated task size: medium (~1w) labels Nov 28, 2023
@ronald-cron-arm
Copy link
Contributor

ronald-cron-arm commented Apr 12, 2024

We should also take care that the testing done in all.sh components where PSA_CRYPTO_CONFIG is disabled stay eventually the same with PSA_CRYPTO_CONFIG always enabled. In a component where PSA_CRYPTO_CONFIG is disabled and a crypto mechanism is disabled but gets enabled through the PSA_CRYPTO_CONFIG mechanism, the testing is not the same anymore when PSA_CRYPTO_CONFIG is enabled: a crypto mechanism that was intended to be disabled in the test component is enabled eventually. I have been through all.sh components and I have found that the following components are impacted:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-break This issue/PR breaks the API and must wait for a new major version component-platform Portability layer and build scripts enhancement
Projects
Status: Mbed TLS 4.0 MUST
Status: Implementation in progress
Status: Configuration split
Development

No branches or pull requests

2 participants