6 releases (stable)
| 1.1.0 | Mar 20, 2026 |
|---|---|
| 1.0.2 | Nov 27, 2025 |
| 1.0.1 | Oct 30, 2025 |
| 1.0.0 | Mar 20, 2026 |
| 0.0.1 | Nov 28, 2025 |
#2264 in Cryptography
1,645 downloads per month
Used in 14 crates
(6 directly)
20KB
403 lines
qp-poseidon-constants
Precomputed Poseidon2 constants for the Goldilocks field with a binary located at build_helpers/extract_constants.rs for extracting the constants and a library for creating a new poseidon2 instance using plonky3 with them.
Basic Usage
use p3_goldilocks::Goldilocks;
use p3_field::integers::QuotientMap;
use qp_poseidon_constants::create_poseidon;
// Create a Poseidon2 instance with precomputed constants
let poseidon = create_poseidon();
// Initialize state with width of 12 field element
let mut state = [Goldilocks::ZERO; 12];
// Permute the state using Poseidon2
poseidon.permute_mut(&mut state);
NOTE: this crate used to be part of the qp-poseidon repo, but moved to its own repo since version 1.0.2
Dependencies
~8–11MB
~125K SLoC