#[repr(C)]pub struct Poseidon2Cols<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> {
pub export: T,
pub inputs: [T; WIDTH],
pub beginning_full_rounds: [FullRound<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS>; HALF_FULL_ROUNDS],
pub partial_rounds: [PartialRound<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS>; PARTIAL_ROUNDS],
pub ending_full_rounds: [FullRound<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS>; HALF_FULL_ROUNDS],
}
Expand description
Columns for a Poseidon2 AIR which computes one permutation per row.
The columns of the STARK are divided into the three different round sections of the Poseidon2
Permutation: beginning full rounds, partial rounds, and ending full rounds. For the full
rounds we store an SBox
columnset for each state variable, and for the partial rounds we
store only for the first state variable. Because the matrix multiplications are linear
functions, we need only keep auxiliary columns for the S-box computations.
Fields§
§export: T
§inputs: [T; WIDTH]
§beginning_full_rounds: [FullRound<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS>; HALF_FULL_ROUNDS]
Beginning Full Rounds
partial_rounds: [PartialRound<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS>; PARTIAL_ROUNDS]
Partial Rounds
ending_full_rounds: [FullRound<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS>; HALF_FULL_ROUNDS]
Ending Full Rounds
Trait Implementations§
Source§impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> Borrow<Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>> for [T]
impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> Borrow<Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>> for [T]
Source§fn borrow(
&self,
) -> &Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>
fn borrow( &self, ) -> &Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>
Immutably borrows from an owned value. Read more
Source§impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> BorrowMut<Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>> for [T]
impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> BorrowMut<Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>> for [T]
Source§fn borrow_mut(
&mut self,
) -> &mut Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>
fn borrow_mut( &mut self, ) -> &mut Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>
Mutably borrows from an owned value. Read more
Auto Trait Implementations§
impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> Freeze for Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>where
T: Freeze,
impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> RefUnwindSafe for Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>where
T: RefUnwindSafe,
impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> Send for Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>where
T: Send,
impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> Sync for Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>where
T: Sync,
impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> Unpin for Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>where
T: Unpin,
impl<T, const WIDTH: usize, const SBOX_DEGREE: u64, const SBOX_REGISTERS: usize, const HALF_FULL_ROUNDS: usize, const PARTIAL_ROUNDS: usize> UnwindSafe for Poseidon2Cols<T, WIDTH, SBOX_DEGREE, SBOX_REGISTERS, HALF_FULL_ROUNDS, PARTIAL_ROUNDS>where
T: 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> 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