pub type GenericPoseidon2LinearLayersBabyBear = GenericPoseidon2LinearLayersMonty31<BabyBearParameters, BabyBearInternalLayerParameters>;
Expand description
An implementation of the matrix multiplications in the internal and external layers of Poseidon2.
This can act on [FA; WIDTH] for any FieldAlgebra which implements multiplication by BabyBear field elements.
If you have either [BabyBear::Packing; WIDTH]
or [BabyBear; WIDTH]
it will be much faster
to use Poseidon2BabyBear<WIDTH>
instead of building a Poseidon2 permutation using this.
Aliased Type§
struct GenericPoseidon2LinearLayersBabyBear { /* private fields */ }
Trait Implementations
Source§impl<FP, FA, ILBP, const WIDTH: usize> GenericPoseidon2LinearLayers<FA, WIDTH> for GenericPoseidon2LinearLayersMonty31<FP, ILBP>where
FP: FieldParameters,
FA: FieldAlgebra<Output = FA> + Mul<MontyField31<FP>>,
ILBP: InternalLayerBaseParameters<FP, WIDTH>,
impl<FP, FA, ILBP, const WIDTH: usize> GenericPoseidon2LinearLayers<FA, WIDTH> for GenericPoseidon2LinearLayersMonty31<FP, ILBP>where
FP: FieldParameters,
FA: FieldAlgebra<Output = FA> + Mul<MontyField31<FP>>,
ILBP: InternalLayerBaseParameters<FP, WIDTH>,
Source§fn internal_linear_layer(state: &mut [FA; WIDTH])
fn internal_linear_layer(state: &mut [FA; WIDTH])
Perform the external matrix multiplication for any Abstract field which implements multiplication by MontyField31 elements.
Source§fn external_linear_layer(state: &mut [FA; WIDTH])
fn external_linear_layer(state: &mut [FA; WIDTH])
A generic implementation of the external linear layer.