mbedtls
mbedtls copied to clipboard
Add consistency tests for mbedtls_pk_import_into_psa
We should do pair consistency testing on mbedtls_pk_import_into_psa
, i.e. ensure that the imported key has the expected material. For key pairs, since we also have a pk object, we can do some pair consistency checks: sign with one key and verify with the other, or encrypt/decrypt, or do a key agreement.
Valerio has done this for mbedtls_pk_copy_from_psa
in https://github.com/Mbed-TLS/mbedtls/pull/8774. The goal of this issue is to hoist the relevant code into a reusable function, and use that for mbedtls_pk_import_into_psa
as well.
Prerequisites: #8774, #8807.