mldsa-native-rs
This crate is EXPERIMENTAL. Use at your own peril. (i.e., DON'T!)
FFI bindings and an optional Rust wrapper for the
mldsa-native library.
Repository
The git repository for this project uses git submodules.
When cloning, we recommend to use:
Alternatively, you might need to run
to ensure submodules are fetched and updated before being able to build from source.
Features flags
wrapper: include awrappermodule that provides Rust types, traits, and wrapper functions around the FFI items.rand: include keygen and signing functions in the wrapper that generate their own random data using therandcrate.extern-C-randombytes: (disabled by default) if enabled exports a default implementation of therandombytesfunction required by the backend implementation.native(opt-in): builds the optimized backend frommldsa-nativeinstead of its portable implementation. When enabled, this crate'sbuild.rsautodetects the target's capabilities and passes a corresponding set of defines tomldsa-native, which is compiled as part of the build. What those defines compile to on a given target is determined bymldsa-native, not by this crate. For many targets this produces an optimized build; for some, the detected define combination may fall back to the portable implementation or fail to compile. This crate makes no guarantees beyond those ofmldsa-native. If the build fails, disable this feature to use the portable implementation.built_info: (opt-in) include abuilt_infomodule exposing build-time metadata via the [built][crate:built] crate. Provides aBuiltInfostruct with the package name and version, target/host triples, build profile,rustcversion, enabled features, and git metadata (commit hash, HEAD ref, and dirty state) when built from a git repository. When thenativefeature is also enabled,BuiltInfoadditionally reports the detected runtime CPU capabilities.