mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

Add consistency tests for mbedtls_pk_import_into_psa

Open gilles-peskine-arm opened this issue 1 year ago • 0 comments

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.

gilles-peskine-arm avatar Feb 15 '24 13:02 gilles-peskine-arm