poseidon_parameters/
v1.rs1pub use crate::alpha::Alpha;
2pub use crate::round_numbers::RoundNumbers;
3
4pub use crate::matrix::{mat_mul, square_mat_mul, Matrix, SquareMatrix};
5pub use crate::{
6 arc_matrix::ArcMatrix, arc_matrix::OptimizedArcMatrix, matrix_ops::MatrixOperations,
7 matrix_ops::SquareMatrixOperations, mds_matrix::MdsMatrix, mds_matrix::OptimizedMdsMatrices,
8};
9
10#[derive(Clone, Debug)]
15pub struct PoseidonParameters<
16 const STATE_SIZE: usize,
17 const STATE_SIZE_MINUS_1: usize,
18 const NUM_MDS_ELEMENTS: usize,
19 const NUM_STATE_SIZE_MINUS_1_ELEMENTS: usize,
20 const NUM_ROUND_ROWS: usize,
21 const NUM_ROUND_COLS: usize,
22 const NUM_ROUND_ELEMENTS: usize,
23 const NUM_PARTIAL_ROUNDS: usize,
24> {
25 pub M: usize,
28
29 pub alpha: Alpha,
32
33 pub rounds: RoundNumbers,
35
36 pub mds: MdsMatrix<
38 STATE_SIZE,
39 STATE_SIZE_MINUS_1,
40 NUM_MDS_ELEMENTS,
41 NUM_STATE_SIZE_MINUS_1_ELEMENTS,
42 >,
43
44 pub arc: ArcMatrix<NUM_ROUND_ROWS, NUM_ROUND_COLS, NUM_ROUND_ELEMENTS>,
46
47 pub optimized_arc: OptimizedArcMatrix<NUM_ROUND_ROWS, NUM_ROUND_COLS, NUM_ROUND_ELEMENTS>,
49
50 pub optimized_mds: OptimizedMdsMatrices<
52 NUM_ROUND_ROWS,
53 NUM_PARTIAL_ROUNDS,
54 STATE_SIZE,
55 STATE_SIZE_MINUS_1,
56 NUM_MDS_ELEMENTS,
57 NUM_STATE_SIZE_MINUS_1_ELEMENTS,
58 >,
59}