Fix STM32 DHUK AES-CBC in-place decrypt chaining IV and correct stale CTR comment#10880
Open
dgarske wants to merge 1 commit into
Open
Fix STM32 DHUK AES-CBC in-place decrypt chaining IV and correct stale CTR comment#10880dgarske wants to merge 1 commit into
dgarske wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Follow-up to the STM32 bare-metal crypto port, addressing a correctness issue in the STM32 DHUK (device-bound key) AES-CBC crypto-callback path for in-place decrypt IV chaining, plus a small comment correction in the STM32 AES-CTR helper.
Changes:
- Fix DHUK AES-CBC decrypt chaining IV update for in-place decrypt by capturing the last ciphertext block before decrypt.
- Update DHUK CBC IV update to use the captured ciphertext block instead of re-reading from the (potentially overwritten) input.
- Correct a stale/misleading comment in the STM32 AES-CTR per-block transform path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| wolfcrypt/src/port/st/stm32.c | Adjusts DHUK AES-CBC decrypt IV chaining logic to handle in-place decrypt correctly. |
| wolfcrypt/src/aes.c | Updates an AES-CTR comment to match actual loop/break behavior on transform failure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mattia-moffa
approved these changes
Jul 11, 2026
Member
|
Jenkins retest this please |
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
Followup to #10395
Testing
How did you test?
Checklist