pub struct BabyBearInternalLayerParameters;
Expand description
Contains data needed to define the internal layers of the Poseidon2 permutation.
Trait Implementations§
Source§impl Clone for BabyBearInternalLayerParameters
impl Clone for BabyBearInternalLayerParameters
Source§fn clone(&self) -> BabyBearInternalLayerParameters
fn clone(&self) -> BabyBearInternalLayerParameters
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for BabyBearInternalLayerParameters
impl Default for BabyBearInternalLayerParameters
Source§fn default() -> BabyBearInternalLayerParameters
fn default() -> BabyBearInternalLayerParameters
Returns the “default value” for a type. Read more
Source§impl InternalLayerBaseParameters<BabyBearParameters, 16> for BabyBearInternalLayerParameters
impl InternalLayerBaseParameters<BabyBearParameters, 16> for BabyBearInternalLayerParameters
Source§fn internal_layer_mat_mul(
state: &mut [MontyField31<BabyBearParameters>; 16],
sum: MontyField31<BabyBearParameters>,
)
fn internal_layer_mat_mul( state: &mut [MontyField31<BabyBearParameters>; 16], sum: MontyField31<BabyBearParameters>, )
Perform the internal matrix multiplication: s -> (1 + Diag(V))s.
We ignore state[0]
as it is handled separately.
const INTERNAL_DIAG_MONTY: [BabyBear; 16] = INTERNAL_DIAG_MONTY_16
type ArrayLike = [MontyField31<BabyBearParameters>; 15]
Source§fn generic_internal_linear_layer<AF>(state: &mut [AF; 16])
fn generic_internal_linear_layer<AF>(state: &mut [AF; 16])
Perform the internal matrix multiplication for any Abstract field
which implements multiplication by MontyField31 elements.
Source§impl InternalLayerBaseParameters<BabyBearParameters, 24> for BabyBearInternalLayerParameters
impl InternalLayerBaseParameters<BabyBearParameters, 24> for BabyBearInternalLayerParameters
Source§fn internal_layer_mat_mul(
state: &mut [MontyField31<BabyBearParameters>; 24],
sum: MontyField31<BabyBearParameters>,
)
fn internal_layer_mat_mul( state: &mut [MontyField31<BabyBearParameters>; 24], sum: MontyField31<BabyBearParameters>, )
Perform the internal matrix multiplication: s -> (1 + Diag(V))s.
We ignore state[0]
as it is handled separately.
const INTERNAL_DIAG_MONTY: [BabyBear; 24] = INTERNAL_DIAG_MONTY_24
type ArrayLike = [MontyField31<BabyBearParameters>; 23]
Source§fn generic_internal_linear_layer<AF>(state: &mut [AF; 24])
fn generic_internal_linear_layer<AF>(state: &mut [AF; 24])
Perform the internal matrix multiplication for any Abstract field
which implements multiplication by MontyField31 elements.
impl InternalLayerParameters<BabyBearParameters, 16> for BabyBearInternalLayerParameters
impl InternalLayerParameters<BabyBearParameters, 24> 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 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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