Skip to content

Rust wrapper: add mlkem module#9833

Merged
douzzer merged 4 commits intowolfSSL:masterfrom
holtrop-wolfssl:rust-ml-kem
Mar 5, 2026
Merged

Rust wrapper: add mlkem module#9833
douzzer merged 4 commits intowolfSSL:masterfrom
holtrop-wolfssl:rust-ml-kem

Conversation

@holtrop-wolfssl
Copy link
Copy Markdown
Contributor

Description

Rust wrapper: add mlkem module

Testing

Unit tests

Checklist

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

@holtrop-wolfssl holtrop-wolfssl self-assigned this Feb 25, 2026
@holtrop-wolfssl
Copy link
Copy Markdown
Contributor Author

retest this please (ERROR: wolfSSL » PRB-140-3-tests #8576 was deleted)

@holtrop-wolfssl holtrop-wolfssl marked this pull request as ready for review February 26, 2026 13:24
Comment thread wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs
@holtrop-wolfssl
Copy link
Copy Markdown
Contributor Author

retest this please (build removed)

gasbytes
gasbytes previously approved these changes Feb 27, 2026
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

Adds an ML-KEM (post-quantum KEM) Rust wrapper module to the wolfCrypt Rust bindings, along with CI enablement and unit tests.

Changes:

  • Introduces mlkem Rust module wrapping wolfCrypt ML-KEM key lifecycle and operations (generate/encap/decap/encode/decode).
  • Adds ML-KEM unit tests covering constants, size queries, deterministic APIs, and encap/decap flows.
  • Extends bindings/CI to expose and build ML-KEM (headers.h, build.rs cfg scan, GitHub workflow).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs New ML-KEM wrapper API (key management + KEM operations)
wrapper/rust/wolfssl-wolfcrypt/tests/test_mlkem.rs New unit tests for ML-KEM wrapper behavior
wrapper/rust/wolfssl-wolfcrypt/src/lib.rs Exposes the new mlkem module from the crate
wrapper/rust/wolfssl-wolfcrypt/headers.h Adds wolfcrypt/mlkem.h to bindings header set
wrapper/rust/wolfssl-wolfcrypt/build.rs Enables cfg(mlkem) detection in build-time symbol scan
.github/workflows/rust-wrapper.yml Adds a CI matrix entry building wolfSSL with --enable-mlkem

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/build.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs
Comment thread wrapper/rust/wolfssl-wolfcrypt/src/mlkem.rs
@holtrop-wolfssl
Copy link
Copy Markdown
Contributor Author

retest this please (Failed make check with enable all + openssl all)

@holtrop-wolfssl holtrop-wolfssl marked this pull request as ready for review March 2, 2026 14:38
@gasbytes gasbytes self-requested a review March 3, 2026 18:54
@douzzer douzzer added the Staged Staged for merge pending final test results and review label Mar 5, 2026
@douzzer douzzer merged commit fc677d7 into wolfSSL:master Mar 5, 2026
426 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Staged Staged for merge pending final test results and review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants