wolfssl/wrapper/rust/wolfssl-wolfcrypt
Sean Parkinson 69027c2445 LMS: fixes and improvements
Remove WC_LMS_PARM_NONE as it serves no purpose.
Change sig_len from a 16-bit value to a 32-bit value in the parameters.
Added wc_LmsKey_SetParameters_ex() and wc_LmsKey_GetParameters_ex() to
handle hash algorithm.
Change mass ForceZeros to smaller amounts with XMEMSET and setting to
NULL or default valus.
Allow signing of empty message.
Other minor fixes.

Fix API tests to work when WOLFSSL_LMS_MAX_HEIGHT/WOLFSSL_LMS_MAX_LEVELS
are/is defined.
2026-05-11 16:18:12 +10:00
..
src LMS: fixes and improvements 2026-05-11 16:18:12 +10:00
tests Rust wrapper: guard sha384 pbkdf2 unit test 2026-04-28 13:49:16 -04:00
build.rs Rust wrapper: add signature implementations 2026-04-17 15:52:07 -04:00
Cargo.lock Rust wrapper: restrict RNG generic type parameters to be integers 2026-04-28 11:08:09 -04:00
Cargo.toml Rust wrapper: restrict RNG generic type parameters to be integers 2026-04-28 11:08:09 -04:00
CHANGELOG.md Rust wrapper: wolfssl-wolfcrypt crate version 1.2.0 2026-03-13 08:08:23 -04:00
headers.h Remove liboqs for ML-KEM and ML-DSA, update for Falcon 2026-04-30 11:03:06 +02:00
Makefile Rust wrapper: add mac feature and implement digest/mac traits 2026-04-28 11:08:08 -04:00
README.md Rust wrapper: update build.rs to support cross-compiling and bare-metal targets 2026-03-20 13:25:47 -04:00

wolfssl-wolfcrypt crate

The wolfssl-wolfcrypt crate is a Rust wrapper for the wolfCrypt cryptographic algorithms portion of the wolfSSL C library.

Installation

The wolfssl C library must be installed to be used by the Rust crate.

The wolfssl-wolfcrypt crate can be used by including it as a dependency in your project's Cargo.toml file.

For example:

[dependencies]
wolfssl-wolfcrypt = "1.0"

API Coverage

This crate provides a wrapper API for the following wolfCrypt C library functionality:

  • AES
    • CBC, CCM, CFB, CTR, EAX, ECB, GCM, OFB, XTS
  • BLAKE2
  • CMAC
  • ChaCha20-Poly1305
  • Curve25519
  • DH
  • ECC
  • Ed25519
  • Ed448
  • HKDF
  • HMAC
  • LMS
  • ML-DSA
  • ML-KEM
  • PBKDF2
  • PKCS #12 PBKDF
  • PRF
  • RNG
  • RSA
  • SHA
    • SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256
  • SRTP/SRTCP KDF
  • SSH KDF
  • TLSv1.3 HKDF

Build Notes

WOLFSSL_PREFIX

If the wolfSSL C library is not installed in a default location, you can specify the installation prefix with the WOLFSSL_PREFIX environment variable when building the wolfssl-wolfcrypt crate.

For example:

WOLFSSL_PREFIX=/opt/my-wolfssl-build cargo build

Cross-Compiling

Ensure that the target you want to build for is installed for Rust. For example:

rustup target add riscv64imac-unknown-none-elf

Build with the --target option if building manually:

export WOLFSSL_PREFIX=/opt/wolfssl-riscv64
cargo build --target riscv64imac-unknown-none-elf

To specify the linker for the target:

export CARGO_TARGET_RISCV64IMAC_UNKNOWN_NONE_ELF_LINKER=riscv64-elf-gcc