Skip to content

Fix STM32 DHUK AES-CBC in-place decrypt chaining IV and correct stale CTR comment#10880

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:stm32_bare2
Open

Fix STM32 DHUK AES-CBC in-place decrypt chaining IV and correct stale CTR comment#10880
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:stm32_bare2

Conversation

@dgarske

@dgarske dgarske commented Jul 10, 2026

Copy link
Copy Markdown
Member

Description

Followup to #10395

Testing

How did you test?

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@dgarske dgarske requested a review from night1rider July 10, 2026 21:41
@dgarske dgarske self-assigned this Jul 10, 2026
Copilot AI review requested due to automatic review settings July 10, 2026 21:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread wolfcrypt/src/port/st/stm32.c
@mattia-moffa

Copy link
Copy Markdown
Member

Jenkins retest this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants