Rust wrapper: add wolfssl::wolfcrypt::kdf, wolfssl::wolfcrypt::prf#9336
Merged
JacobBarthelmeh merged 3 commits intowolfSSL:masterfrom Oct 24, 2025
Merged
Rust wrapper: add wolfssl::wolfcrypt::kdf, wolfssl::wolfcrypt::prf#9336JacobBarthelmeh merged 3 commits intowolfSSL:masterfrom
JacobBarthelmeh merged 3 commits intowolfSSL:masterfrom
Conversation
holtrop
commented
Oct 23, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds Rust wrapper modules for wolfCrypt's Key Derivation Function (KDF) and Pseudo Random Function (PRF) capabilities. The changes include new public API modules, test coverage, and refactoring of existing code to use consistent core::ptr::null* instead of std::ptr::null*.
- Adds
wolfssl::wolfcrypt::kdfmodule with TLS 1.3 HKDF and SSH KDF functions - Adds
wolfssl::wolfcrypt::prfmodule for PRF operations with various hash algorithms - Standardizes null pointer usage across the codebase to use
core::ptrfor better no_std compatibility
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wrapper/rust/wolfssl/src/wolfcrypt/kdf.rs | New module implementing TLS 1.3 HKDF extract/expand and SSH KDF wrappers |
| wrapper/rust/wolfssl/src/wolfcrypt/prf.rs | New module implementing PRF wrapper with support for multiple hash algorithms |
| wrapper/rust/wolfssl/tests/test_kdf.rs | Test cases for TLS 1.3 HKDF and SSH KDF functions |
| wrapper/rust/wolfssl/tests/test_prf.rs | Test case for PRF with SHA-384 |
| wrapper/rust/wolfssl/src/wolfcrypt.rs | Exports the new kdf and prf modules |
| wrapper/rust/include.am | Adds new source and test files to build system |
| wrapper/rust/wolfssl/tests/test_hmac.rs | Updates to use SHA256::DIGEST_SIZE constant instead of raw FFI constant |
| wrapper/rust/wolfssl/tests/test_hkdf.rs | Updates to use SHA256::DIGEST_SIZE constant instead of raw FFI constant |
| wrapper/rust/wolfssl/src/wolfcrypt/hkdf.rs | Updates documentation examples to use SHA256::DIGEST_SIZE |
| wrapper/rust/wolfssl/src/wolfcrypt/sha.rs | Standardizes to use core::ptr::null_mut() |
| wrapper/rust/wolfssl/src/wolfcrypt/rsa.rs | Standardizes to use core::ptr::null_mut() |
| wrapper/rust/wolfssl/src/wolfcrypt/ecc.rs | Standardizes to use core::ptr::null_mut() |
| wrapper/rust/wolfssl/src/wolfcrypt/dh.rs | Standardizes to use core::ptr::null() |
| wrapper/rust/wolfssl/src/wolfcrypt/aes.rs | Standardizes to use core::ptr::null() and core::ptr::null_mut() |
| doc/dox_comments/header_files/hmac.h | Corrects documentation comment for wc_Tls13_HKDF_Expand_Label |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
JacobBarthelmeh
approved these changes
Oct 24, 2025
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 wolfssl::wolfcrypt::kdf, wolfssl::wolfcrypt::prf
Testing
How did you test?
Checklist