add SHA3 support#384
Conversation
There was a problem hiding this comment.
Pull request overview
Adds SHA3 support across wolfHSM’s crypto message formats, client APIs, server handlers, cryptocb dispatch, and tests for blocking, async, and DMA paths.
Changes:
- Introduces SHA3 wire formats, translation helpers, and comm-buffer sizing checks.
- Adds SHA3 client/server handling for SHA3-224/256/384/512, including DMA and Keccak rejection/fallback behavior.
- Expands crypto tests and test configuration to exercise SHA3 variants and async paths.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
wolfhsm/wh_message_crypto.h |
Adds SHA3/SHA3-DMA message structs, sizing macros, static asserts, and translation prototypes. |
wolfhsm/wh_client_crypto.h |
Adds SHA3 include and public client API declarations. |
src/wh_message_crypto.c |
Implements SHA3 and SHA3-DMA message translation helpers. |
src/wh_client_crypto.c |
Implements shared SHA3 client helpers, per-variant APIs, and DMA APIs. |
src/wh_client_cryptocb.c |
Routes SHA3 cryptocb requests to wolfHSM client APIs with Keccak fallback. |
src/wh_server_crypto.c |
Adds SHA3 and SHA3-DMA server handlers and dispatch cases. |
test/wh_test_crypto.c |
Adds SHA3 functional, async, DMA, bad-argument, and Keccak behavior tests. |
test/wh_test_check_struct_padding.c |
Adds SHA3 message structs to padding checks. |
test/config/user_settings.h |
Enables hash flags for SHA3 Keccak-path test coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #384
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. Findings are non-blocking.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #384
Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src
No new issues found in the changed files. ✅
Adds support for SHA3 to wolfHSM. Supports blocking wolfCrypt and async native API surface.