Crates.io | leslie_lamport |
lib.rs | leslie_lamport |
version | 0.3.1 |
source | src |
created_at | 2019-10-19 20:47:45.869454 |
updated_at | 2021-01-11 04:09:27.347276 |
description | A Post-Quantum Cryptographic Library For Lamport Signatures |
homepage | |
repository | https://github.com/0xAtropine/Leslie-Lamport |
max_upload_size | |
id | 174043 |
size | 63,348 |
A Library For The Post-Quantum Digital Signature Scheme Lamport Signatures created by Leslie Lamport in 1979.
use leslie_lamport::{LamportKeyPair,LamportSignature,Algorithms};
fn main(){
// Generate Keypair using Operating System SHA256
let keypair = LamportKeyPair::generate(Algorithms::OS_SHA256);
// Generate Keypair using Operating System SHA512
let keypair_sha512 = LamportKeyPair::generate(Algorithms::OS_SHA512);
// Generate Keypair using Rust Library For Blake2b
let keypair_blake2b = LamportKeyPair::generate(Algorithms::BLAKE2B);
}
use leslie_lamport::{LamportKeyPair,LamportSignature,Algorithms};
fn main(){
// Generate Keypair
let keypair = LamportKeyPair::generate(Algorithms::OS_SHA256);
// Generate Signature For 512 bit input
let sig = keypair.sign("b7dba1bc67c531bffb14fbd7f6948540dba10981765a0538575bed2b6bf553d43f35c287635ef7c4cb2c379f71218edaf70d5d73844910684103b99916e428c2");
// Check If It Is Verified
let is_verified: bool = sig.verify();
// Print Verification
println!("Is Verified: {}",is_verified)
}
Licensed under:
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.