pub struct ModuleMatrix {
pub rows: usize,
pub cols: usize,
pub entries_ntt: Vec<NttPoly>,
}Expand description
Public matrix A stored row-major as NTT polynomials Â_{i,j}.
Fields§
§rows: usizeNumber of rows k.
cols: usizeNumber of columns l.
entries_ntt: Vec<NttPoly>Row-major k · l entries.
Implementations§
Source§impl ModuleMatrix
impl ModuleMatrix
Sourcepub fn expand_from_seed(seed: &[u8; 32], rows: usize, cols: usize) -> Self
pub fn expand_from_seed(seed: &[u8; 32], rows: usize, cols: usize) -> Self
Expand A from seed ρ with crate::expand_a_from_seed.
Sourcepub fn mul_vec_ntt(&self, v_ntt: &[NttPoly]) -> ModuleVec
pub fn mul_vec_ntt(&self, v_ntt: &[NttPoly]) -> ModuleVec
y_i = InvNTT( Σ_j Â_{i,j} ∘ v̂_j ) — same pattern as ML-DSA compute_matrix_x_mask.
Auto Trait Implementations§
impl Freeze for ModuleMatrix
impl RefUnwindSafe for ModuleMatrix
impl Send for ModuleMatrix
impl Sync for ModuleMatrix
impl Unpin for ModuleMatrix
impl UnsafeUnpin for ModuleMatrix
impl UnwindSafe for ModuleMatrix
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