Skip to content
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

PSA key storage: systematically store the bit-size #3740

Open
gilles-peskine-arm opened this issue Oct 2, 2020 · 2 comments
Open

PSA key storage: systematically store the bit-size #3740

gilles-peskine-arm opened this issue Oct 2, 2020 · 2 comments
Assignees
Labels
component-crypto Crypto primitives and low-level interfaces enhancement

Comments

@gilles-peskine-arm
Copy link
Contributor

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 (#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.

  • Update psa_format_key_data_for_storage and psa_parse_key_data_from_storage to store the bit-size with the other attributes.
  • Update the dynamic-driver secure element code to not store the bit-size again.
  • Update test data in test_suite_psa_crypto_persistent_key.
  • Update the storage format documentation.
@torstenes
Copy link
Contributor

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 #3737

@gilles-peskine-arm
Copy link
Contributor Author

#3737 is to update historical documentation. If you change the format, please add a new section to https://github.com/ARMmbed/mbedtls/blob/development/docs/architecture/mbed-crypto-storage-specification.md that describes the new format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-crypto Crypto primitives and low-level interfaces enhancement
Projects
None yet
Development

No branches or pull requests

3 participants