Struct poseidon377::PoseidonParameters
pub struct PoseidonParameters<F>where
F: PrimeField,{
pub M: usize,
pub t: usize,
pub alpha: Alpha,
pub rounds: RoundNumbers,
pub mds: MdsMatrix<F>,
pub arc: ArcMatrix<F>,
pub optimized_arc: OptimizedArcMatrix<F>,
pub optimized_mds: OptimizedMdsMatrices<F>,
}
Expand description
A set of Poseidon1 parameters for a given set of input parameters.
Fields§
§M: usize
Security level.
t: usize
Width of desired hash function, e.g. $t=3$ corresponds to a 2-to-1 hash.
alpha: Alpha
Exponent of the Sbox, i.e. S-box(x) = x^{\alpha} used in the SubWords
step
rounds: RoundNumbers
Round numbers
mds: MdsMatrix<F>
t x t
MDS matrix used in the MixLayer
step
arc: ArcMatrix<F>
num_total_rounds x t
matrix of constants used in the AddRoundConstant
step
optimized_arc: OptimizedArcMatrix<F>
Optimized round constants.
optimized_mds: OptimizedMdsMatrices<F>
Optimized MDS matrices.
Trait Implementations§
§impl<F> Clone for PoseidonParameters<F>where
F: Clone + PrimeField,
impl<F> Clone for PoseidonParameters<F>where
F: Clone + PrimeField,
§fn clone(&self) -> PoseidonParameters<F>
fn clone(&self) -> PoseidonParameters<F>
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 moreAuto Trait Implementations§
impl<F> Freeze for PoseidonParameters<F>where
F: Freeze,
impl<F> RefUnwindSafe for PoseidonParameters<F>where
F: RefUnwindSafe,
impl<F> Send for PoseidonParameters<F>
impl<F> Sync for PoseidonParameters<F>
impl<F> Unpin for PoseidonParameters<F>where
F: Unpin,
impl<F> UnwindSafe for PoseidonParameters<F>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