pub struct MlDsaParamsMont;Expand description
Optional: ML-DSA parameters with Montgomery output Use this when you need coefficients to stay in Montgomery domain after inverse NTT
Trait Implementations§
Source§impl Clone for MlDsaParamsMont
impl Clone for MlDsaParamsMont
Source§fn clone(&self) -> MlDsaParamsMont
fn clone(&self) -> MlDsaParamsMont
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MlDsaParamsMont
impl Debug for MlDsaParamsMont
Source§impl Modulus for MlDsaParamsMont
impl Modulus for MlDsaParamsMont
Source§const BARRETT_MU: u128 = 4_299_165_187
const BARRETT_MU: u128 = 4_299_165_187
Barrett reduction constant mu = floor(2^k / Q)
Set to 0 for dynamic computation
Source§impl NttModulus for MlDsaParamsMont
impl NttModulus for MlDsaParamsMont
Source§const ZETAS: &'static [u32]
const ZETAS: &'static [u32]
Precomputed twiddle factors for forward NTT
CRITICAL: For ML-DSA, these are stored in MONTGOMERY domain (ζ·R mod q)
exactly as in the FIPS-204 reference implementation.
Do NOT convert them again - that would give ζ·R² mod q!
Source§const N_INV: u32 = 16_382
const N_INV: u32 = 16_382
N^-1 mod Q for final scaling in inverse NTT
This should be in Montgomery form: (N^-1 * R) mod Q
Source§const NEG_QINV: u32 = 4_236_238_847
const NEG_QINV: u32 = 4_236_238_847
-Q^-1 mod 2^32 for Montgomery reduction (sometimes called NEG_QINV or MONT_QINV)
Source§const PSIS: &'static [u32]
const PSIS: &'static [u32]
Twist factors ψ_i = ω^(bitrev(i)) in STANDARD domain (length N)
These are the N-th roots of the primitive 2N-th root of unity
Required for twisted/negacyclic NTT (ML-DSA)
NOTE: FIPS-204 reference implementation does NOT use these!
Source§const INV_PSIS: &'static [u32]
const INV_PSIS: &'static [u32]
Inverse twist factors ψ_i^(-1) in STANDARD domain (length N)
Required for inverse twisted/negacyclic NTT (ML-DSA)
NOTE: FIPS-204 reference implementation does NOT use these!
Source§const POST_INVNTT_MODE: PostInvNtt = PostInvNtt::Montgomery
const POST_INVNTT_MODE: PostInvNtt = PostInvNtt::Montgomery
How the coefficients should be post-processed after the inverse NTT. Read more
Auto Trait Implementations§
impl Freeze for MlDsaParamsMont
impl RefUnwindSafe for MlDsaParamsMont
impl Send for MlDsaParamsMont
impl Sync for MlDsaParamsMont
impl Unpin for MlDsaParamsMont
impl UnsafeUnpin for MlDsaParamsMont
impl UnwindSafe for MlDsaParamsMont
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