lamport_signature
lamport_signature_plus is an implementation of the Lamport one-time signature scheme.
Documentation
Documentation is available here.
Usage
use ;
use Sha256;
use thread_rng;
let mut signing_key = random;
let verifying_key = from;
let signature = signing_key.sign.expect;
assert!;
This crate supports any hash function that implements the Digest
trait from the digest
crate or ExtendableOutputFunction
.
The SigningKey
, VerifyingKey
, and Signature
types are generic over the hash function used.
Threshold Signatures
This crate supports threshold signing by first splitting the SigningKey
into shares and creating
SignatureShare
s from each share. The SignatureShare
s can then be combined into a Signature
using the combine
method.
use ;
use Sha256;
let mut rng = from_seed;
let = ;
let message = b"hello, world!";
let mut shares = sk.split.unwrap;
let signatures = shares
.iter_mut
.map
.;
let res = combine;
assert!;
let signature = res.unwrap;
assert!;
License
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
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 licensed as above, without any additional terms or conditions.