Open gilles-peskine-arm opened 3 years ago
I have started working on this ticket and can have a PR ready fairly soon.
Should a solution to this ticket include updates of the storage format documentation? It seems like a separate ticket was created for this https://github.com/ARMmbed/mbedtls/issues/3737
Currently the bit-size is stored for dynamic-driver secure element keys and calculated for the data for transparent keys. To simplify the design of storage for opaque drivers that store the key as a wrapped blob (https://github.com/ARMmbed/mbedtls/issues/3289), store the bit-size systematically with the other attributes.
The storage format currently has a 32-bit field for the key type, but key types are now 16-bit, as are key sizes. So I propose to split these 32-bits into type and size.
psa_format_key_data_for_storage
andpsa_parse_key_data_from_storage
to store the bit-size with the other attributes.test_suite_psa_crypto_persistent_key
.