#poseidon #hash-functions #quantus-network #no-std

no-std bin+lib qp-poseidon-constants

Precomputed Poseidon2 constants for Goldilocks field

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

Download history 18/week @ 2025-12-28 201/week @ 2026-01-04 120/week @ 2026-01-11 225/week @ 2026-01-18 223/week @ 2026-01-25 129/week @ 2026-02-01 184/week @ 2026-02-08 279/week @ 2026-02-15 227/week @ 2026-02-22 266/week @ 2026-03-01 521/week @ 2026-03-08 289/week @ 2026-03-15 335/week @ 2026-03-22 372/week @ 2026-03-29 570/week @ 2026-04-05 344/week @ 2026-04-12

1,645 downloads per month
Used in 14 crates (6 directly)

MIT-0 license

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