[Backport esp-hal-1.1.x] ESP32: RSA, SHA fixes#5607
Open
github-actions[bot] wants to merge 1 commit into
Open
Conversation
Author
|
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-5592-to-esp-hal-1.1.x
git worktree add --checkout .worktree/backport-5592-to-esp-hal-1.1.x backport-5592-to-esp-hal-1.1.x
cd .worktree/backport-5592-to-esp-hal-1.1.x
git reset --hard HEAD^
git cherry-pick -x 72d44d0721677f07b35bcdcb716943f56e7b66f6
git push --force-with-lease |
Merged
7cd0868 to
913f0fd
Compare
Contributor
|
Hmm I'm not sure how the changelog system handles backports |
Contributor
There was a problem hiding this comment.
Pull request overview
Backport of upstream ESP32 crypto accelerator fixes to the esp-hal-1.1.x branch, addressing ESP32-specific SHA and RSA correctness issues around peripheral/interrupt handling and resource ownership.
Changes:
- SHA (ESP32): introduce an explicit hardware/software hasher split so concurrent contexts fall back to software and the SHA peripheral isn’t powered down while a hardware context is active.
- RSA (ESP32): unify peripheral lifetime management into a guard that disables RSA interrupts before the peripheral clock gets stopped.
- HIL test: adjust SHA interleaving test to drop the
Shadriver before starting the backend, allowing backend resource release.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
hil-test/src/bin/crypto/sha.rs |
Drops the Sha driver in the interleaved rolling-context test to ensure backend resources can be released/reacquired as intended. |
esp-hal/src/sha.rs |
Adds ESP32-specific Esp32Hasher (hardware guard vs software fallback) and adjusts context drop behavior/flagging for accelerator usage. |
esp-hal/src/rsa/mod.rs |
Replaces separate guards with a single RsaGuard to ensure interrupts are disabled before peripheral shutdown across chips (including ESP32). |
Member
I guess we need to find out :D |
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.
Description
Backport of #5592 to
esp-hal-1.1.x.