Skip to content

ECC wolfBoot image manager verify methods - #522

Open
bigbrett wants to merge 3 commits into
wolfSSL:mainfrom
bigbrett:tc4-support
Open

ECC wolfBoot image manager verify methods#522
bigbrett wants to merge 3 commits into
wolfSSL:mainfrom
bigbrett:tc4-support

Conversation

@bigbrett

@bigbrett bigbrett commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Adds support for wolfBoot images signed with ECC256+SHA256 to support the default verify method on tc4

@bigbrett bigbrett self-assigned this Sep 4, 2026
@bigbrett
bigbrett requested review from wolfSSL-Fenrir-bot and a lite review from Copilot September 4, 2026 18:01

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.

🔵 Needs a closer look

It modifies security-critical boot-image verification logic (cryptographic verification and DMA-aware parsing), so it warrants focused human review despite tests and documentation updates.

Pull request overview

This PR adds wolfBoot image-verification support for ECC P-256 (ECC256) + SHA-256 so wolfHSM can verify the default wolfBoot signing method on tc4. It extends the server image manager with an ECC-specific wolfBoot verify method, updates documentation accordingly, and expands the test suite and test-data generation to cover ECC wolfBoot artifacts.

Changes:

  • Add wh_Server_ImgMgrVerifyMethodWolfBootEcc256WithSha256() and the corresponding wolfBoot auth-type constant (ECC256).
  • Refactor shared wolfBoot header hashing/validation to support multiple auth types (RSA4096 and ECC256) and implement ECC signature verification.
  • Update test data generation and add positive/negative tests for ECC wolfBoot images (including corrupt-signature negatives).
File summaries
File Description
wolfhsm/wh_server_img_mgr.h Exposes ECC256+SHA256 wolfBoot verify method and auth-type constant.
src/wh_server_img_mgr.c Implements ECC wolfBoot verification and generalizes wolfBoot header validation for multiple auth types.
test/wh_test_server_img_mgr.c Adds ECC wolfBoot test coverage plus signature-corruption negative tests for wolfBoot variants.
test-refactor/server/wh_test_server_img_mgr.c Ports the same ECC wolfBoot and corrupt-signature negative coverage into the refactored test harness.
test/scripts/gen_wolfboot_test_data.sh Extends generated test vectors to include ECC P-256 key material and an ECC-signed wolfBoot image/header.
docs/src/8-Integration.md Updates integration guidance to reflect wolfBoot image types and ECC method support.
docs/src/5-Features.md Documents the new ECC wolfBoot verify method and clarifies method/type pairing behavior.
test-refactor/README.md Updates translated-test documentation to list wolfBoot ECC256 coverage.
Review details
  • Files reviewed: 8/9 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@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 #522

Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread test-refactor/server/wh_test_server_img_mgr.c Outdated
Comment thread test-refactor/server/wh_test_server_img_mgr.c Outdated

@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 #522

Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Comment thread src/wh_server_img_mgr.c Outdated
Comment thread src/wh_server_img_mgr.c Outdated
Comment thread src/wh_server_img_mgr.c Outdated
Comment thread src/wh_server_img_mgr.c Outdated

@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 #522

Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

@wolfSSL-Fenrir-bot
wolfSSL-Fenrir-bot dismissed stale reviews from themself September 4, 2026 20:56

Fenrir's latest completed scan found no issues; clearing the prior automated change request.

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