-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Remove component uses of MBEDTLS_ECDSA_DETERMINISTIC
#10367
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
base: development
Are you sure you want to change the base?
Remove component uses of MBEDTLS_ECDSA_DETERMINISTIC
#10367
Conversation
Remove all references to MBEDTLS_ECDSA_DETERMINISTIC from components-configuration-crypto.sh. Replace them with PSA_WANT_ALG_DETERMINISTIC_ECDSA. This is safe because: * MBEDTLS_ECDSA_DETERMINISTIC is only ever unset in components in order to avoid errors from disabling its dependency MBEDTLS_HMAC_DRBG_C. * MBEDTLS_ECDSA_DETERMINISTIC is only ever defined in config_adjust_legacy_from_psa.h, and only if PSA_WANT_ALG_DETERMINISTIC_ECDSA is defined. Therefore PSA_WANT_ALG_DETERMINISTIC_ECDSA's dependencies are a superset of MBEDTLS_ECDSA_DETERMINISTIC's dependencies and must include MBEDTLS_HMAC_DRBG_C, so disabling PSA_WANT_ALG_DETERMINISTIC_ECDSA is a sufficient substitute for disabling MBEDTLS_ECDSA_DETERMINISTIC. Signed-off-by: David Horstmann <david.horstmann@arm.com>
MBEDTLS_ECDSA_DETERMINISTIC
@@ -210,7 +210,7 @@ component_test_no_hmac_drbg_use_psa () { | |||
msg "build: Full minus HMAC_DRBG, PSA crypto in TLS" | |||
scripts/config.py full | |||
scripts/config.py unset MBEDTLS_HMAC_DRBG_C | |||
scripts/config.py unset MBEDTLS_ECDSA_DETERMINISTIC # requires HMAC_DRBG | |||
scripts/config.py -c $CRYPTO_CONFIG_H unset PSA_WANT_ALG_DETERMINISTIC_ECDSA # requires HMAC_DRBG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scripts/config.py -c $CRYPTO_CONFIG_H unset PSA_WANT_ALG_DETERMINISTIC_ECDSA # requires HMAC_DRBG | |
scripts/config.py unset PSA_WANT_ALG_DETERMINISTIC_ECDSA # requires HMAC_DRBG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"-c $CRYPTO_CONFIG_H was necessary at some point, but hasn't been for a while now. I had been planning to clean it up eventually. I know this isn’t the main focus of this PR, but would you mind cleaning it up across all the components-*.sh scripts?"
Fixes #10328
Remove all references to
MBEDTLS_ECDSA_DETERMINISTIC
fromcomponents-configuration-crypto.sh
. Replace them withPSA_WANT_ALG_DETERMINISTIC_ECDSA
.This is safe because:
MBEDTLS_ECDSA_DETERMINISTIC
is only ever unset in components in order to avoid errors from disabling its dependencyMBEDTLS_HMAC_DRBG_C
.MBEDTLS_ECDSA_DETERMINISTIC
is only ever defined inconfig_adjust_legacy_from_psa.h
, and only ifPSA_WANT_ALG_DETERMINISTIC_ECDSA
is defined.Therefore
PSA_WANT_ALG_DETERMINISTIC_ECDSA
's dependencies are a superset ofMBEDTLS_ECDSA_DETERMINISTIC
's dependencies and must includeMBEDTLS_HMAC_DRBG_C
, so disablingPSA_WANT_ALG_DETERMINISTIC_ECDSA
is a sufficient substitute for disablingMBEDTLS_ECDSA_DETERMINISTIC
.PR checklist
Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.