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

sys/psa_crypto: SHA-{384,512/{224,256}} #20598

Merged
merged 3 commits into from
May 17, 2024

Conversation

mguetschow
Copy link
Contributor

@mguetschow mguetschow commented Apr 19, 2024

Contribution description

Since #20484, RIOT contains software-implementations for the most commonly used truncated versions of SHA-512. This PR adds glue code to enable usage via the PSA Crypto API.

Sidenote: Although the nRF5 SDK documents support for SHA-384, it appears not to be supported on the nrf52840 CRYPTOCELL, as it returns CRYS_HASH_ILLEGAL_OPERATION_MODE_ERROR. This is also confirmed in this thread. They also state that this board actually does not support SHA-512 in hardware either. Maybe it's worth disabling the periph feature for SHA-512 in that case, too?

Testing procedure

make -C examples/psa_crypto all flash term

Issues/PRs references

Second part of #20127, follow-up of #20484

There's also some interdependence with #20545, one of them should be updated after the other has been merged @Einhornhool

Closes #20127

@github-actions github-actions bot added Area: doc Area: Documentation Area: build system Area: Build system Area: sys Area: System Area: examples Area: Example Applications labels Apr 19, 2024
@mguetschow mguetschow added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 19, 2024
@riot-ci
Copy link

riot-ci commented Apr 19, 2024

Murdock results

✔️ PASSED

6be95ca tests/sys/psa_crypto_hashes: sync with content from examples/psa_crypto

Success Failures Total Runtime
10104 0 10105 13m:34s

Artifacts

@mguetschow
Copy link
Contributor Author

Actually, let's defer this to after #20545, I'd get some more symlink interdependencies with this.

@mguetschow mguetschow force-pushed the psa-hashes-sha512-truncated branch from b5acee7 to 43fb1dc Compare May 14, 2024 15:14
@mguetschow mguetschow marked this pull request as ready for review May 14, 2024 15:14
@github-actions github-actions bot added the Area: tests Area: tests and testing framework label May 14, 2024
@mguetschow
Copy link
Contributor Author

Actually, let's defer this to after #20545, I'd get some more symlink interdependencies with this.

Done, after #20545 has been merged. Should be ready for review.

Copy link
Contributor

@Einhornhool Einhornhool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, example passes on nRF52840dk and native.

@mguetschow mguetschow requested a review from benpicco May 16, 2024 08:45
@mguetschow mguetschow added this pull request to the merge queue May 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 16, 2024
@mguetschow mguetschow force-pushed the psa-hashes-sha512-truncated branch from 43fb1dc to 6be95ca Compare May 17, 2024 08:52
@mguetschow mguetschow enabled auto-merge May 17, 2024 08:54
@mguetschow mguetschow added this pull request to the merge queue May 17, 2024
Merged via the queue into RIOT-OS:master with commit 3255b95 May 17, 2024
25 checks passed
@mguetschow mguetschow deleted the psa-hashes-sha512-truncated branch May 17, 2024 13:43
@mguetschow
Copy link
Contributor Author

Thanks everyone!

@mguetschow mguetschow added this to the Release 2024.07 milestone Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: doc Area: Documentation Area: examples Area: Example Applications 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sys/hashes: SHA-384, SHA-512/224 and SHA-512/256 support
4 participants