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

Merge psa_core_key_attributes_t back into psa_key_attributes_t #6496

Closed
gilles-peskine-arm opened this issue Oct 27, 2022 · 1 comment · Fixed by #8867
Closed

Merge psa_core_key_attributes_t back into psa_key_attributes_t #6496

gilles-peskine-arm opened this issue Oct 27, 2022 · 1 comment · Fixed by #8867
Assignees
Labels
component-psa PSA keystore/dispatch layer (storage, drivers, …) enhancement size-m Estimated task size: medium (~1w) size-optimisation

Comments

@gilles-peskine-arm
Copy link
Contributor

The substructure psa_core_key_attributes_t was created in ARMmbed/mbed-crypto#197 mainly to save RAM usage in the key store. But it has costs:

  • Maintenance cost to choose between psa_core_key_attributes_t and psa_key_attributes_t.
  • Code size: Ronald noticed that we need to copy a psa_core_key_attributes_t to a psa_key_attributes_t each time we call a driver wrapper, and although the cost each time is small, it's done in a lot of places so this adds up to a substantial amount.

Goal of this task: put the all the fields into a single structure.

This will increase the RAM usage because of the extra fields (domain_parameters and domain_parameters_size). But we can make that conditional to having RSA in the build, since domain parameters are only used for RSA. Or we might remove domain parameters altogether.

@gilles-peskine-arm gilles-peskine-arm added enhancement component-psa PSA keystore/dispatch layer (storage, drivers, …) labels Oct 27, 2022
@tom-cosgrove-arm tom-cosgrove-arm added size-optimisation size-m Estimated task size: medium (~1w) labels Mar 30, 2023
@tom-cosgrove-arm
Copy link
Contributor

@ronald-cron-arm may have a proof-of-concept for this - ask him!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-psa PSA keystore/dispatch layer (storage, drivers, …) enhancement size-m Estimated task size: medium (~1w) size-optimisation
Projects
Status: Mbed TLS 3.6 release
3 participants