Skip to main content

Crate qp_poseidon_constants

Crate qp_poseidon_constants 

Source

Constants§

POSEIDON2_EXTERNAL_ROUNDS
Number of external (full) rounds in the Poseidon2 permutation (4 initial + 4 terminal).
POSEIDON2_INITIAL_EXTERNAL_CONSTANTS_RAW
Raw u64 values for initial external round constants
POSEIDON2_INTERNAL_CONSTANTS_RAW
Raw u64 values for internal round constants
POSEIDON2_INTERNAL_ROUNDS
Number of internal (partial) rounds in the Poseidon2 permutation.
POSEIDON2_MATRIX_DIAG_12_RAW
Diagonal matrix constants for Poseidon2 internal diffusion layer (WIDTH=12). These match MATRIX_DIAG_12_GOLDILOCKS from p3-goldilocks.
POSEIDON2_OUTPUT
Number of output field elements in a Poseidon2 hash digest.
POSEIDON2_SEED
Seed used to derive Poseidon2 round constants (digits of pi).
POSEIDON2_TERMINAL_EXTERNAL_CONSTANTS_RAW
Raw u64 values for terminal external round constants
SPONGE_CAPACITY
Capacity of the sponge (security parameter = WIDTH - RATE).
SPONGE_RATE
Rate of the sponge construction (number of field elements absorbed per permutation). With WIDTH=12 and RATE=8, the capacity is 4 field elements.
SPONGE_WIDTH
Width of the Poseidon2 sponge (number of field elements in state).

Functions§

create_poseidon
Create a Poseidon2 instance using precomputed constants