Crates.io | merkle-trees-cry4 |
lib.rs | merkle-trees-cry4 |
version | 0.1.1 |
source | src |
created_at | 2022-06-07 16:56:10.652287 |
updated_at | 2022-06-07 23:00:43.958965 |
description | Implementation of Merkle trees with one time signatures as leafs |
homepage | |
repository | https://github.com/CRY4-Hash-Based-Signatures/Merkle-Trees |
max_upload_size | |
id | 601581 |
size | 25,064 |
Implementation of a Merkle tree using one time signatures, such as Lamport or Winternitz, as leaves
use sha2::Sha256;
use merkle_trees_cry4::{OneTimeScheme, MerkleSecretKey, MerklePublicKey};
let message = b"Hi There!";
let mut sk = MerkleSecretKey::<Sha256>::new(128, OneTimeScheme::Lamport).unwrap();
let pk = MerklePublicKey::<Sha256>::new(&sk);
let leaf_index = 66;
let sig = sk.sign_arbitrary(message, leaf_index).unwrap();
pk.verify_arbitrary(message, &sig).unwrap();
To build the benchmark file run:
cargo build --features build-binary --bin benchmark