Liminal Arkworks Poseidon
This package contains two crates: a library exposing arkworks-based Poseidon hashing and a binary for regenerating parameters. Parameters are generated using https://github.com/penumbra-zone/poseidon377.
Library usage
The lib crate liminal-ark-poseidon provides two modules:
hashmodule that exposes<x>_to_one_hashmethod family for hashing raw field elementscircuitmodule that exposes<x>_to_one_hashmethod family for hashing circuit field elements; it is available only undercircuitfeature flag
Currently, <x> is one, two and four, i.e. we support 1:1, 2:1 and 4:1 hashing.
Example usage:
Binary usage
If you need fresh parameters, you can regenerate parameters module by running:
cargo run --release --features paramgen
You can also manipulate security level with SECURITY_LEVEL env variable.