commonware-cryptography 0.0.63

Generate keys, sign arbitrary messages, and deterministically verify signatures.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use commonware_cryptography::lthash::LtHash;
use criterion::{criterion_group, Criterion};

fn benchmark_checksum(c: &mut Criterion) {
    c.bench_function(module_path!(), |b| {
        let mut lthash = LtHash::new();
        for i in 0..100u32 {
            lthash.add(&i.to_le_bytes());
        }
        b.iter(|| lthash.checksum());
    });
}

criterion_group!(benches, benchmark_checksum);