| Crates.io | qp-poseidon-constants |
| lib.rs | qp-poseidon-constants |
| version | 0.0.1 |
| created_at | 2025-10-30 23:07:38.261926+00 |
| updated_at | 2025-11-28 10:59:04.83459+00 |
| description | Precomputed Poseidon2 constants for Goldilocks field |
| homepage | https://quantus.com |
| repository | https://github.com/Quantus-Network/qp-poseidon-constants |
| max_upload_size | |
| id | 1909100 |
| size | 52,257 |
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.
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