merkle-trees-cry4

Crates.iomerkle-trees-cry4
lib.rsmerkle-trees-cry4
version0.1.1
sourcesrc
created_at2022-06-07 16:56:10.652287
updated_at2022-06-07 23:00:43.958965
descriptionImplementation of Merkle trees with one time signatures as leafs
homepage
repositoryhttps://github.com/CRY4-Hash-Based-Signatures/Merkle-Trees
max_upload_size
id601581
size25,064
(DeadViolets)

documentation

README

Merkle-Trees

Implementation of a Merkle tree using one time signatures, such as Lamport or Winternitz, as leaves

Usage

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

Benchmark

To build the benchmark file run:

cargo build --features build-binary --bin benchmark
Commit count: 9

cargo fmt