Skip to main content

Crate p3_baby_bear

Crate p3_baby_bear 

Source

Structs§

BabyBearInternalLayerParameters
Contains data needed to define the internal layers of the Poseidon2 permutation.
BabyBearParameters
BabyBearPoseidonParameters
Parameters for the Poseidon1 internal layer on BabyBear.
MDSBabyBearData

Constants§

BABYBEAR_POSEIDON1_HALF_FULL_ROUNDS
Number of full rounds per half for BabyBear Poseidon1 (RF / 2).
BABYBEAR_POSEIDON1_PARTIAL_ROUNDS_16
Number of partial rounds for BabyBear Poseidon1 (width 16).
BABYBEAR_POSEIDON1_PARTIAL_ROUNDS_24
Number of partial rounds for BabyBear Poseidon1 (width 24).
BABYBEAR_POSEIDON1_RC_16
Round constants for width-16 Poseidon1 on BabyBear.
BABYBEAR_POSEIDON1_RC_24
Round constants for width-24 Poseidon1 on BabyBear.
BABYBEAR_POSEIDON2_HALF_FULL_ROUNDS
Number of full rounds per half for BabyBear Poseidon2 (RF / 2).
BABYBEAR_POSEIDON2_PARTIAL_ROUNDS_16
Number of partial rounds for BabyBear Poseidon2 (width 16).
BABYBEAR_POSEIDON2_PARTIAL_ROUNDS_24
Number of partial rounds for BabyBear Poseidon2 (width 24).
BABYBEAR_POSEIDON2_RC_16_EXTERNAL_FINAL
Round constants for width-16 Poseidon2 on BabyBear.
BABYBEAR_POSEIDON2_RC_16_EXTERNAL_INITIAL
Round constants for width-16 Poseidon2 on BabyBear.
BABYBEAR_POSEIDON2_RC_16_INTERNAL
Round constants for width-16 Poseidon2 on BabyBear.
BABYBEAR_POSEIDON2_RC_24_EXTERNAL_FINAL
Round constants for width-24 Poseidon2 on BabyBear.
BABYBEAR_POSEIDON2_RC_24_EXTERNAL_INITIAL
Round constants for width-24 Poseidon2 on BabyBear.
BABYBEAR_POSEIDON2_RC_24_INTERNAL
Round constants for width-24 Poseidon2 on BabyBear.
BABYBEAR_S_BOX_DEGREE
S-box degree for BabyBear Poseidon1.

Functions§

default_babybear_poseidon1_16
Create a default width-16 Poseidon1 permutation for BabyBear.
default_babybear_poseidon1_24
Create a default width-24 Poseidon1 permutation for BabyBear.
default_babybear_poseidon2_16
Create a default width-16 Poseidon2 permutation for BabyBear.
default_babybear_poseidon2_24
Create a default width-24 Poseidon2 permutation for BabyBear.

Type Aliases§

BabyBear
The prime field 2^31 - 2^27 + 1, a.k.a. the Baby Bear field.
GenericPoseidon1LinearLayersBabyBear
Generic Poseidon1 linear layers for BabyBear.
GenericPoseidon2LinearLayersBabyBear
An implementation of the matrix multiplications in the internal and external layers of Poseidon2.
MdsMatrixBabyBear
Poseidon1BabyBear
The Poseidon1 permutation for BabyBear.
Poseidon1ExternalLayerBabyBear
External (full round) layer for BabyBear Poseidon1.
Poseidon1InternalLayerBabyBear
Internal (partial round) layer for BabyBear Poseidon1.
Poseidon2BabyBear
An implementation of the Poseidon2 hash function specialised to run on the current architecture.
Poseidon2ExternalLayerBabyBear
Poseidon2InternalLayerBabyBear