Skip to content

v1.0.11

Choose a tag to compare

@cabelo cabelo released this 07 Sep 03:17
· 18 commits to main since this release
221d67b

What's Changed

Rust Support

This release introduces Rust support for libzupt, allowing Rust applications to use libzupt's cryptographic features through safe and ergonomic Rust APIs.

The integration uses libzupt's existing C/C++ API through FFI, with bindings automatically generated at build time using bindgen.

Highlights

  • Added Rust bindings for the libzupt C/C++ API
  • Added a safe Rust wrapper with Result<T, ZuptError> error handling
  • Automatic FFI binding generation using bindgen
  • Support for both shared (libzupt.so) and static (libzupt_static.a) linking
  • Added automated build script for libzupt + Rust examples
  • Added complete Rust examples demonstrating the main cryptographic operations

Cryptographic Features Available from Rust

Rust applications can now access:

  • Hybrid ML-KEM + X25519 key management
  • Hybrid public/private key generation
  • Public key extraction
  • Key pair save/load operations
  • In-memory encryption and decryption
  • File encryption and decryption
  • Cryptographically secure random byte generation
  • SHA-256 hashing
  • SHA3-512 hashing
  • Secure memory wiping
  • Secure buffers with automatic memory zeroization

SecureBuffer

A new Rust SecureBuffer abstraction provides safer handling of sensitive information in memory.

Sensitive data can be manually zeroized and is also automatically wiped when the buffer is dropped, helping reduce the risk of cryptographic material remaining in process memory.

New Rust Examples

Five complete examples are now available:

  • example_basic — in-memory encryption/decryption and wrong-key rejection
  • example_file — file encryption and decryption
  • example_keygen — key generation, persistence, loading, and public-key export
  • example_random — secure random generation, SHA-256, SHA3-512, and key derivation
  • example_secure_buffer — secure handling and automatic zeroization of sensitive memory

Build

Rust examples can be built with:

cd examples_rust
./build.sh

or directly with Cargo:

cargo build --release

Individual examples can be executed with:

cargo run --release --example example_basic

🚀 Why It Matters

libzupt can now be integrated directly into the growing Rust ecosystem while preserving the existing high-performance cryptographic implementation.

This makes it easier to build applications, services, security tools, edge software, and infrastructure in Rust using libzupt's hybrid post-quantum cryptography.

Rust + Post-Quantum Cryptography + libzupt.