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

Break down mbedtls/psa_util.h #108

Open
gilles-peskine-arm opened this issue Jul 8, 2024 · 0 comments
Open

Break down mbedtls/psa_util.h #108

gilles-peskine-arm opened this issue Jul 8, 2024 · 0 comments
Labels
size-s Estimated task size: small (~2d)

Comments

@gilles-peskine-arm
Copy link
Contributor

The header mbedtls/psa_util.h contains miscellaneous functions that tie the PSA API with the legacy crypto API. It no longer makes sense when the legacy API is not the primary API.

The goal of this issue is to remove include/mbedtls/psa_util.h and move its functions to other headers:

  • mbedtls_psa_get_random, MBEDTLS_PSA_RANDOM_STATE: only useful to assist other legacy APIs. Move to psa_util_internal.h.
  • mbedtls_ecc_group_to_psa, mbedtls_ecc_group_from_psa: only useful in combination with ecp.h and other interfaces that use a legacy group ID. Move to ecp.h (which is becoming internal).
  • mbedtls_md_psa_alg_from_type, mbedtls_md_type_from_psa_alg: either move to md.h or remove altogether, depending on the fate of mbedtls_md_type_t in the md.h redesign.
  • mbedtls_ecdsa_raw_to_der, mbedtls_ecdsa_der_to_raw: these functions are in fact not legacy-PSA bridges, but PSA helpers, and remain useful for PSA API users. Move to asn1write.h and asn1.h respectively.

Functions that become internal may become obsolete with the work towards TF-PSA-Crypto 1.0. Removing the functions is out of scope here (but may be done at once if the functions are no longer used by the time we remove psa_util.h).

@gilles-peskine-arm gilles-peskine-arm added size-s Estimated task size: small (~2d) approved Design and code approved - may be waiting for CI or backports labels Jul 8, 2024
@gilles-peskine-arm gilles-peskine-arm removed the approved Design and code approved - may be waiting for CI or backports label Jul 8, 2024
@gilles-peskine-arm gilles-peskine-arm moved this to Implementation needed in Mbed TLS 4.0 planning Jul 8, 2024
@yanesca yanesca moved this to 4.0 - PSA Crypto always on in Mbed TLS Backlog Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-s Estimated task size: small (~2d)
Projects
Status: Implementation needed
Status: No status
Development

No branches or pull requests

1 participant