INNER CODE UNIT · Rust

test_bitlen

orion-rs/orion · src/hazardous/dsa/ml_dsa/internal/mod.rs:48

fn test_bitlen() {
    assert_eq!(bitlen(32), 6);
    assert_eq!(bitlen(31), 5);

    assert_eq!(MlDsa44::GAMMA_1_BITLEN, 17);
    assert_eq!(MlDsa65::GAMMA_1_BITLEN, 19);
    assert_eq!(MlDsa87::GAMMA_1_BITLEN, 19);
}

/// Internal parameters for the three parameter-sets that ML-DSA supports.
pub trait MlDsaParameters: Debug + Sized {
    /// Dilithium constant Q.
    const Q: u32 = 8380417;
    /// Polynomial sizes in T_q/R_q.
    const N: usize = 256;

    /// "# of ±1’s in polynomial c"
    const TAU: usize;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…