pub struct F2Ext<const LIMBS: usize, P>where
P: BinaryIrreducible<LIMBS>,{
pub value: Uint<LIMBS>,
/* private fields */
}Expand description
An extension of $\mathbb{F}_2$ given by a polynomial P.
Fields§
§value: Uint<LIMBS>The value of an element of $\mathbb{F}_{2^M}$
Implementations§
Source§impl<const LIMBS: usize, P> F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
impl<const LIMBS: usize, P> F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
Trait Implementations§
Source§impl<const LIMBS: usize, P> ConditionallySelectable for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
impl<const LIMBS: usize, P> ConditionallySelectable for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl<const LIMBS: usize, P> ConstantTimeEq for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
impl<const LIMBS: usize, P> ConstantTimeEq for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
Source§impl<const LIMBS: usize, P> FieldFromRepr for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
impl<const LIMBS: usize, P> FieldFromRepr for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
Source§impl<const LIMBS: usize, P> FieldOps for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
impl<const LIMBS: usize, P> FieldOps for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
Source§fn trace(&self) -> Self
fn trace(&self) -> Self
compute the trace of
self down to $\mathbb{F}_p$ (as an
element of type Self)Source§fn norm(&self) -> Self
fn norm(&self) -> Self
compute the norm of
self down to $\mathbb{F}_p$ (as an
element of type Self)Source§fn legendre(&self) -> i8
fn legendre(&self) -> i8
Computes the “Legendre symbol” i.e., if 0,1,-1 depending if
self is 0, a square or a nonsquare.Source§fn characteristic() -> Vec<u64>
fn characteristic() -> Vec<u64>
Returns the characteristic of the field.
Source§fn pow_vartime(&self, exp: &[u64]) -> Self
fn pow_vartime(&self, exp: &[u64]) -> Self
self^exp using square-and multiply (litte-endian bit order) Read moreSource§fn pow(&self, exp: &[u64]) -> Self
fn pow(&self, exp: &[u64]) -> Self
self^pow in constant time using a Montgomery ladder Read moreSource§fn frobenius_pow(&self, k: u32) -> Self
fn frobenius_pow(&self, k: u32) -> Self
Compute
self^{p^k} a power of the frobeniusSource§fn inverse_and_sqrt(&self) -> (CtOption<Self>, CtOption<Self>)
fn inverse_and_sqrt(&self) -> (CtOption<Self>, CtOption<Self>)
Computes the inverse and square root of
self Read moreSource§fn invertme_sqrtother(&self, rhs: &Self) -> (CtOption<Self>, CtOption<Self>)
fn invertme_sqrtother(&self, rhs: &Self) -> (CtOption<Self>, CtOption<Self>)
Source§fn sqrt_ratio(&self, rhs: &Self) -> CtOption<Self>
fn sqrt_ratio(&self, rhs: &Self) -> CtOption<Self>
Computes the squareroot of a ratio
self/rhs Read moreSource§impl<const LIMBS: usize, P> FieldRandom for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
impl<const LIMBS: usize, P> FieldRandom for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
impl<const LIMBS: usize, P> Copy for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
impl<const LIMBS: usize, P> Eq for F2Ext<LIMBS, P>where
P: BinaryIrreducible<LIMBS>,
Auto Trait Implementations§
impl<const LIMBS: usize, P> Freeze for F2Ext<LIMBS, P>
impl<const LIMBS: usize, P> RefUnwindSafe for F2Ext<LIMBS, P>where
P: RefUnwindSafe,
impl<const LIMBS: usize, P> Send for F2Ext<LIMBS, P>where
P: Send,
impl<const LIMBS: usize, P> Sync for F2Ext<LIMBS, P>where
P: Sync,
impl<const LIMBS: usize, P> Unpin for F2Ext<LIMBS, P>where
P: Unpin,
impl<const LIMBS: usize, P> UnsafeUnpin for F2Ext<LIMBS, P>
impl<const LIMBS: usize, P> UnwindSafe for F2Ext<LIMBS, P>where
P: UnwindSafe,
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