Skip to content

Restore SHA3 client state when the server cannot offload#455

Merged
Frauschi merged 1 commit into
wolfSSL:mainfrom
aidangarske:fix/sha3-cryptocb-fallback-state
Jul 20, 2026
Merged

Restore SHA3 client state when the server cannot offload#455
Frauschi merged 1 commit into
wolfSSL:mainfrom
aidangarske:fix/sha3-cryptocb-fallback-state

Conversation

@aidangarske

@aidangarske aidangarske commented Jul 16, 2026

Copy link
Copy Markdown
Member

This PR has two fixes that where causing the latent H5 failures

  • Restore SHA3 client state when the server cannot offload. The client mutated sha before the server answered NOT_COMPILED_IN, so wolfCrypt's software fallback absorbed the tail twice and silently returned a wrong digest (SHA3-224 at len=145). Found on real H5 hardware.

  • Secure server is built without SHA3 (wolfBoot, separate change). The NS client has WOLFSSL_SHA3, the server does not, so SHA3 returns rc=-174. Needed WOLFSSL_SHA3 + sha3.o in the secure build.

Fixes latent failures in #412 found when trying to reproduce I exposed this on real HW tests. failing the clinet Config test

Copilot AI review requested due to automatic review settings July 16, 2026 22:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@aidangarske
aidangarske force-pushed the fix/sha3-cryptocb-fallback-state branch from b74731e to 2d1f1c1 Compare July 16, 2026 22:23
@bigbrett bigbrett assigned Frauschi and unassigned bigbrett Jul 17, 2026
@Frauschi
Frauschi merged commit d873b5e into wolfSSL:main Jul 20, 2026
365 of 472 checks passed
@aidangarske
aidangarske deleted the fix/sha3-cryptocb-fallback-state branch July 20, 2026 14:52
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.

4 participants