Skip to main content

Crate p3_goldilocks

Crate p3_goldilocks 

Source
Expand description

The prime field known as Goldilocks, defined as F_p where p = 2^64 - 2^32 + 1.

Modules§

poseidon1
Poseidon1 permutation for Goldilocks.

Structs§

GenericPoseidon2LinearLayersGoldilocks
An implementation of the matrix multiplications in the internal and external layers of Poseidon2.
Goldilocks
The prime field known as Goldilocks, defined as F_p where p = 2^64 - 2^32 + 1.
MdsMatrixGoldilocks
Poseidon2ExternalLayerGoldilocks
The external layers of the Poseidon2 permutation.
Poseidon2InternalLayerGoldilocks
The internal layers of the Poseidon2 permutation.
SmallConvolveGoldilocks
Instantiate convolution for “small” RHS vectors over Goldilocks.

Constants§

GOLDILOCKS_POSEIDON2_HALF_FULL_ROUNDS
Number of full rounds per half for Goldilocks Poseidon2 (RF / 2).
GOLDILOCKS_POSEIDON2_PARTIAL_ROUNDS_8
Number of partial rounds for Goldilocks Poseidon2 (width 8).
GOLDILOCKS_POSEIDON2_PARTIAL_ROUNDS_12
Number of partial rounds for Goldilocks Poseidon2 (width 12).
GOLDILOCKS_POSEIDON2_RC_8_EXTERNAL_FINAL
Round constants for width-8 Poseidon2 on Goldilocks.
GOLDILOCKS_POSEIDON2_RC_8_EXTERNAL_INITIAL
Round constants for width-8 Poseidon2 on Goldilocks.
GOLDILOCKS_POSEIDON2_RC_8_INTERNAL
Round constants for width-8 Poseidon2 on Goldilocks.
GOLDILOCKS_POSEIDON2_RC_12_EXTERNAL_FINAL
Round constants for width-12 Poseidon2 on Goldilocks.
GOLDILOCKS_POSEIDON2_RC_12_EXTERNAL_INITIAL
Round constants for width-12 Poseidon2 on Goldilocks.
GOLDILOCKS_POSEIDON2_RC_12_INTERNAL
Round constants for width-12 Poseidon2 on Goldilocks.
MATRIX_CIRC_MDS_8_COL
First column of the circulant MDS matrix for width 8, derived from the first row.
MATRIX_CIRC_MDS_12_COL
First column of the circulant MDS matrix for width 12, derived from the first row.
MATRIX_DIAG_8_GOLDILOCKS
MATRIX_DIAG_12_GOLDILOCKS
MATRIX_DIAG_16_GOLDILOCKS
MATRIX_DIAG_20_GOLDILOCKS

Functions§

default_goldilocks_poseidon2_8
Create a default width-8 Poseidon2 permutation for Goldilocks.
default_goldilocks_poseidon2_12
Create a default width-12 Poseidon2 permutation for Goldilocks.

Type Aliases§

Poseidon2Goldilocks
An implementation of the Poseidon2 hash function for the Goldilocks field.