sys/psa_crypto: Adding hmac hashing on psa_import_key and fix max hmac key size#21297
Merged
maribu merged 3 commits intoRIOT-OS:masterfrom Mar 23, 2025
Merged
Conversation
mguetschow
reviewed
Mar 14, 2025
Contributor
mguetschow
left a comment
There was a problem hiding this comment.
Nice, thanks for finding and fixing! Just two suggestions below.
49a6a50 to
630ab15
Compare
Contributor
|
This needs another rebase after #21303 is in. |
Update sys/psa_crypto/psa_crypto_algorithm_dispatch.c Co-authored-by: mguetschow <[email protected]>
630ab15 to
8d13b86
Compare
Member
|
Looks like you need to run I wonder how that ever fit on the tiny AVR :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_SIZEvalue has been corrected.Testing procedure
A test is provided with a 128 Byte key.
Issues/PRs references
This PR follows up on #20758.