-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sys/psa_crypto: Extend mac API #21621
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks mostly good at a first glance, please see some comments below.
Due to a design issue with the SE backend API (context size is dynamic, thus requiring a memory allocation) only psa_mac_verify() can be accelerated by SE backends.
Could you further elaborate on this? It's fine to leave the SE backend untouched for now, but I'd like to understand the reasoning.
Currently the PSA MAC dispatcher can only know the context size required by the SE backend during runtime using the |
2df74ac
to
273bec5
Compare
Currently PSA mac backends can only implement psa_mac_compute() from the PSA crypto API, but not psa_mac_verify() and the associated multi-part functions. Extend the location and algorithm dispatchers to connect the above PSA API functions to suitable backends. Also extend the MAC backend API to allow backends to implement those additional functions. Due to a design issue with the SE backend API (context size is dynamic, thus requiring a memory allocation) only psa_mac_verify() can be accelerated by SE backends. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
273bec5
to
27cf424
Compare
Well this is solved in |
Hum, seems like Nordic is now checking for human users while downloading the SDK
Should we host the zip ourselves instead? |
Does the license allow it? |
Should be no issue. |
Contribution description
Currently PSA mac backends can only implement psa_mac_compute() from the PSA crypto API, but not psa_mac_verify() and the associated multi-part functions.
Extend the location and algorithm dispatchers to connect the above PSA API functions to suitable backends. Also extend the MAC backend API to allow backends to implement those additional functions. Due to a design issue with the SE backend API (context size is dynamic, thus requiring a memory allocation) only psa_mac_verify() can be accelerated by SE backends.
Currently no backend implements the additional functions, but this will change in the future.
Testing procedure
I successfully compiled and executed the PSA-related tests.
Issues/PRs references
Prerequisite for #20758.