-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Various PSA Crypto fixes #20854
Merged
Merged
Various PSA Crypto fixes #20854
Conversation
This file contains 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
Wer-Wolf
requested review from
leandrolanzieri,
aabadie and
MichelRottleuthner
as code owners
September 7, 2024 10:04
github-actions
bot
added
Area: tests
Area: tests and testing framework
Area: sys
Area: System
labels
Sep 7, 2024
When psa_status_t is defined inside crypto_types.h, then all users of psa_status_t are forced to pull the full range of PSA Crypto API type definitions. This however means that psa_status_t cannot be used when defining those PSA Crypto API types, since doing so would create a cycle. Fix this by moving the PSA status definitions into a separate header file which additionally is compatible with the PSA Status code API. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
The PSA crypto specification states that when creating keys, the usage flags PSA_KEY_USAGE_SIGN_HASH/PSA_KEY_USAGE_VERIFY_HASH automatically set the usage flags PSA_KEY_USAGE_SIGN_MESSAGE/PSA_KEY_USAGE_VERIFY_MESSAGE on the key. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Wer-Wolf
force-pushed
the
psa-headers
branch
from
September 7, 2024 10:12
9e1cf6f
to
3ba57d6
Compare
benpicco
added
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
labels
Sep 7, 2024
Wer-Wolf
force-pushed
the
psa-headers
branch
from
September 8, 2024 05:19
3ba57d6
to
a66dd5c
Compare
Einhornhool
reviewed
Sep 10, 2024
Einhornhool
approved these changes
Sep 11, 2024
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.
LGTM
mguetschow
approved these changes
Sep 16, 2024
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, LGTM, too! Just two comments below.
Add some tests to verify that when creating or importing keys, the usage flags PSA_KEY_USAGE_SIGN_HASH/PSA_KEY_USAGE_VERIFY_HASH automatically set the usage flags PSA_KEY_USAGE_SIGN_MESSAGE/ PSA_KEY_USAGE_VERIFY_MESSAGE on the key. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
The initial implementation was inspired by MbedTLS, with the addition of the MD2 and MD4 algorithms. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
This support macro is necessary for full MAC support. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Wer-Wolf
force-pushed
the
psa-headers
branch
from
September 17, 2024 19:37
a66dd5c
to
fe56b7d
Compare
Thanks :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: doc
Area: Documentation
Area: sys
Area: System
Area: tests
Area: tests and testing framework
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
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 fixes some bugs and missing features found during implementing a generic HMAC backend.
Since those fixes are not directly connected to the generic HMAC, it would make sense to merge them separatly.
Testing procedure
The changes where tested using the psa_crypto test where applicable.
Issues/PRs references
See #20758.