Skip to content

Async support for CMAC#368

Open
bigbrett wants to merge 1 commit into
wolfSSL:mainfrom
bigbrett:async-crypto-cmac
Open

Async support for CMAC#368
bigbrett wants to merge 1 commit into
wolfSSL:mainfrom
bigbrett:async-crypto-cmac

Conversation

@bigbrett
Copy link
Copy Markdown
Contributor

@bigbrett bigbrett commented May 14, 2026

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?

@bigbrett bigbrett self-assigned this May 14, 2026
Copilot AI review requested due to automatic review settings May 14, 2026 19:41
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.

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 inlineInSz and 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.

Comment thread src/wh_client_crypto.c
Comment thread src/wh_client_crypto.c
Comment thread src/wh_client_crypto.c
Comment thread src/wh_client_crypto.c
Comment thread src/wh_client_crypto.c
Comment thread src/wh_client_crypto.c
Comment thread src/wh_client_crypto.c
Comment thread wolfhsm/wh_message_crypto.h
Comment thread src/wh_client_crypto.c
Comment thread src/wh_client_crypto.c
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 #368

Scan targets checked: none
Failed targets: wolfhsm-crypto-bugs, wolfhsm-src

⚠️ Review incomplete — one or more scan targets failed before findings could be produced. See the Fenrir PR review detail page for logs.

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 #368

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

No new issues found in the changed files. ✅

@bigbrett bigbrett marked this pull request as ready for review May 15, 2026 17:03
@bigbrett bigbrett assigned Frauschi, rizlik and AlexLanzano and unassigned bigbrett May 15, 2026
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.

6 participants