Expand description
Poseidon2 permutation methods, based on eprint.iacr.org/2023/323.
This crate provides efficient, pure-Rust, minimal APIs to compute the Poseidon2 permutation (not hash) on all supported state sizes (t2, t3, t4, t8, t12, t16).
Currently, the only supported field is the scalar field of bn254.
Parameters are compatible with the original Poseidon2 parameter generation script.
§Examples
ⓘ
let mut state = [...];
poseidon2::bn254::t4::permutation(&state);
poseidon2::bn254::t4::permutation_in_place(&mut state);This crate is suitable for cryptographic circuits, SNARKs, and low-level integrations requiring only the permutation (not hashing).
Modules§
- bn254
- Poseidon2 permutation methods for the
bn254field, based on eprint.iacr.org/2023/323.