#[repr(transparent)]pub struct Fp4(_);
Expand description
Instances of Fp4
are elements of a finite field F_p^4
. They are
represented as elements of F_p[X] / (X^4 - 11)
. Basically, this is a big
finite field (about 2^128
elements), which is used when the security of
various operations depends on the size of the field. It has the field
Fp
as a subfield, which means operations by the two are compatable, which
is important. The irreducible polynomial was choosen to be the most simple
possible one, x^4 - B
, where 11
is the smallest B
which makes the
polynomial irreducable.
Implementations
Trait Implementations
sourceimpl AddAssign<Fp4> for Fp4
impl AddAssign<Fp4> for Fp4
sourcefn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the +=
operation. Read more
sourceimpl MulAssign<Fp> for Fp4
impl MulAssign<Fp> for Fp4
Implement the simple multiplication case by the subfield Fp.
sourcefn mul_assign(&mut self, rhs: Fp)
fn mul_assign(&mut self, rhs: Fp)
Performs the *=
operation. Read more
sourceimpl MulAssign<Fp4> for Fp4
impl MulAssign<Fp4> for Fp4
sourcefn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the *=
operation. Read more
sourceimpl PartialOrd<Fp4> for Fp4
impl PartialOrd<Fp4> for Fp4
sourcefn partial_cmp(&self, other: &Fp4) -> Option<Ordering>
fn partial_cmp(&self, other: &Fp4) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl SubAssign<Fp4> for Fp4
impl SubAssign<Fp4> for Fp4
sourcefn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the -=
operation. Read more
impl Copy for Fp4
impl Eq for Fp4
impl Pod for Fp4
impl StructuralEq for Fp4
impl StructuralPartialEq for Fp4
Auto Trait Implementations
impl RefUnwindSafe for Fp4
impl Send for Fp4
impl Sync for Fp4
impl Unpin for Fp4
impl UnwindSafe for Fp4
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedBitPattern for T where
T: AnyBitPattern,
impl<T> CheckedBitPattern for T where
T: AnyBitPattern,
type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during is_valid_bit_pattern
. Read more
sourcefn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret bits
as &Self
.
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more