-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sys/psa_crypto: Adding hmac hashing on psa_import_key and fix max hmac key size #21297
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.
Nice, thanks for finding and fixing! Just two suggestions below.
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.
Please squash! :)
49a6a50
to
630ab15
Compare
This needs another rebase after #21303 is in. |
Update sys/psa_crypto/psa_crypto_algorithm_dispatch.c Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
630ab15
to
8d13b86
Compare
Looks like you need to run I wonder how that ever fit on the tiny AVR :) |
Contribution description
This PR adds hashing functionality to psa_import_key. According to the PSA Certified Crypto API:
In addition, [RFC2104] §2 states that when using keys longer than the hash block size, the key must be hashed.
Finally, the
CONFIG_PSA_MAX_KEY_SIZE
value has been corrected.Testing procedure
A test is provided with a 128 Byte key.
Issues/PRs references
This PR follows up on #20758.