pub struct Goldilocks64Field;
Expand description
Goldilocks Prime Field F_p where p = 2^64 - 2^32 + 1;
Implementations§
Trait Implementations§
source§impl Clone for Goldilocks64Field
impl Clone for Goldilocks64Field
source§fn clone(&self) -> Goldilocks64Field
fn clone(&self) -> Goldilocks64Field
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 Goldilocks64Field
impl Debug for Goldilocks64Field
source§impl HasQuadraticNonResidue<Goldilocks64Field> for Goldilocks64Field
impl HasQuadraticNonResidue<Goldilocks64Field> for Goldilocks64Field
fn residue() -> FieldElement<Goldilocks64Field>
source§impl Hash for Goldilocks64Field
impl Hash for Goldilocks64Field
source§impl IsField for Goldilocks64Field
impl IsField for Goldilocks64Field
source§fn eq(a: &u64, b: &u64) -> bool
fn eq(a: &u64, b: &u64) -> bool
Returns a boolean indicating whether a
and b
are equal or not.
source§fn from_u64(x: u64) -> u64
fn from_u64(x: u64) -> u64
Returns the element x * 1
where 1 is the multiplicative neutral element.
source§fn from_base_type(x: u64) -> u64
fn from_base_type(x: u64) -> u64
Takes as input an element of BaseType and returns the internal representation of that element in the field.
type BaseType = u64
fn pow<T>(a: &Self::BaseType, exponent: T) -> Self::BaseTypewhere
T: IsUnsignedInteger,
source§impl IsPrimeField for Goldilocks64Field
impl IsPrimeField for Goldilocks64Field
type RepresentativeType = u64
source§fn representative(x: &u64) -> u64
fn representative(x: &u64) -> u64
Returns the integer representative in
the range [0, p-1], where p the modulus
source§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 upsource§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 hexstringfn modulus_minus_one() -> Self::RepresentativeType
fn legendre_symbol(a: &Self::BaseType) -> LegendreSymbol
source§impl Ord for Goldilocks64Field
impl Ord for Goldilocks64Field
source§fn cmp(&self, other: &Goldilocks64Field) -> Ordering
fn cmp(&self, other: &Goldilocks64Field) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Goldilocks64Field
impl PartialEq for Goldilocks64Field
source§impl PartialOrd for Goldilocks64Field
impl PartialOrd for Goldilocks64Field
impl Copy for Goldilocks64Field
impl Eq for Goldilocks64Field
impl StructuralPartialEq for Goldilocks64Field
Auto Trait Implementations§
impl Freeze for Goldilocks64Field
impl RefUnwindSafe for Goldilocks64Field
impl Send for Goldilocks64Field
impl Sync for Goldilocks64Field
impl Unpin for Goldilocks64Field
impl UnwindSafe for Goldilocks64Field
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