Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unconditional public-key copies in the Ed25519 and Ed448 wrappers overwrite imported public components, causing check_key() to accept mismatched private/public key pairs.
2 open issues
What changed in this PR
This PR adapts the Rust wolfCrypt wrapper for FIPS v6 compatibility, adding wrapper-side validation and updating tests and documentation examples for module differences.
Changes:
- Adjusts FIPS detection, RSA API availability, and read-only pointer compatibility.
- Adds Ed25519/Ed448 key-export and prehash checks, plus public-key storage handling.
- Updates RNG reseeding expectations and enables private-key access in FIPS documentation examples.
| File | Description |
|---|---|
| wrapper/rust/wolfssl-wolfcrypt/tests/test_random.rs | Adjusts reseeding expectations for FIPS v6. |
| wrapper/rust/wolfssl-wolfcrypt/src/rsa.rs | Broadens RSA-PSS verification availability. |
| wrapper/rust/wolfssl-wolfcrypt/src/random.rs | Updates the reseeding example for FIPS differences. |
| wrapper/rust/wolfssl-wolfcrypt/src/pbkdf2_password_hash.rs | Enables FIPS private-key access in the example. |
| wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs | Updates examples for FIPS private-key access. |
| wrapper/rust/wolfssl-wolfcrypt/src/mlkem_kem.rs | Updates the KEM example for FIPS private-key access. |
| wrapper/rust/wolfssl-wolfcrypt/src/mldsa.rs | Updates examples for FIPS private-key access. |
| wrapper/rust/wolfssl-wolfcrypt/src/lib.rs | Adds a pointer helper for older C signatures. |
| wrapper/rust/wolfssl-wolfcrypt/src/kdf.rs | Updates derivation examples for FIPS private-key access. |
| wrapper/rust/wolfssl-wolfcrypt/src/ed448.rs | Adds compatibility checks, key storage, and example updates. |
| wrapper/rust/wolfssl-wolfcrypt/src/ed25519.rs | Adds compatibility checks, key storage, and example updates. |
| wrapper/rust/wolfssl-wolfcrypt/src/ecc.rs | Updates examples for FIPS private-key access. |
| wrapper/rust/wolfssl-wolfcrypt/build.rs | Detects FIPS v6 and exports RSA RNG-setting availability. |
Review effort: Balanced
…n doc tests in FIPS builds
gasbytes
force-pushed
the
rust-crate-fips-v6-fixes
branch
from
November 20, 2026 15:11
93fc641 to
a3b652c
Compare
gasbytes
marked this pull request as ready for review
November 20, 2026 15:11
|
retest this please |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Makes the Rust wrapper build and pass its tests against the FIPS v6 module. The v6 module skips some key checks that newer wolfSSL does, so the Ed25519/Ed448 wrappers now do them. Tests and doc examples now account for v6 differences.
Also tested locally with v5-like modules and fips-ready.