Rust wrapper: add password-hash, kem, mac traits; fix a few Fenrir findings#10305
Open
holtrop-wolfssl wants to merge 12 commits intowolfSSL:masterfrom
Open
Rust wrapper: add password-hash, kem, mac traits; fix a few Fenrir findings#10305holtrop-wolfssl wants to merge 12 commits intowolfSSL:masterfrom
holtrop-wolfssl wants to merge 12 commits intowolfSSL:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds RustCrypto trait support (password-hash, KEM, MAC) to the wolfCrypt Rust wrapper while addressing several static-analysis (Fenrir) findings and aligning tests/docs with API changes.
Changes:
- Add PBKDF2
password-hash(PHC) hasher/verifier support and corresponding tests. - Add ML-KEM RustCrypto
kemtrait wrappers and tests. - Add HMAC/CMAC RustCrypto
digest::Macwrappers and tests; include ECC/LMS/ML-KEM fixes and doc/test updates.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| wrapper/rust/wolfssl-wolfcrypt/src/pbkdf2_password_hash.rs | Implements password-hash traits for PBKDF2 and PHC formatting/parsing. |
| wrapper/rust/wolfssl-wolfcrypt/tests/test_pbkdf2_password_hash.rs | Adds PBKDF2 password-hash tests (roundtrip, params, algorithm variants). |
| wrapper/rust/wolfssl-wolfcrypt/src/mlkem_kem.rs | Adds RustCrypto kem trait wrappers for ML-KEM. |
| wrapper/rust/wolfssl-wolfcrypt/tests/test_mlkem_kem.rs | Adds ML-KEM KEM trait tests (roundtrip, export/import, rejection). |
| wrapper/rust/wolfssl-wolfcrypt/src/hmac_mac.rs | Adds RustCrypto digest::Mac trait wrappers for HMAC variants. |
| wrapper/rust/wolfssl-wolfcrypt/tests/test_hmac_mac.rs | Adds HMAC MAC-trait vector and behavior tests. |
| wrapper/rust/wolfssl-wolfcrypt/src/cmac_mac.rs | Adds RustCrypto digest::Mac trait wrappers for AES-CMAC. |
| wrapper/rust/wolfssl-wolfcrypt/tests/test_cmac_mac.rs | Adds CMAC MAC-trait tests including wrong key size. |
| wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs | Changes ML-KEM encode APIs to return Result<(), i32> and updates docs. |
| wrapper/rust/wolfssl-wolfcrypt/tests/test_mlkem.rs | Updates ML-KEM tests for new encode API return type. |
| wrapper/rust/wolfssl-wolfcrypt/src/lms.rs | Renames signature-availability API to has_sigs_left and updates docs. |
| wrapper/rust/wolfssl-wolfcrypt/tests/test_lms.rs | Updates tests for has_sigs_left rename. |
| wrapper/rust/wolfssl-wolfcrypt/src/ecc.rs | Adds NUL-termination validation and adjusts return-value handling. |
| wrapper/rust/wolfssl-wolfcrypt/tests/test_ecc.rs | Adds test coverage for rs_hex_to_sig NUL-termination behavior. |
| wrapper/rust/wolfssl-wolfcrypt/src/lib.rs | Exposes new modules behind feature/cfg gates. |
| wrapper/rust/wolfssl-wolfcrypt/Cargo.toml | Adds new features/deps for mac, password-hash, kem, hybrid-array. |
| wrapper/rust/wolfssl-wolfcrypt/Makefile | Enables new features in the default feature list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
74ea82c to
110408a
Compare
…_key() Fixes F-3093
ff42006 to
1e35f94
Compare
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.
Description
Rust wrapper: add password-hash, kem, mac traits; fix a few Fenrir findings
Testing
Unit/CI tests
Checklist