Home

Awesome

Poseidon Merkle Tree

Build Status Repository Documentation

Reference implementation for the Poseidon Merkle function.

The Poseidon structure will accept a number of inputs equal to the arity of the tree.

Build

A few environment variables will be read in the build process.

Example

use dusk_poseidon_merkle::{MERKLE_ARITY, Poseidon, Scalar};

let mut h = Poseidon::default();
for i in 0..MERKLE_ARITY {
    h.push(Scalar::from(i as u64)).unwrap();
}

let hash = h.hash();
println!("{:x?}", hash.as_bytes());

Reference

Starkad and Poseidon: New Hash Functions for Zero Knowledge Proof Systems