| Crates.io | libsignal-dezire |
| lib.rs | libsignal-dezire |
| version | 0.1.143 |
| created_at | 2025-12-16 12:55:44.600487+00 |
| updated_at | 2026-01-19 12:37:36.640721+00 |
| description | A rust implementation of signal protocol |
| homepage | |
| repository | https://github.com/debarkamondal/libsignal-dezire |
| max_upload_size | |
| id | 1987670 |
| size | 204,610 |
A Rust implementation of the VXEdDSA signing scheme by Signal, designed for high-performance and secure cryptographic operations. This library also provides C-compatible FFI bindings for integration with other languages.
extern "C" functions for key generation and secret management, suitable for calling from C/C++, iOS (Swift), and Android (Kotlin/JNI).Add this to your Cargo.toml:
[dependencies]
libsignal-dezire = "0.1.11"
use libsignal_dezire::vxeddsa::{vxeddsa_sign, vxeddsa_verify};
use libsignal_dezire::utils::calculate_key_pair;
use rand_core::{OsRng, RngCore};
fn main() {
// 1. Generate a random private key seed
let mut seed_k = [0u8; 32];
OsRng.fill_bytes(&mut seed_k);
// 2. Define a message to sign
let message = b"Hello, VXEdDSA!";
let mut msg_bytes = [0u8; 32];
// In a real app, hash the message to 32 bytes
msg_bytes[0..message.len()].copy_from_slice(message);
// 3. Sign
let (signature, vrf_output) = vxeddsa_sign(seed_k, &msg_bytes);
// 4. Verify
// Derive public key for verification
let (_, public_point) = calculate_key_pair(seed_k);
let public_u = public_point.to_montgomery().to_bytes();
let verified_vrf = vxeddsa_verify(public_u, &msg_bytes, &signature);
assert_eq!(verified_vrf.unwrap(), vrf_output);
println!("Signature verified successfully!");
}
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the AGPL-v3 License - see the LICENSE file for details.