Add more ECC dispatch to a driver testing#613
Add more ECC dispatch to a driver testing#613davidhorstmann-arm merged 15 commits intoMbed-TLS:developmentfrom
Conversation
65c320e to
0205cdf
Compare
|
Only the 10 last commits belong to this PRs. The eleven first belong to #612 |
0205cdf to
8741a96
Compare
ef1335f to
d273b49
Compare
minosgalanakis
left a comment
There was a problem hiding this comment.
Looks good but will need to rebase and flix the conflicts now.
I have manually confirmed the configuration used in the component migration and the inclusion of the tests/configs/user-config-accel-ecc.h <-- 'user-config-test-driver-extension.h' against the old MbedTLS macros e.g config_psa_crypto_config_ecp_light_only.
I can confirm there is feature parity, with only two exceptions which I commented bellow and are as intended.
Will approve if we get a green CI.
davidhorstmann-arm
left a comment
There was a problem hiding this comment.
A few small comments and questions. Anything marked 'nit' I consider optional.
…er.h Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Instead of using legacy error codes and translating them with `mbedtls_to_psa_error()` to PSA error codes, use the PSA error codes directly. Do not replace the legacy macros, only change their value. This is intended to avoid complicating backports to 3.6. Do not aplly this change for MBEDTLS_ERR_ECP_INVALID_KEY for the time being as there is a tricky case in `psa_crypto_pake.c` that requires non-trivial investigation. The new value for MBEDTLS_ERR_ECP_INVALID_KEY would be that of PSA_ERROR_INVALID_ARGUMENT but in `psa_crypto_pake.c` it is also translated to PSA_ERROR_DATA_INVALID. Moreover, we cannot simply translate PSA_ERROR_INVALID_ARGUMENT to PSA_ERROR_DATA_INVALID in `psa_crypto_pake.c`, because MBEDTLS_ERR_ECP_BAD_INPUT_DATA also maps to PSA_ERROR_INVALID_ARGUMENT, and we do not want to translate in that case to PSA_ERROR_DATA_INVALID. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Remove guard for MBEDTLS_ERR_ECP_INVALID_KEY translation so that it is also available for the generated test driver. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Equivalent of test_psa_crypto_config_accel_ecc_no_ecp_at_all in Mbed TLS. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Equivalent of test_psa_crypto_config_accel_ecc_ecp_light_only in Mbed TLS. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Use user-config-accel-ecc.h instead of a specific one to reduce the number of ECC related user config files. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Equivalent of test_psa_crypto_config_accel_pake in Mbed TLS. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Equivalent of test_psa_crypto_config_accel_ecc_some_key_types in Mbed TLS. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Equivalent of test_psa_crypto_config_accel_ecc_weierstrass_curves and test_psa_crypto_config_accel_ecc_non_weierstrass_curves in Mbed TLS Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Move mbedtls_ct_mpi_uint_if* static inline functions that are bignum specific to bignum_internal.h. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Equivalent of test_psa_crypto_config_accel_no_bignum and test_psa_crypto_config_accel_ecc_ffdh_no_bignum in Mbed TLS. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Remove MBEDTLS_PSA_ACCEL_ECC_SECP_[K|R]1_192 as secp192[k|r]1 curves are not supported anymore. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
In test_accel_ecc_some_key_types, start from no builtin ECC at all. Then it is just the fact to disable the acceleration of KEY_TYPE_ECC_KEY_PAIR_GENERATE that enables ecp.c. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
…tion Signed-off-by: Ronald Cron <ronald.cron@arm.com>
5fa5162 to
a16c89e
Compare
|
@minosgalanakis @davidhorstmann-arm I've pushed four new commits to address David's comments ending up at 5fa5162 and then rebased the 15 commits on top of development to address the conflict (only one comment line) that appeared when #672 was merged. |
davidhorstmann-arm
left a comment
There was a problem hiding this comment.
LGTM, thanks!
Description
This PR progresses #62.
Depends on:
#612PR checklist