Struct lambdaworks_math::field::fields::p448_goldilocks_prime_field::P448GoldilocksPrimeField
source · pub struct P448GoldilocksPrimeField;
Trait Implementations§
source§impl Clone for P448GoldilocksPrimeField
impl Clone for P448GoldilocksPrimeField
source§fn clone(&self) -> P448GoldilocksPrimeField
fn clone(&self) -> P448GoldilocksPrimeField
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 P448GoldilocksPrimeField
impl Debug for P448GoldilocksPrimeField
source§impl IsField for P448GoldilocksPrimeField
impl IsField for P448GoldilocksPrimeField
source§fn mul(a: &U56x8, b: &U56x8) -> U56x8
fn mul(a: &U56x8, b: &U56x8) -> U56x8
Implements fast Karatsuba Multiplication optimized for the Godilocks Prime field. Taken from Mike Hamburg’s implemenation: https://sourceforge.net/p/ed448goldilocks/code/ci/master/tree/src/p448/arch_ref64/f_impl.c
source§fn eq(a: &U56x8, b: &U56x8) -> bool
fn eq(a: &U56x8, b: &U56x8) -> bool
Taken from https://sourceforge.net/p/ed448goldilocks/code/ci/master/tree/src/per_field/f_generic.tmpl.c
type BaseType = U56x8
source§fn from_u64(x: u64) -> U56x8
fn from_u64(x: u64) -> U56x8
Returns the element
x * 1
where 1 is the multiplicative neutral element.source§fn from_base_type(x: U56x8) -> U56x8
fn from_base_type(x: U56x8) -> U56x8
Takes as input an element of BaseType and returns the internal representation
of that element in the field.
fn pow<T>(a: &Self::BaseType, exponent: T) -> Self::BaseTypewhere
T: IsUnsignedInteger,
source§impl IsPrimeField for P448GoldilocksPrimeField
impl IsPrimeField for P448GoldilocksPrimeField
type RepresentativeType = UnsignedInteger<7>
source§fn representative(a: &U56x8) -> U448
fn representative(a: &U56x8) -> U448
Returns the integer representative in
the range [0, p-1], where p the modulus
source§fn from_hex(hex_string: &str) -> Result<Self::BaseType, CreationError>
fn from_hex(hex_string: &str) -> Result<Self::BaseType, CreationError>
Creates a BaseType from a Hex String
0x is optional
Returns an
CreationError::InvalidHexString
if the value is not a hexstringsource§fn field_bit_size() -> usize
fn field_bit_size() -> usize
Returns the number of bits of the max element of the field, as per field documentation, not internal representation.
This is
log2(max FE)
rounded upfn modulus_minus_one() -> Self::RepresentativeType
fn legendre_symbol(a: &Self::BaseType) -> LegendreSymbol
source§impl PartialEq for P448GoldilocksPrimeField
impl PartialEq for P448GoldilocksPrimeField
impl Eq for P448GoldilocksPrimeField
impl StructuralPartialEq for P448GoldilocksPrimeField
Auto Trait Implementations§
impl Freeze for P448GoldilocksPrimeField
impl RefUnwindSafe for P448GoldilocksPrimeField
impl Send for P448GoldilocksPrimeField
impl Sync for P448GoldilocksPrimeField
impl Unpin for P448GoldilocksPrimeField
impl UnwindSafe for P448GoldilocksPrimeField
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more