Skip to content

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

Open
kaleb-himes wants to merge 1 commit into
wolfSSL: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 into
wolfSSL:masterfrom
kaleb-himes:PQ-FS-2026-Part3-SecurityReview

Conversation

@kaleb-himes

@kaleb-himes kaleb-himes commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Description

This PR is 6 major items as follows:

  1. What got missed from the FIPS standards - fix
  2. Add a new CAST benchmark app so one can see how long the power up tests take
  3. Classic DH is leaving the FIPS module in it's entirety (No more FFDHE)
  4. Get AESNI working in 32-bit linux kernel space
  5. Get ARM 32 (Neon) working in 32-bit linux kernel space
  6. Get ARM 64 (ARMv8) working in 64-bit linux kernel space (edited)

Testing

<head></head>
OE | Arch / Space | C1 | C2 | C3
-- | -- | -- | -- | --
U3 | x86_64 Intel · user | ✅ | ✅ | ✅
U5 | x86_64 AMD · user | ✅ | ✅ | ✅
U1 | i386 Intel · user | ✅ | ✅ | ✅ AES-NI
U7 | ARM64 · user | — | — | ✅ armasm
U6 | ARM32 · user | — | — | ✅ armasm
U4 | x86_64 Windows · MSVC | ✅ | ✅ | ✅ AES-NI
U2 | i386 Windows · MSVC | ✅ | ✅ | ⚪ NA
K1 | i386 · kernel | ✅ | ✅ | ✅ AES-NI
K2 | x86_64 Intel · kernel | ✅ | ✅ | ✅
K3 | x86_64 AMD · kernel | ✅ | ✅ | ✅
K4 | ARM32 · kernel | ✅ | ✅ | ✅ armasm
K5 | ARM64 · kernel | ✅ | ✅ | ✅ armasm

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

github-actions Bot commented Apr 22, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m3

  • FLASH: .text +32 B (+0.0%, 121,441 B / 262,144 B, total: 46% used)

gcc-arm-cortex-m4

  • FLASH: .rodata.CSWTCH.1 +20 B, .rodata.str1.1 +214 B, .text +64 B (+0.1%, 199,350 B / 262,144 B, total: 76% used)

gcc-arm-cortex-m4-baremetal

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

gcc-arm-cortex-m4-crypto-only

  • FLASH: .rodata.CSWTCH.1 +20 B, .rodata.str1.1 +214 B (+0.1%, 173,908 B / 262,144 B, total: 66% used)

gcc-arm-cortex-m4-dtls13

  • FLASH: .text +64 B (+0.0%, 179,864 B / 1,048,576 B, total: 17% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .rodata +232 B, .text +64 B (+0.0%, 768,428 B / 1,048,576 B, total: 73% used)

gcc-arm-cortex-m4-pkcs7

  • FLASH: .rodata.CSWTCH.1 +20 B, .rodata.str1.1 +214 B, .text +64 B (+0.1%, 211,671 B / 262,144 B, total: 81% used)

gcc-arm-cortex-m4-pq

  • FLASH: .rodata +236 B, .text +192 B (+0.2%, 278,364 B / 1,048,576 B, total: 27% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .rodata +232 B, .text +64 B (+0.1%, 323,768 B / 1,048,576 B, total: 31% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .rodata.CSWTCH.1 +20 B, .rodata.str1.1 +214 B (+0.1%, 234,984 B / 262,144 B, total: 90% used)

gcc-arm-cortex-m7

  • FLASH: .rodata.CSWTCH.1 +20 B, .rodata.str1.1 +214 B (+0.1%, 199,286 B / 262,144 B, total: 76% used)

gcc-arm-cortex-m7-pq

  • FLASH: .rodata +236 B, .text +192 B (+0.2%, 278,940 B / 1,048,576 B, total: 27% used)

gcc-arm-cortex-m7-tls13

  • FLASH: .rodata.CSWTCH.1 +20 B, .rodata.str1.1 +214 B, .text +64 B (+0.1%, 235,048 B / 262,144 B, total: 90% used)

linuxkm-pie

  • Data: __patchable_function_entries +8 B (+0.0%, 24,296 B)

stm32-sim-stm32h753

@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

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

Only found one small possible memory usage optimization. Otherwise LGTM

Comment thread wolfcrypt/src/wc_slhdsa.c Outdated
@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch 9 times, most recently from e3f56b8 to 29c714f Compare May 1, 2026 20:03
@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch 4 times, most recently from b883766 to a6681e2 Compare May 27, 2026 22:14
@kaleb-himes

kaleb-himes commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

retest this please.

@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch from a6681e2 to 588e7a0 Compare June 8, 2026 15:46
@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch 3 times, most recently from 57ef11a to 064812c Compare June 22, 2026 22:24
@kaleb-himes kaleb-himes requested a review from Frauschi June 22, 2026 22:25
@kaleb-himes kaleb-himes dismissed Frauschi’s stale review June 22, 2026 22:26

Fixed noted items, dismissing review for a re-review.

@kaleb-himes kaleb-himes requested review from SparkiDev and douzzer June 22, 2026 22:32
@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch from 064812c to 0ff60a7 Compare June 23, 2026 22:37
@kaleb-himes

Copy link
Copy Markdown
Contributor Author

NOTE: The following error is expected until both the FIPS PR and this one are merged since fips.c won't have the new integrity check size (SHA512) till both PR's are merged. We should coordinate the merging of both during a lul period to be least disruptive.

make -j17  check-recursive
make[1]: Entering directory '/extend/var/lib/jenkins/workspace/PRB-fips-ready-config/wolfssl-fips'
make[2]: Entering directory '/extend/var/lib/jenkins/workspace/PRB-fips-ready-config/wolfssl-fips'
make[2]: warning: -j17 forced in submake: resetting jobserver mode.
  CC       wolfcrypt/src/src_libwolfssl_la-fips_test.lo
In file included from ./wolfssl/wolfcrypt/libwolfssl_sources.h:46,
                 from wolfcrypt/src/fips_test.c:22:
./wolfssl/wolfcrypt/types.h:2231:40: error: static assertion failed: "sizeof(verifyCore) == WC_SHA256_DIGEST_SIZE*2 + 1"
 2231 |         #define wc_static_assert(expr) _Static_assert(expr, #expr)
      |                                        ^~~~~~~~~~~~~~
wolfcrypt/src/fips_test.c:4414:1: note: in expansion of macro ‘wc_static_assert’
 4414 | wc_static_assert(sizeof(verifyCore) == WC_SHA256_DIGEST_SIZE*2 + 1);
      | ^~~~~~~~~~~~~~~~
cc1: error: unrecognized command line option ‘-Wno-deprecated-enum-enum-conversion’ [-Werror]
cc1: all warnings being treated as errors
make[2]: *** [Makefile:9303: wolfcrypt/src/src_libwolfssl_la-fips_test.lo] Error 1
make[2]: Leaving directory '/extend/var/lib/jenkins/workspace/PRB-fips-ready-config/wolfssl-fips'
make[1]: *** [Makefile:12363: check-recursive] Error 1
make[1]: Leaving directory '/extend/var/lib/jenkins/workspace/PRB-fips-ready-config/wolfssl-fips'
make: *** [Makefile:12832: check] Error 2

@kaleb-himes kaleb-himes marked this pull request as draft June 25, 2026 20:17
@kaleb-himes kaleb-himes marked this pull request as ready for review June 25, 2026 20:25
@github-actions

Copy link
Copy Markdown

retest this please

@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch 2 times, most recently from c2865ff to 47cc4fe Compare June 29, 2026 16:49
@kaleb-himes kaleb-himes force-pushed the PQ-FS-2026-Part3-SecurityReview branch from 47cc4fe to b7507f2 Compare June 29, 2026 17:44
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