Repository navigation
Pq fs 2026 part4 fenrir v7 indicator - #12057
JacobBarthelmeh merged 4 commits into
Conversation
|
2812c33 to
1836dd2
Compare
1836dd2 to
49faba6
Compare
Fenrir's latest completed scan found no issues; clearing the prior automated change request.
49faba6 to
036087d
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The FIPS v7 indicator and curve-policy contracts depend on inaccessible companion wolfSSL/fips#424, requiring a maintainer with module access to confirm those contracts and the reported paired-module validation.
No open issues 🎉
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12057
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-bugs
Coverage: 3 of 4 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_pwdbased.c
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
Description
wolfSSL half of the FIPS v7 service-indicator and curve-policy fixes in wolfSSL/fips#424. Code outside the module now handles the new indicator, and the tests expect the v7 module's behavior. There are no Jenkins tests for the v7 module yet so these should be fine to merge ahead of fips PR #424. The new checks build only for FIPS v7 with the indicator (
FIPS_VERSION3_GE(7,0,0) && WC_HAVE_FIPS_INDICATOR && !FIPS_NO_WRAPPERS), so other builds are unchanged apart from the PBES2 default salt.Fenrir findings addressed (the module fix for each is in wolfSSL/fips#424):
pbkdf2: 16-byte PBES2 default salt; callers accept the v7 short-salt indicator. When the caller passes no salt,wc_EncryptPKCS8Key_exnow uses 16 bytes (PKCS5V2_SALT_SZ) for PBES2; PBES1 keeps 8.wc_CryptKeyandwolfSSL_PKCS5_PBKDF2_HMACacceptWC_FIPS_NOT_APPROVEDbecause the key has been derived.wc_EncryptPKCS8Key_exnow returnsBUFFER_Ebefore writing if*outSzis too small, since the longer salt grows the output by 8 bytes. The expected sizes intest_wolfSSL_PKCS8_d2ichange from 1834 to 1846 and from 379 to 391.tests: expect the FIPS v7 ECDH curve refusal (from wolfssl#11359). On P-224 the test records the ECDH refusal and skips only the three ECDH steps. Export/import, compressed keys, sign/verify and private export still run on P-224, which the module allows. The ecc.c side of 15971 is in #12058.tests: expect the FIPS v7 indicator for a caller-set ECDSA k (wolfssl#11359). The test expects the non-approved indicator on that path.wc_HmacSizeByTypereturnedHMAC_KAT_FIPS_Efor an unsupported typetests: expect BAD_FUNC_ARG from wc_HmacSizeByType on FIPS v7The ECDH and caller-set k tests are based on the test changes in wolfSSL/wolfssl #11359.
PR 12057 now clears the PBKDF2 indicator only for salts under 16 bytes; any other indicator fails. New tests and negative controls pass on FIPS v7 with fips#424 and on non-FIPS builds.
Testing
FIPS v7 with wolfSSL/fips#424 (32eb789d):
testwolfcryptpasses andmake checkis 6/6.Negative controls. Each one breaks the code on purpose and checks that the new test fails:
*outSzcheck removed fromasn.cBUFFER_Erow fails: 136 returnedPKCS#8 salt and buffer check, before and after:
BUFFER_E, buffer untouchedBUFFER_E, buffer untouchedOther configurations (
make check):--enable-all--enable-all+ smallstack--enable-all+ asyncNO_PBKDF2configuration-DWOLFSSL_ENTERPRISE=yes(ctest)Checklist