Skip to content

random: add wc_InitRngFixedSeed() for FIPS known-answer tests - #11452

Open
kaleb-himes wants to merge 1 commit into
wolfSSL:masterfrom
kaleb-himes:PQ-FS-2026-Part3-SecurityReview-nofallback-S
Open

random: add wc_InitRngFixedSeed() for FIPS known-answer tests#11452
kaleb-himes wants to merge 1 commit into
wolfSSL:masterfrom
kaleb-himes:PQ-FS-2026-Part3-SecurityReview-nofallback-S

Conversation

@kaleb-himes

Copy link
Copy Markdown
Contributor

Description

The CAST tests in the FIPS module have historically used real entropy in their tests. To be a true "Known Answer Test" they need to use a fixed seed instead of a random one. This PR adds a non-public API (internal only) and since the module owns every call site to _InitRng we control which API's pass an explicit NULL, 0 for the new input parameters and only one API (non-public by design) actually passes a fixed seed ever.

Testing

With modified versions of the CASTs in fips_test.c to pass a static seed vs a random seed.

Checklist

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

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11452

Scan targets checked: none
Failed targets: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs

⚠️ Review incomplete — one or more scan targets failed before findings could be produced. See the Fenrir PR review detail page for logs.

@kaleb-himes

Copy link
Copy Markdown
Contributor Author

@wolfSSL-Fenrir-bot review force

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