-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Export the mbedtls_md_psa_alg_from_type function. #8340
Comments
Question: should this be part of Note there's a 3rd option: |
I would recommend psa_util.h as crypto_extra.h also exists in scope of TF-M. I'm assuming that TF-M will be less dependent on understanding the APIs you would want to put in psa_util.h in Mbed TLS 4.0 and later |
Note: we probably want to make functions for both directions available: Question: currently the internal functions have quirks (see warnings in their documentation). Are those acceptable for public functions of should the public functions avoid those (at the cost of higher code size)? |
Quoting from the document added by #8657:
|
Here's my 2 cents: since we're speaking of conversion functions I would prefer them to just perform the translation and have some other function to check for availability. However this is not the approach used in elliptic curves (#8664), so I guess it's better to keep the same pattern for all the conversion functions and add the check also here. |
Conversion functions tend to be limited by availability because in a build with only a subset of algorithms, we don't want to have to include enough metadata to convert all algorithms, because that would cost code size. This limits the choice to: if algorithm X is unsupported, is |
Suggested enhancement
I'm seeing the tagged release v3.5.0 where this function: mbedtls_md_psa_alg_from_type is introduced 1.
Probably TF-A code can make use of it, but it is in local header. Is it possible to export this?
Justification
It will be easier for the mbedTLS consumer to convert mbedtls_md_type to psa_algorithm.
The text was updated successfully, but these errors were encountered: