Mbed-TLS / mbedtls

An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API. Releases are on a varying cadence, typically around 3 - 6 months between releases.
https://www.trustedfirmware.org/projects/mbed-tls/
Other
5.25k stars 2.56k forks source link

Rename `MBEDTLS_PSA_P256M_DRIVER_ENABLED` as `PSA_CRYPTO_DRIVER_MBEDTLS_P256M` #9180

Open valeriosetti opened 4 months ago

valeriosetti commented 4 months ago

Suggested enhancement

The symbol used to guard p256-m driver does not seem to follow the naming pattern of other drivers in psa_crypto_driver_wrappers.h. It should start with PSA_CRYPTO_DRIVER_ then we should have the P256M (what is the driver about) and MBEDTLS (developer) parts in some way. IMO ENABLED should not be present. What do you think?

Justification

Mbed TLS needs this to have a more uniform naming of symbols for drivers.

frkv commented 4 months ago

Small improvement-suggestion: The naming convention for the crypto toolbox has been Mbed crypto (concatenated and lower case it is mbedcrypto_). I say either change MBEDTLS_P256M to MBEDCRYPTO_P256M or skip MBEDTLS_ and/or MBEDCRYPTO_ altogether and stick with only P256-M

Reasoning: Once TF-PSA-Crypto is established, then Mbed TLS will contain TLS/DTLS and X.509 and maybe some core functionality

Side-note: Why not stick with the hyphen in P256-M to qualify where the M comes from (Cortex-M)?