SHA-3: fix wrong digest on refused vector claim, v7 gates, build fixes - #11441
SHA-3: fix wrong digest on refused vector claim, v7 gates, build fixes#11441kaleb-himes wants to merge 6 commits into
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11441
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs
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.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11441
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs
Findings: 3
3 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
72b6fb7 to
8f9bc3c
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11441
Scan targets checked: none
Failed targets: wolfcrypt-src, wolfcrypt-bugs
|
@wolfSSL-Fenrir-bot review force |
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11441
Scan targets checked: none
Failed targets: wolfcrypt-src, wolfcrypt-bugs
Dismiss to re-request
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11441
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs
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.
| #ifdef SHA3_256_CLAIM_RETRY_TEST | ||
| /* A refused vector-register claim must leave the context usable: the retry has | ||
| * to return the same digest, not one built from a half-absorbed state. */ | ||
| static wc_test_ret_t sha3_256_claim_retry_test(void) |
There was a problem hiding this comment.
Claim-failure tests omit Update and SHAKE squeeze paths · Missing edge-case coverage on a function the PR also changed
sha3_256_claim_retry_test() only drives Final; the new claim-failure exits in Sha3Update and both SHAKE squeeze functions remain untested. Unlike known #1978, this is refusal/retry coverage, not alignment.
Related earlier finding on this pull request (similar but distinct): Both concern missing forced claim-refusal/retry coverage in SHA-3 tests, but the historical issue targets finalization in sha3_256_kat_test while this candidate targets Sha3Update and SHAKE squeeze operations in sha3_256_claim_retry_test. The faulting operations and required test additions differ, so one patch would not fix both.
Suggested fix: Extend the helper to force and verify refusal plus retry for SHA-3 Update and both SHAKE SqueezeBlocks paths.
Description
Fixes
Testing
Tested 11 of 11 bench configurations pass. Each payload cell fails on the base without the fix:
BMI2 vs AVX2 measured on a Core Ultra 9 285K, same tree with only the lane changed: SHA3-256 at 873 vs 701 MiB/s, C block 807.
Self-contained, no dependency on other in-flight branches.
Checklist