#poseidon2 #permutation #bn254 #parameters #in-place #t2 #t4 #t3

taceo-poseidon2

Poseidon2 permutation for BN254 curve

3 unstable releases

Uses new Rust 2024

0.2.1 Dec 19, 2025
0.2.0 Nov 20, 2025
0.1.0 Oct 29, 2025

#233 in Math

Download history 1659/week @ 2025-11-18 801/week @ 2025-11-25 3024/week @ 2025-12-02 2438/week @ 2025-12-09 1113/week @ 2025-12-16 594/week @ 2025-12-23 123/week @ 2025-12-30 1674/week @ 2026-01-06 3475/week @ 2026-01-13 7125/week @ 2026-01-20 5658/week @ 2026-01-27 4675/week @ 2026-02-03 5202/week @ 2026-02-10 5308/week @ 2026-02-17 5376/week @ 2026-02-24 4430/week @ 2026-03-03

21,167 downloads per month
Used in 16 crates (7 directly)

MIT/Apache

110KB
1.5K SLoC

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).


Poseidon2

Based on the MIT/Apache2.0 licensed reference implementation of HorizenLabs https://github.com/HorizenLabs/poseidon2. Main changes revolve around removing unneeded dependencies and curves which are not required here.

Dependencies

~2.9–4MB
~80K SLoC