Skip to content

Rust wrapper: add dilithium module#9819

Merged
JacobBarthelmeh merged 2 commits intowolfSSL:masterfrom
holtrop-wolfssl:rust-ml-dsa
Feb 25, 2026
Merged

Rust wrapper: add dilithium module#9819
JacobBarthelmeh merged 2 commits intowolfSSL:masterfrom
holtrop-wolfssl:rust-ml-dsa

Conversation

@holtrop-wolfssl
Copy link
Copy Markdown
Contributor

Description

Rust wrapper: add dilithium module

Testing

Unit tests

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
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.

Comment thread wrapper/rust/wolfssl-wolfcrypt/src/dilithium.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/src/dilithium.rs
@gasbytes gasbytes assigned holtrop-wolfssl and unassigned gasbytes Feb 24, 2026
@holtrop-wolfssl
Copy link
Copy Markdown
Contributor Author

retest this please (Finished: FAILURE)

@holtrop-wolfssl holtrop-wolfssl removed their assignment Feb 25, 2026
@JacobBarthelmeh JacobBarthelmeh merged commit b5b7dc8 into wolfSSL:master Feb 25, 2026
429 of 435 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants