Crates.io | lamport_signature |
lib.rs | lamport_signature |
version | 0.1.4 |
source | src |
created_at | 2018-05-28 06:07:44.811396 |
updated_at | 2018-05-31 02:04:10.148736 |
description | A Rust implementation of the Lamport one-time signature scheme. |
homepage | |
repository | https://github.com/moriturus/lamport_signature |
max_upload_size | |
id | 67414 |
size | 74,753 |
lamport_signature
lamport_signature is a Rust implementation of the Lamport one-time signature scheme.
Documentation is available here.
extern crate lamport_signature;
extern crate sha2;
extern crate rand;
use lamport_signature::{PublicKey, PrivateKey, generate_keys};
use sha2::Sha256;
use rand::thread_rng;
let mut rng = thread_rng();
let (mut private_key, public_key) = generate_keys::<Sha256, _>(&mut rng);
let signature = private_key.sign(b"Hello, World!").expect("signing failed");
assert!(public_key.verify(&signature, b"Hello, World!"));
Please report bugs either as pull requests or as issues in the issue tracker. lamport_signature has a full disclosure vulnerability policy. Please do NOT attempt to report any security vulnerability in this code privately to anybody.