pub struct BabyBearInternalLayerParameters;Expand description
Contains data needed to define the internal layers of the Poseidon2 permutation.
Trait Implementations§
Source§impl InternalLayerBaseParameters<BabyBearParameters, 16> for BabyBearInternalLayerParameters
impl InternalLayerBaseParameters<BabyBearParameters, 16> for BabyBearInternalLayerParameters
Source§fn internal_layer_mat_mul<R: PrimeCharacteristicRing>(
state: &mut [R; 16],
sum: R,
)
fn internal_layer_mat_mul<R: PrimeCharacteristicRing>( state: &mut [R; 16], sum: R, )
Perform the internal matrix multiplication: s -> (1 + Diag(V))s.
We ignore state[0] as it is handled separately.
Source§fn generic_internal_linear_layer<R>(state: &mut [R; WIDTH])where
R: PrimeCharacteristicRing,
fn generic_internal_linear_layer<R>(state: &mut [R; WIDTH])where
R: PrimeCharacteristicRing,
Perform the matrix multiplication corresponding to the internal linear
layer.
Source§impl InternalLayerBaseParameters<BabyBearParameters, 24> for BabyBearInternalLayerParameters
impl InternalLayerBaseParameters<BabyBearParameters, 24> for BabyBearInternalLayerParameters
Source§fn internal_layer_mat_mul<R: PrimeCharacteristicRing>(
state: &mut [R; 24],
sum: R,
)
fn internal_layer_mat_mul<R: PrimeCharacteristicRing>( state: &mut [R; 24], sum: R, )
Perform the internal matrix multiplication: s -> (1 + Diag(V))s.
We ignore state[0] as it is handled separately.
Source§fn generic_internal_linear_layer<R>(state: &mut [R; WIDTH])where
R: PrimeCharacteristicRing,
fn generic_internal_linear_layer<R>(state: &mut [R; WIDTH])where
R: PrimeCharacteristicRing,
Perform the matrix multiplication corresponding to the internal linear
layer.
Source§impl InternalLayerBaseParameters<BabyBearParameters, 32> for BabyBearInternalLayerParameters
impl InternalLayerBaseParameters<BabyBearParameters, 32> for BabyBearInternalLayerParameters
Source§fn internal_layer_mat_mul<R: PrimeCharacteristicRing>(
state: &mut [R; 32],
sum: R,
)
fn internal_layer_mat_mul<R: PrimeCharacteristicRing>( state: &mut [R; 32], sum: R, )
Perform the internal matrix multiplication: s -> (1 + Diag(V))s.
We ignore state[0] as it is handled separately.
Source§fn generic_internal_linear_layer<R>(state: &mut [R; WIDTH])where
R: PrimeCharacteristicRing,
fn generic_internal_linear_layer<R>(state: &mut [R; WIDTH])where
R: PrimeCharacteristicRing,
Perform the matrix multiplication corresponding to the internal linear
layer.
impl InternalLayerParameters<BabyBearParameters, 16> for BabyBearInternalLayerParameters
impl InternalLayerParameters<BabyBearParameters, 24> for BabyBearInternalLayerParameters
impl InternalLayerParameters<BabyBearParameters, 32> for BabyBearInternalLayerParameters
Auto Trait Implementations§
impl Freeze for BabyBearInternalLayerParameters
impl RefUnwindSafe for BabyBearInternalLayerParameters
impl Send for BabyBearInternalLayerParameters
impl Sync for BabyBearInternalLayerParameters
impl Unpin for BabyBearInternalLayerParameters
impl UnsafeUnpin for BabyBearInternalLayerParameters
impl UnwindSafe for BabyBearInternalLayerParameters
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more