pub struct PoseidonParameters<F: PrimeField, const RATE: usize, const CAPACITY: usize> {
pub full_rounds: usize,
pub partial_rounds: usize,
pub alpha: u64,
pub ark: Vec<Vec<F>>,
pub mds: Vec<Vec<F>>,
}
Expand description
Parameters and RNG used
Fields§
§full_rounds: usize
number of rounds in a full-round operation
partial_rounds: usize
number of rounds in a partial-round operation
alpha: u64
Exponent used in S-boxes
ark: Vec<Vec<F>>
Additive Round keys. These are added before each MDS matrix application to make it an affine shift.
They are indexed by ark[round_num][state_element_index]
mds: Vec<Vec<F>>
Maximally Distance Separating Matrix.
Trait Implementations§
Source§impl<F: Clone + PrimeField, const RATE: usize, const CAPACITY: usize> Clone for PoseidonParameters<F, RATE, CAPACITY>
impl<F: Clone + PrimeField, const RATE: usize, const CAPACITY: usize> Clone for PoseidonParameters<F, RATE, CAPACITY>
Source§fn clone(&self) -> PoseidonParameters<F, RATE, CAPACITY>
fn clone(&self) -> PoseidonParameters<F, RATE, CAPACITY>
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<F: Debug + PrimeField, const RATE: usize, const CAPACITY: usize> Debug for PoseidonParameters<F, RATE, CAPACITY>
impl<F: Debug + PrimeField, const RATE: usize, const CAPACITY: usize> Debug for PoseidonParameters<F, RATE, CAPACITY>
Source§impl<F: PartialEq + PrimeField, const RATE: usize, const CAPACITY: usize> PartialEq for PoseidonParameters<F, RATE, CAPACITY>
impl<F: PartialEq + PrimeField, const RATE: usize, const CAPACITY: usize> PartialEq for PoseidonParameters<F, RATE, CAPACITY>
Source§fn eq(&self, other: &PoseidonParameters<F, RATE, CAPACITY>) -> bool
fn eq(&self, other: &PoseidonParameters<F, RATE, CAPACITY>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<F: Eq + PrimeField, const RATE: usize, const CAPACITY: usize> Eq for PoseidonParameters<F, RATE, CAPACITY>
impl<F: PrimeField, const RATE: usize, const CAPACITY: usize> StructuralPartialEq for PoseidonParameters<F, RATE, CAPACITY>
Auto Trait Implementations§
impl<F, const RATE: usize, const CAPACITY: usize> Freeze for PoseidonParameters<F, RATE, CAPACITY>
impl<F, const RATE: usize, const CAPACITY: usize> RefUnwindSafe for PoseidonParameters<F, RATE, CAPACITY>where
F: RefUnwindSafe,
impl<F, const RATE: usize, const CAPACITY: usize> Send for PoseidonParameters<F, RATE, CAPACITY>
impl<F, const RATE: usize, const CAPACITY: usize> Sync for PoseidonParameters<F, RATE, CAPACITY>
impl<F, const RATE: usize, const CAPACITY: usize> Unpin for PoseidonParameters<F, RATE, CAPACITY>where
F: Unpin,
impl<F, const RATE: usize, const CAPACITY: usize> UnwindSafe for PoseidonParameters<F, RATE, CAPACITY>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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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