Rust wrapper: add dilithium module#9819
Merged
JacobBarthelmeh merged 2 commits intowolfSSL:masterfrom Feb 25, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive Rust wrapper for the wolfCrypt library's ML-DSA (Dilithium) post-quantum digital signature functionality. The implementation provides safe Rust bindings for all major Dilithium operations including key generation, signing, verification, and key import/export across all three ML-DSA security levels (44, 65, and 87).
Changes:
- Added complete Dilithium module with support for key generation, signing, verification, and key management operations
- Comprehensive test suite covering all security levels and operation modes including deterministic signing, context-bound signatures, and key import/export
- Build configuration updates to detect and enable Dilithium-related features
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| wrapper/rust/wolfssl-wolfcrypt/src/dilithium.rs | Complete implementation of the Dilithium Rust wrapper with all signing, verification, and key management operations |
| wrapper/rust/wolfssl-wolfcrypt/tests/test_dilithium.rs | Comprehensive test suite covering all three security levels and operation modes |
| wrapper/rust/wolfssl-wolfcrypt/src/lib.rs | Exports the new dilithium module |
| wrapper/rust/wolfssl-wolfcrypt/headers.h | Includes the dilithium C header file |
| wrapper/rust/wolfssl-wolfcrypt/build.rs | Adds feature detection for Dilithium functionality |
| wrapper/rust/wolfssl-wolfcrypt/tests/common/mod.rs | Adds allow(dead_code) attribute to setup function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
JacobBarthelmeh
previously approved these changes
Feb 23, 2026
Contributor
|
@gasbytes this PR looks good and tests are in place but I'd like you to also look it over since more familiar with Rust. |
gasbytes
requested changes
Feb 24, 2026
Contributor
Author
|
retest this please (Finished: FAILURE) |
gasbytes
approved these changes
Feb 25, 2026
JacobBarthelmeh
approved these changes
Feb 25, 2026
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 dilithium module
Testing
Unit tests
Checklist