Constants§
- POSEIDO
N2_ EXTERNAL_ ROUNDS - Number of external (full) rounds in the Poseidon2 permutation (4 initial + 4 terminal).
- POSEIDO
N2_ INITIAL_ EXTERNAL_ CONSTANTS_ RAW - Raw u64 values for initial external round constants
- POSEIDO
N2_ INTERNAL_ CONSTANTS_ RAW - Raw u64 values for internal round constants
- POSEIDO
N2_ INTERNAL_ ROUNDS - Number of internal (partial) rounds in the Poseidon2 permutation.
- POSEIDO
N2_ MATRIX_ DIAG_ 12_ RAW - Diagonal matrix constants for Poseidon2 internal diffusion layer (WIDTH=12).
These match
MATRIX_DIAG_12_GOLDILOCKSfrom p3-goldilocks. - POSEIDO
N2_ OUTPUT - Number of output field elements in a Poseidon2 hash digest.
- POSEIDO
N2_ SEED - Seed used to derive Poseidon2 round constants (digits of pi).
- POSEIDO
N2_ 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