pub struct Poseidon1InternalLayerGeneric<F, const WIDTH: usize> { /* private fields */ }Expand description
Generic internal (partial round) layer for the Poseidon1 permutation.
Uses the sparse matrix decomposition for O(t) partial rounds.
Works with any field that supports the required algebra operations.
Trait Implementations§
Source§impl<F: Clone, const WIDTH: usize> Clone for Poseidon1InternalLayerGeneric<F, WIDTH>
impl<F: Clone, const WIDTH: usize> Clone for Poseidon1InternalLayerGeneric<F, WIDTH>
Source§fn clone(&self) -> Poseidon1InternalLayerGeneric<F, WIDTH>
fn clone(&self) -> Poseidon1InternalLayerGeneric<F, WIDTH>
Returns a duplicate 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<F, A, const WIDTH: usize, const D: u64> PartialRoundLayer<A, WIDTH, D> for Poseidon1InternalLayerGeneric<F, WIDTH>
impl<F, A, const WIDTH: usize, const D: u64> PartialRoundLayer<A, WIDTH, D> for Poseidon1InternalLayerGeneric<F, WIDTH>
Source§fn permute_state(&self, state: &mut [A; WIDTH])
fn permute_state(&self, state: &mut [A; WIDTH])
Apply all RP partial rounds to the state.
Source§impl<F: Field, const WIDTH: usize> PartialRoundLayerConstructor<F, WIDTH> for Poseidon1InternalLayerGeneric<F, WIDTH>
impl<F: Field, const WIDTH: usize> PartialRoundLayerConstructor<F, WIDTH> for Poseidon1InternalLayerGeneric<F, WIDTH>
Source§fn new_from_constants(constants: PartialRoundConstants<F, WIDTH>) -> Self
fn new_from_constants(constants: PartialRoundConstants<F, WIDTH>) -> Self
Build the layer from the sparse-form optimized constants.
Auto Trait Implementations§
impl<F, const WIDTH: usize> Freeze for Poseidon1InternalLayerGeneric<F, WIDTH>where
F: Freeze,
impl<F, const WIDTH: usize> RefUnwindSafe for Poseidon1InternalLayerGeneric<F, WIDTH>where
F: RefUnwindSafe,
impl<F, const WIDTH: usize> Send for Poseidon1InternalLayerGeneric<F, WIDTH>where
F: Send,
impl<F, const WIDTH: usize> Sync for Poseidon1InternalLayerGeneric<F, WIDTH>where
F: Sync,
impl<F, const WIDTH: usize> Unpin for Poseidon1InternalLayerGeneric<F, WIDTH>where
F: Unpin,
impl<F, const WIDTH: usize> UnsafeUnpin for Poseidon1InternalLayerGeneric<F, WIDTH>where
F: UnsafeUnpin,
impl<F, const WIDTH: usize> UnwindSafe for Poseidon1InternalLayerGeneric<F, WIDTH>where
F: UnwindSafe,
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