Struct ml_dsa::algebra::NttPolynomial
source · pub struct NttPolynomial(pub Array<FieldElement, U256>);
Expand description
An element of the ring T_q
, i.e., a tuple of 128 elements of the direct sum components of T_q
.
Tuple Fields§
§0: Array<FieldElement, U256>
Implementations§
source§impl NttPolynomial
impl NttPolynomial
pub fn sample_uniform(B: &mut impl XofReader) -> Self
source§impl NttPolynomial
impl NttPolynomial
pub fn ntt_inverse(&self) -> Polynomial
Trait Implementations§
source§impl Add<&NttPolynomial> for &NttPolynomial
impl Add<&NttPolynomial> for &NttPolynomial
§type Output = NttPolynomial
type Output = NttPolynomial
The resulting type after applying the
+
operator.source§fn add(self, rhs: &NttPolynomial) -> NttPolynomial
fn add(self, rhs: &NttPolynomial) -> NttPolynomial
Performs the
+
operation. Read moresource§impl Clone for NttPolynomial
impl Clone for NttPolynomial
source§fn clone(&self) -> NttPolynomial
fn clone(&self) -> NttPolynomial
Returns a copy of the value. Read more
1.0.0 · 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 NttPolynomial
impl Debug for NttPolynomial
source§impl Default for NttPolynomial
impl Default for NttPolynomial
source§fn default() -> NttPolynomial
fn default() -> NttPolynomial
Returns the “default value” for a type. Read more
source§impl<D: EncodingSize> Encode<D> for NttPolynomial
impl<D: EncodingSize> Encode<D> for NttPolynomial
type EncodedSize = <D as EncodingSize>::EncodedPolynomialSize
fn encode(&self) -> Array<u8, Self::EncodedSize>
fn decode(enc: &Array<u8, Self::EncodedSize>) -> Self
source§impl From<Array<FieldElement, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>> for NttPolynomial
impl From<Array<FieldElement, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>> for NttPolynomial
source§fn from(f: Array<FieldElement, U256>) -> NttPolynomial
fn from(f: Array<FieldElement, U256>) -> NttPolynomial
Converts to this type from the input type.
source§impl From<NttPolynomial> for Array<FieldElement, U256>
impl From<NttPolynomial> for Array<FieldElement, U256>
source§fn from(f_hat: NttPolynomial) -> Array<FieldElement, U256>
fn from(f_hat: NttPolynomial) -> Array<FieldElement, U256>
Converts to this type from the input type.
source§impl Mul<&NttPolynomial> for &NttPolynomial
impl Mul<&NttPolynomial> for &NttPolynomial
§type Output = NttPolynomial
type Output = NttPolynomial
The resulting type after applying the
*
operator.source§fn mul(self, rhs: &NttPolynomial) -> NttPolynomial
fn mul(self, rhs: &NttPolynomial) -> NttPolynomial
Performs the
*
operation. Read moresource§impl PartialEq for NttPolynomial
impl PartialEq for NttPolynomial
source§fn eq(&self, other: &NttPolynomial) -> bool
fn eq(&self, other: &NttPolynomial) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for NttPolynomial
Auto Trait Implementations§
impl Freeze for NttPolynomial
impl RefUnwindSafe for NttPolynomial
impl Send for NttPolynomial
impl Sync for NttPolynomial
impl Unpin for NttPolynomial
impl UnwindSafe for NttPolynomial
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