Skip to content

fix for tropic port AES key length used#10470

Merged
LinuxJedi merged 2 commits into
wolfSSL:masterfrom
JacobBarthelmeh:tropic
May 21, 2026
Merged

fix for tropic port AES key length used#10470
LinuxJedi merged 2 commits into
wolfSSL:masterfrom
JacobBarthelmeh:tropic

Conversation

@JacobBarthelmeh

@JacobBarthelmeh JacobBarthelmeh commented May 12, 2026

Copy link
Copy Markdown
Contributor

Fenrir report F-3333

@JacobBarthelmeh JacobBarthelmeh self-assigned this May 12, 2026
Copilot AI review requested due to automatic review settings May 12, 2026 19:59

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #10470

Scan targets checked: wolfcrypt-port-bugs

No new issues found in the changed files. ✅

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

Note

Copilot was unable to run its full agentic suite in this review.

Fixes the TropicSquare Tropic01 crypto callback to use the actual AES key length (instead of a fixed block/max size) when retrieving keys and configuring the AES context.

Changes:

  • Derive keyLen from the active AES context for AES-GCM (enc/dec) and AES-CBC.
  • Pass keyLen into Tropic01_GetKeyAES(...) to fetch the correct number of key bytes.
  • Pass keyLen into wc_AesSetKey(...) instead of WC_AES_BLOCK_SIZE.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wolfcrypt/src/port/tropicsquare/tropic01.c Outdated
Comment thread wolfcrypt/src/port/tropicsquare/tropic01.c
Comment thread wolfcrypt/src/port/tropicsquare/tropic01.c
@JacobBarthelmeh

Copy link
Copy Markdown
Contributor Author

I think it's best if this is rebased onto #10449 once that simulator test is merged. Before this fix itself is merged.

@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@JacobBarthelmeh

JacobBarthelmeh commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

Retest this please Jenkins. Page not found.

@JacobBarthelmeh

Copy link
Copy Markdown
Contributor Author

Rebased onto tropic simulator CI addition.

@LinuxJedi LinuxJedi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great catch!

@LinuxJedi LinuxJedi merged commit 8574fa9 into wolfSSL:master May 21, 2026
446 checks passed
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.

5 participants