pub struct RingZq {
pub n: usize,
pub q: u64,
}Expand description
Polynomial-ring arithmetic over Z_q[x]/(x^n + 1).
Supports the ring operations needed for Ring-LWE and NTRU-based schemes.
§WARNING
Educational implementation. Not optimized or secure.
Fields§
§n: usizeRing dimension n (must be a power of 2 for NTT)
q: u64Modulus q
Implementations§
Auto Trait Implementations§
impl Freeze for RingZq
impl RefUnwindSafe for RingZq
impl Send for RingZq
impl Sync for RingZq
impl Unpin for RingZq
impl UnsafeUnpin for RingZq
impl UnwindSafe for RingZq
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