Skip to content

Replace V523_NONFIPS_SHAKE path reference to shake.c/h - #11900

Merged
philljj merged 2 commits into
wolfSSL:masterfrom
rlm2002:fipsV5customSHAKEPQ
Oct 28, 2026
Merged

philljj merged 2 commits into
wolfSSL:masterfrom
rlm2002:fipsV5customSHAKEPQ

Conversation

@rlm2002

@rlm2002 rlm2002 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Description

PR #11831 added an opt-in V523_NONFIPS_SHAKE to enable SHAKE 128/256 algorithms. The path to the new files was incorrect.

Replace path to fips/v5.2.3-custom-shake-pq/<shake.c/h> to reference wolfcrypt/src/shake.c and wolfssl/wolfcrypt/shake.h. Removes reference to fips/ which is not included in release process.

Also fixes error message for V523_NONFIPS_SHAKE to reference v5.2.3 and correct cert.

Testing

./configure --enable-fips=v5 --enable-mlkem --enable-mldsa CFLAGS=-DV523_NONFIPS_SHAKE
make
./fips-hash.sh  
make
./wolfcrypt/test/testwolfcrypt 

@rlm2002 rlm2002 self-assigned this Oct 26, 2026
Copilot AI balanced review requested due to automatic review settings October 26, 2026 23:21

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.

🔵 Needs a closer look

The intended FIPS target needs maintainer confirmation because the diagnostic and eligibility checks specify different versions.

1 open issue
What changed in this PR

Updates the V523_NONFIPS_SHAKE integration introduced in #11831 to use standard wolfSSL paths instead of the internal fips/ directory, which is omitted from releases.

Changes:

  • Updates SHAKE header references across library code, tests, and benchmarks.
  • Adjusts configure checks and Automake build/install paths.
  • Revises the prerequisite diagnostic to name FIPS 5.2.3 and certificate #5548.
File Description
wolfssl/​wolfcrypt/​wc_mlkem.h Updates the SHAKE include while preserving include order.
wolfssl/​wolfcrypt/​wc_mldsa.h Uses the standard SHAKE header path.
wolfssl/​wolfcrypt/​settings.h Revises the FIPS prerequisite diagnostic.
wolfssl/​wolfcrypt/​include.am Updates the SHAKE header installation path.
wolfcrypt/​test/​test.c Updates the self-test SHAKE include.
wolfcrypt/​src/​wc_mldsa.c Updates the ML-DSA SHAKE include.
wolfcrypt/​src/​hash.c Updates the hashing SHAKE include.
wolfcrypt/​src/​asn.c Updates the ASN.1 SHAKE include.
wolfcrypt/​benchmark/​benchmark.c Updates the benchmark SHAKE include.
tests/​api/​test_sha3.c Updates the API-test SHAKE include.
src/​include.am Builds SHAKE from wolfcrypt/src/shake.c.
configure.ac Checks the new overlay paths and updates related guidance.

Review effort: Balanced

Comment thread wolfssl/wolfcrypt/settings.h Outdated
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

@rlm2002
rlm2002 force-pushed the fipsV5customSHAKEPQ branch from 9598dc9 to 7052b51 Compare October 27, 2026 15:39
@rlm2002 rlm2002 assigned wolfSSL-Bot and unassigned rlm2002 Oct 27, 2026
@rlm2002
rlm2002 force-pushed the fipsV5customSHAKEPQ branch from 7052b51 to 9c827f6 Compare October 27, 2026 18:48
lealem47
lealem47 previously approved these changes Oct 27, 2026

@lealem47 lealem47 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.

Thanks Ruby!

@philljj philljj self-assigned this Oct 28, 2026
Comment thread wolfssl/wolfcrypt/wc_mldsa.h
Comment thread configure.ac
@philljj philljj assigned rlm2002 and unassigned wolfSSL-Bot Oct 28, 2026
Reference shake.c/h via wolfcrypt/src/ and wolfssl/wolfcrypt/ instead
of fips/, which isn't included in FIPS bundles. Use Cert wolfSSL#5548,
v5.2.3 in the error message.

Also fix the FIPS version guard to error only when there is no FIPS
cert or the cert is <v5.0.0 or >=v6.0.0, not for valid v5.x certs.
Generalize the macro name since the version check already accepts
any v5.x cert. Also drop the autotools gate's minor/patch checks so
it matches the broader settings.h guard.
@philljj

philljj commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Tests good with multi-test with various fips, linuxkm, etc scenarios.

@philljj

philljj commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Retest this please.

(fips windows test was disrupted)

@philljj
philljj merged commit c86f2b6 into wolfSSL:master Oct 28, 2026
432 checks passed
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.

5 participants