leslie_lamport

Crates.ioleslie_lamport
lib.rsleslie_lamport
version0.3.1
sourcesrc
created_at2019-10-19 20:47:45.869454
updated_at2021-01-11 04:09:27.347276
descriptionA Post-Quantum Cryptographic Library For Lamport Signatures
homepage
repositoryhttps://github.com/0xAtropine/Leslie-Lamport
max_upload_size
id174043
size63,348
AtropineTears (AtropineTears)

documentation

README

Leslie_Lamport

Crates.io Crates.io

A Library For The Post-Quantum Digital Signature Scheme Lamport Signatures created by Leslie Lamport in 1979.

Read About Lamport Signatures

How To Generate Keys

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);
}

How To Sign

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)
}

License

Licensed under:

  • Apache License, Version 2.0

Contribution

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.

Commit count: 29

cargo fmt