Add crypto callback for SHAKE absorb and squeeze ops - #11548
Conversation
32a42f8 to
02d0fa3
Compare
02d0fa3 to
4f757ce
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11548
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfcrypt-port-bugs, wolfssl-src, wolfssl-bugs
Coverage: 5 of 7 in-scope changed file(s) opened by the reviewer; not opened: tests/unit-mcdc/test_cryptocb_whitebox.c, wolfssl/wolfcrypt/cryptocb.h
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
|
jenkins retest this please |
4f757ce to
90dbaa8
Compare
90dbaa8 to
29b24f8
Compare
|
jenkins retest this please |
29b24f8 to
83d853b
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The ASU fallback can lose previously buffered SHAKE input, and the callback interface version was not incremented.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds granular SHAKE absorb/squeeze crypto-callback offloading while preserving software fallback behavior.
Changes:
- Adds SHAKE operation metadata and dispatch hooks.
- Extends software-device and Xilinx ASU handling.
- Adds tests and CI configurations for SHAKE XOF callbacks.
| File | Description |
|---|---|
wolfssl/wolfcrypt/cryptocb.h |
Defines SHAKE callback operations and payload field. |
wolfcrypt/src/cryptocb.c |
Populates SHAKE operation metadata. |
wolfcrypt/src/sha3.c |
Dispatches absorb and squeeze operations. |
wolfcrypt/src/port/xilinx/versal_gen2_asu/asu_hash.c |
Declines unsupported granular operations. |
tests/swdev/swdev.c |
Implements software SHAKE callback handling. |
wolfcrypt/test/test.c |
Adds callback and fallback tests. |
tests/unit-mcdc/test_cryptocb_whitebox.c |
Updates the callback signature test. |
.wolfssl_known_macro_extras |
Registers the new feature macro. |
.github/workflows/cryptocb-only.yml |
Adds CI coverage and sharding. |
.github/configs/os-check-linux.json |
Adds a SHAKE XOF callback configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cc659b7 to
9b95770
Compare
|
jenkins retest this please |
9b95770 to
9c0fa2b
Compare
|
jenkins retest this please |


Description
Add the more granular sponge operations absorb and squeeze to the SHAKE crypto callback mechanism. These are needed to fully offload the arithmetic to the device. Uncovered during development of wolfSSL/wolfHSM#523
Note: does not include
CB_ONLYmode, and does not update existing shake callers (ML-KEM, ML_DSA, LMS, XMSS, and SLH-DSA).Testing
Added unit tests
Checklist