Skip to content

Phase 3: SHA512 integrity check and closing the final FIPS requirements gaps#10281

Open
kaleb-himes wants to merge 1 commit intowolfSSL:masterfrom
kaleb-himes:PQ-FS-2026-Part3-SecurityReview
Open

Phase 3: SHA512 integrity check and closing the final FIPS requirements gaps#10281
kaleb-himes wants to merge 1 commit intowolfSSL:masterfrom
kaleb-himes:PQ-FS-2026-Part3-SecurityReview

Conversation

@kaleb-himes
Copy link
Copy Markdown
Contributor

Description

Please describe the scope of the fix or feature addition.

Fixes zd#

Testing

How did you test?

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch 3 times, most recently from 8923ea5 to 9af5352 Compare April 22, 2026 22:51
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 22, 2026

MemBrowse Memory Report

gcc-arm-cortex-m4

  • FLASH: .rodata.CSWTCH.1 +20 B, .rodata.str1.1 +214 B, .text +64 B (+0.2%, 197,157 B / 262,144 B, total: 75% used)

gcc-arm-cortex-m4-baremetal

  • FLASH: .text +64 B (+0.1%, 64,371 B / 262,144 B, total: 25% used)

gcc-arm-cortex-m4-tls12

  • FLASH: .text +64 B (+0.1%, 120,378 B / 262,144 B, total: 46% used)
    No memory changes detected for:
  • gcc-arm-cortex-m4-min-ecc

@kaleb-himes kaleb-himes changed the title Pq fs 2026 part3 security review Phase 3: SHA512 integrity check and closing the final FIPS requirements gaps Apr 23, 2026
@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch 3 times, most recently from a43af0f to 7c0c87a Compare April 29, 2026 14:06
Copy link
Copy Markdown
Contributor

@Frauschi Frauschi left a comment

Choose a reason for hiding this comment

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

Only found one small possible memory usage optimization. Otherwise LGTM

Comment thread wolfcrypt/src/wc_slhdsa.c
* is used because SLH-DSA signatures can reach ~50 KB. */
if (ret == 0) {
static const byte pct_msg[] = "wolfSSL SLH-DSA PCT";
byte* pct_sig = (byte*)XMALLOC(WC_SLHDSA_MAX_SIG_LEN, NULL,
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.

At this point in the function, we know which parameter/variant we have. Hence, we know the exact signature length here and can therefore allocate an exact-sized signature buffer. Due to the high variance of SLH-DSA signature size, this can dramatically reduce the heap usage here.

@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch 5 times, most recently from f1d3f27 to 858c6c9 Compare April 30, 2026 23:26
….2 + 20.1 + 6.2: integrity, PCT, zeroize, CMAC/SHAKE/AES-KW CASTs, DH PCT + configurable DRBG_SHA512_SEED_LEN, ML-DSA sign privateKeyReadEnable parity, FIPS CAST benchmark deliverable, RSA 1024 removed from FIPS RsaSizeCheck, linuxkm AES-GCM tag-min 96-bit FIPS gate

6.2 (Medium): The pre-existing linuxkm relaxation of WOLFSSL_MIN_AUTH_TAG_SZ
to 4 bytes (32 bits) in wolfssl/wolfcrypt/settings.h is now gated by
#ifndef HAVE_FIPS.  FIPS-mode linuxkm builds revert to the standard 96-bit
(12-byte) minimum mandated by NIST SP 800-38D sec 5.2.1.2 / sec 8.2 and
FIPS 140-3 IG C.H.  Non-FIPS linuxkm builds retain the 32-bit-tag
relaxation for kernel crypto manager test vector compatibility.
@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch from 858c6c9 to 7e935ed Compare May 1, 2026 01:49
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.

2 participants