Skip to content

fix for tropic port AES key length used#10470

Open
JacobBarthelmeh wants to merge 2 commits into
wolfSSL:masterfrom
JacobBarthelmeh:tropic
Open

fix for tropic port AES key length used#10470
JacobBarthelmeh wants to merge 2 commits into
wolfSSL:masterfrom
JacobBarthelmeh:tropic

Conversation

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor

@JacobBarthelmeh JacobBarthelmeh commented May 12, 2026

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
Copy link
Copy Markdown

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

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. ✅

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
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
Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor Author

Retest this please Jenkins. Page not found.

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.

3 participants