Async support for CMAC#368
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds async CMAC support (non-DMA and DMA) with new Request/Response primitives, updates wire format to support optional inline input for DMA CMAC, and extends tests/docs to cover the new async behavior.
Changes:
- Introduces async CMAC APIs: oneshot Generate plus streaming Update/Final (both non-DMA and DMA).
- Extends CMAC DMA request wire format with
inlineInSzand updates server handling accordingly. - Adds comprehensive CMAC async test coverage and documents async CMAC design/dispatch behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfhsm/wh_message_crypto.h | Adds max-inline-size macro and extends CMAC DMA request struct with inlineInSz. |
| wolfhsm/wh_client_crypto.h | Declares new async CMAC (non-DMA + DMA) API surface. |
| wolfhsm/wh_client.h | Adds CMAC DMA async context to client DMA async union. |
| src/wh_message_crypto.c | Translates new inlineInSz field for CMAC DMA requests. |
| src/wh_server_crypto.c | Validates/parses inline input and updates CMAC DMA execution order. |
| src/wh_client_crypto.c | Implements async CMAC APIs, wrapper dispatch, and DMA mapping lifecycle management. |
| test/wh_test_crypto.c | Adds direct tests for async CMAC (non-DMA + DMA) and integrates into test runner. |
| docs/draft/async-crypto.md | Documents CMAC async API rationale, dispatch rules, and DMA wire format change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4349eea to
f171d53
Compare
f171d53 to
50cfe94
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #368
Scan targets checked: none
Failed targets: wolfhsm-crypto-bugs, wolfhsm-src
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #368
Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src
No new issues found in the changed files. ✅
as described on the tin. See docs for more info. Streaming state a little complicated so should receive extra attentiveness in review. Think I solved it in the right way?