Merged
Conversation
Contributor
Author
|
Jenkins retest this please |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves ML-KEM (Kyber) build/test compatibility under stricter conversion-warning builds and RNG-less configurations by tightening type conversions, adding an ML-KEM configure variant, and adapting tests to run without WC_RNG.
Changes:
- Add
--enable-mlkemcoverage (includingsmalland newno-large-codevariants) to thewolfCrypt-WconversionCI workflow. - Update ML-KEM implementation code with explicit casts/guards to address
-Wconversion-family warnings and addWC_NO_RNGcompile-time handling for RNG-dependent APIs. - Update
mlkem_test()to supportWC_NO_RNGby using deterministic “with random” APIs and fixed test vectors.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
wolfcrypt/test/test.c |
Makes mlkem_test() work when WC_NO_RNG is set by using fixed randomness and *WithRandom APIs. |
wolfcrypt/src/wc_mlkem.c |
Adds WC_NO_RNG guards for RNG-dependent entry points; adds explicit casts to reduce conversion warnings. |
wolfcrypt/src/wc_mlkem_poly.c |
Adds explicit casts and type adjustments to address conversion warnings in polynomial/matrix code paths. |
configure.ac |
Extends --enable-mlkem= comma-options with no-large-code to define WOLFSSL_MLKEM_NO_LARGE_CODE. |
.github/workflows/wolfCrypt-Wconversion.yml |
Expands the conversion-warning CI matrix to include ML-KEM build permutations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
* fix -Wconversion warnings * allow APIs without RNG usage in case WC_NO_RNG is defined
8ce6d9d to
3b4e51c
Compare
Contributor
Author
|
The Copilot issue is fixed now |
SparkiDev
approved these changes
Mar 16, 2026
douzzer
approved these changes
Mar 16, 2026
Contributor
douzzer
left a comment
There was a problem hiding this comment.
tested with
wolfssl-multi-test.sh ...
'.*all.*Wconversion.*'
'quantum-safe.*clang-tidy.*'
linuxkm-defaults-all-quantum-safe-fips-dev-clang-tidy
linuxkm-defaults-all-quantum-safe-fips-dev-noasm-clang-tidy
with --enable-mlkem added to '.*all.*Wconversion.*' scenarios.
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.
Extracted from #9732:
These changes have already been reviewed and approved by @SparkiDev as part of #9732.