Struct Kyber256Params

Source
pub struct Kyber256Params;
Expand description

Example: Kyber-256 parameter set

Trait Implementations§

Source§

impl Clone for Kyber256Params

Source§

fn clone(&self) -> Kyber256Params

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Kyber256Params

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Modulus for Kyber256Params

Source§

const Q: u32 = 3_329u32

The primary modulus Q for coefficient arithmetic
Source§

const N: usize = 256usize

The polynomial degree N (number of coefficients)
Source§

const BARRETT_MU: u128 = 10_569_051_393u128

Barrett reduction constant mu = floor(2^k / Q) Set to 0 for dynamic computation
Source§

const BARRETT_K: u32 = 45u32

Barrett reduction shift amount k Set to 0 for dynamic computation
Source§

impl NttModulus for Kyber256Params

Source§

const N_INV: u32 = 2_385u32

(256⁻¹) in Montgomery form: (256⁻¹ · R₃₂) mod Q

Source§

const MONT_R: u32 = 1_353u32

2³² mod Q

Source§

const NEG_QINV: u32 = 2_488_732_927u32

-Q⁻¹ mod 2³² (0x94570CFF)

Source§

const ZETA: u32 = 17u32

Primitive root of unity (generator)
Source§

const ZETAS: &'static [u32]

Precomputed twiddle factors for forward NTT CRITICAL: For Dilithium, 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 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 (Dilithium) NOTE: FIPS-204 reference implementation does NOT use these!
Source§

const INV_PSIS: &'static [u32]

Inverse twist factors ψ_i^(-1) in STANDARD domain (length N) Required for inverse twisted/negacyclic NTT (Dilithium) NOTE: FIPS-204 reference implementation does NOT use these!
Source§

const POST_INVNTT_MODE: PostInvNtt = PostInvNtt::Standard

How the coefficients should be post-processed after the inverse NTT. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V