pub struct NttVector<F: Field, K: ArraySize>(pub Array<NttPolynomial<F>, K>);Expand description
An NttVector is a vector of polynomials from T_q of length K.
NTT vectors can be added and subtracted. If multiplication is defined for NTT polynomials, then NTT vectors can be multiplied by NTT polynomials, and “multiplied” with each other to produce a dot product.
Tuple Fields§
§0: Array<NttPolynomial<F>, K>Implementations§
Trait Implementations§
Source§impl<F: Field, K: ArraySize> CtEq for NttVector<F, K>
Available on crate feature ctutils only.
impl<F: Field, K: ArraySize> CtEq for NttVector<F, K>
Available on crate feature
ctutils only.Source§impl<F: Field<Int: CtEq>, K: ArraySize> CtEqSlice for NttVector<F, K>
Available on crate feature ctutils only.
impl<F: Field<Int: CtEq>, K: ArraySize> CtEqSlice for NttVector<F, K>
Available on crate feature
ctutils only.Source§fn ct_eq_slice(a: &[Self], b: &[Self]) -> Choice
fn ct_eq_slice(a: &[Self], b: &[Self]) -> Choice
Determine if
a is equal to b in constant-time.Source§fn ct_ne_slice(a: &[Self], b: &[Self]) -> Choice
fn ct_ne_slice(a: &[Self], b: &[Self]) -> Choice
Determine if
a is NOT equal to b in constant-time.Source§impl<F, D, K> Encode<D> for NttVector<F, K>
impl<F, D, K> Encode<D> for NttVector<F, K>
Source§type EncodedSize = <D as VectorEncodingSize<K>>::EncodedVectorSize
type EncodedSize = <D as VectorEncodingSize<K>>::EncodedVectorSize
Size of the encoded object.
Source§impl<F: Field, K: ArraySize> Mul<&NttVector<F, K>> for &NttVector<F, K>
impl<F: Field, K: ArraySize> Mul<&NttVector<F, K>> for &NttVector<F, K>
Source§type Output = NttPolynomial<F>
type Output = NttPolynomial<F>
The resulting type after applying the
* operator.Source§impl<F: PartialEq + Field, K: PartialEq + ArraySize> PartialEq for NttVector<F, K>
impl<F: PartialEq + Field, K: PartialEq + ArraySize> PartialEq for NttVector<F, K>
Source§impl<F: Field, K: ArraySize> Zeroize for NttVector<F, K>
Available on crate feature zeroize only.
impl<F: Field, K: ArraySize> Zeroize for NttVector<F, K>
Available on crate feature
zeroize only.impl<F: Eq + Field, K: Eq + ArraySize> Eq for NttVector<F, K>
impl<F: Field, K: ArraySize> StructuralPartialEq for NttVector<F, K>
Auto Trait Implementations§
impl<F, K> Freeze for NttVector<F, K>
impl<F, K> RefUnwindSafe for NttVector<F, K>
impl<F, K> Send for NttVector<F, K>
impl<F, K> Sync for NttVector<F, K>
impl<F, K> Unpin for NttVector<F, K>
impl<F, K> UnsafeUnpin for NttVector<F, K>
impl<F, K> UnwindSafe for NttVector<F, K>
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