Struct snarkvm_fields::traits::PoseidonParameters
source · 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<PoseidonParameters<F, RATE, CAPACITY>> for PoseidonParameters<F, RATE, CAPACITY>
impl<F: PartialEq + PrimeField, const RATE: usize, const CAPACITY: usize> PartialEq<PoseidonParameters<F, RATE, CAPACITY>> for PoseidonParameters<F, RATE, CAPACITY>
source§fn eq(&self, other: &PoseidonParameters<F, RATE, CAPACITY>) -> bool
fn eq(&self, other: &PoseidonParameters<F, RATE, CAPACITY>) -> bool
This method 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> StructuralEq 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> 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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.