pub struct Goldilocks { /* private fields */ }Expand description
The prime field known as Goldilocks, defined as F_p where p = 2^64 - 2^32 + 1.
Note that the safety of deriving Serialize and Deserialize relies on the fact that the internal value can be any u64.
Implementations§
Source§impl Goldilocks
impl Goldilocks
Sourcepub const TWO_ADIC_GENERATORS: [Self; 33]
pub const TWO_ADIC_GENERATORS: [Self; 33]
A list of generators for the two-adic subgroups of the goldilocks field.
These satisfy the properties that TWO_ADIC_GENERATORS[0] = 1 and TWO_ADIC_GENERATORS[i+1]^2 = TWO_ADIC_GENERATORS[i].
Trait Implementations§
Source§impl Add for Goldilocks
impl Add for Goldilocks
Source§impl<T: Into<Self>> AddAssign<T> for Goldilocks
impl<T: Into<Self>> AddAssign<T> for Goldilocks
Source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
+= operation. Read moreSource§impl BinomiallyExtendable<2> for Goldilocks
impl BinomiallyExtendable<2> for Goldilocks
Source§impl BinomiallyExtendable<5> for Goldilocks
impl BinomiallyExtendable<5> for Goldilocks
Source§impl BinomiallyExtendableAlgebra<Goldilocks, 2> for Goldilocks
impl BinomiallyExtendableAlgebra<Goldilocks, 2> for Goldilocks
Source§fn binomial_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D], w: F)
fn binomial_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D], w: F)
A<X> / (X^D - W). Read moreSource§fn binomial_add(a: &[Self; D], b: &[Self; D]) -> [Self; D]
fn binomial_add(a: &[Self; D], b: &[Self; D]) -> [Self; D]
A<X> / (X^D - W). Read moreSource§fn binomial_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D]
fn binomial_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D]
A<X> / (X^D - W). Read morefn binomial_base_mul(lhs: [Self; D], rhs: Self) -> [Self; D]
Source§impl BinomiallyExtendableAlgebra<Goldilocks, 5> for Goldilocks
impl BinomiallyExtendableAlgebra<Goldilocks, 5> for Goldilocks
Source§fn binomial_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D], w: F)
fn binomial_mul(a: &[Self; D], b: &[Self; D], res: &mut [Self; D], w: F)
A<X> / (X^D - W). Read moreSource§fn binomial_add(a: &[Self; D], b: &[Self; D]) -> [Self; D]
fn binomial_add(a: &[Self; D], b: &[Self; D]) -> [Self; D]
A<X> / (X^D - W). Read moreSource§fn binomial_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D]
fn binomial_sub(a: &[Self; D], b: &[Self; D]) -> [Self; D]
A<X> / (X^D - W). Read morefn binomial_base_mul(lhs: [Self; D], rhs: Self) -> [Self; D]
Source§impl Clone for Goldilocks
impl Clone for Goldilocks
Source§fn clone(&self) -> Goldilocks
fn clone(&self) -> Goldilocks
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Convolve<Goldilocks, i128, i64, i128> for SmallConvolveGoldilocks
impl Convolve<Goldilocks, i128, i64, i128> for SmallConvolveGoldilocks
Source§fn read(input: Goldilocks) -> i128
fn read(input: Goldilocks) -> i128
Return the lift of a Goldilocks element, 0 <= input.value <= P < 2^64. We widen immediately, since some valid Goldilocks elements don’t fit in an i64, and since in any case overflow can occur for even the smallest convolutions.
Source§fn parity_dot<const N: usize>(u: [i128; N], v: [i64; N]) -> i128
fn parity_dot<const N: usize>(u: [i128; N], v: [i64; N]) -> i128
For a convolution of size N, |x| < N * 2^64 and (as per the
assumption above), |y| < 2^51. So the product is at most N *
2^115 which will not overflow for N <= 16. We widen y at
this point to perform the multiplication.
Source§fn reduce(z: i128) -> Goldilocks
fn reduce(z: i128) -> Goldilocks
The assumptions above mean z < N^2 * 2^115, which is at most 2^123 when N <= 16.
NB: Even though intermediate values could be negative, the output must be non-negative since the inputs were non-negative.
fn conv3(lhs: [T; 3], rhs: [U; 3], output: &mut [V])
fn negacyclic_conv3(lhs: [T; 3], rhs: [U; 3], output: &mut [V])
fn conv4(lhs: [T; 4], rhs: [U; 4], output: &mut [V])
fn negacyclic_conv4(lhs: [T; 4], rhs: [U; 4], output: &mut [V])
fn conv6(lhs: [T; 6], rhs: [U; 6], output: &mut [V])
fn negacyclic_conv6(lhs: [T; 6], rhs: [U; 6], output: &mut [V])
fn conv8(lhs: [T; 8], rhs: [U; 8], output: &mut [V])
fn negacyclic_conv8(lhs: [T; 8], rhs: [U; 8], output: &mut [V])
fn conv12(lhs: [T; 12], rhs: [U; 12], output: &mut [V])
fn negacyclic_conv12(lhs: [T; 12], rhs: [U; 12], output: &mut [V])
fn conv16(lhs: [T; 16], rhs: [U; 16], output: &mut [V])
fn negacyclic_conv16(lhs: [T; 16], rhs: [U; 16], output: &mut [V])
fn conv24(lhs: [T; 24], rhs: [U; 24], output: &mut [V])
fn conv32(lhs: [T; 32], rhs: [U; 32], output: &mut [V])
fn negacyclic_conv32(lhs: [T; 32], rhs: [U; 32], output: &mut [V])
fn conv64(lhs: [T; 64], rhs: [U; 64], output: &mut [V])
Source§impl Debug for Goldilocks
impl Debug for Goldilocks
Source§impl Default for Goldilocks
impl Default for Goldilocks
Source§fn default() -> Goldilocks
fn default() -> Goldilocks
Source§impl<'de> Deserialize<'de> for Goldilocks
impl<'de> Deserialize<'de> for Goldilocks
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for Goldilocks
impl Display for Goldilocks
Source§impl Distribution<Goldilocks> for StandardUniform
impl Distribution<Goldilocks> for StandardUniform
Source§impl Div for Goldilocks
impl Div for Goldilocks
Source§type Output = Goldilocks
type Output = Goldilocks
/ operator.Source§fn div(self, rhs: Goldilocks) -> Self
fn div(self, rhs: Goldilocks) -> Self
/ operation. Read moreSource§impl DivAssign for Goldilocks
impl DivAssign for Goldilocks
Source§fn div_assign(&mut self, rhs: Goldilocks)
fn div_assign(&mut self, rhs: Goldilocks)
/= operation. Read moreSource§impl<const WIDTH: usize> ExternalLayerConstructor<Goldilocks, WIDTH> for Poseidon2ExternalLayerGoldilocks<WIDTH>
impl<const WIDTH: usize> ExternalLayerConstructor<Goldilocks, WIDTH> for Poseidon2ExternalLayerGoldilocks<WIDTH>
Source§fn new_from_constants(
external_constants: ExternalLayerConstants<Goldilocks, WIDTH>,
) -> Self
fn new_from_constants( external_constants: ExternalLayerConstants<Goldilocks, WIDTH>, ) -> Self
Source§impl<const WIDTH: usize> ExternalLayerConstructor<Goldilocks, WIDTH> for Poseidon2ExternalLayerGoldilocksHL<WIDTH>
impl<const WIDTH: usize> ExternalLayerConstructor<Goldilocks, WIDTH> for Poseidon2ExternalLayerGoldilocksHL<WIDTH>
Source§fn new_from_constants(
external_constants: ExternalLayerConstants<Goldilocks, WIDTH>,
) -> Self
fn new_from_constants( external_constants: ExternalLayerConstants<Goldilocks, WIDTH>, ) -> Self
Source§impl Field for Goldilocks
impl Field for Goldilocks
type Packing = Goldilocks
Source§fn is_zero(&self) -> bool
fn is_zero(&self) -> bool
Source§fn try_inverse(&self) -> Option<Self>
fn try_inverse(&self) -> Option<Self>
Source§fn is_one(&self) -> bool
fn is_one(&self) -> bool
Source§fn add_slices(slice_1: &mut [Self], slice_2: &[Self])
fn add_slices(slice_1: &mut [Self], slice_2: &[Self])
Source§impl HasTwoAdicBinomialExtension<2> for Goldilocks
impl HasTwoAdicBinomialExtension<2> for Goldilocks
Source§impl HasTwoAdicBinomialExtension<5> for Goldilocks
impl HasTwoAdicBinomialExtension<5> for Goldilocks
Source§impl Hash for Goldilocks
impl Hash for Goldilocks
Source§impl InjectiveMonomial<7> for Goldilocks
Degree of the smallest permutation polynomial for Goldilocks.
impl InjectiveMonomial<7> for Goldilocks
Degree of the smallest permutation polynomial for Goldilocks.
As p - 1 = 2^32 * 3 * 5 * 17 * … the smallest choice for a degree D satisfying gcd(p - 1, D) = 1 is 7.
Source§fn injective_exp_n(&self) -> Self
fn injective_exp_n(&self) -> Self
x -> x^n for a given n > 1 such that this
map is injective.Source§impl InternalLayerConstructor<Goldilocks> for Poseidon2InternalLayerGoldilocks
impl InternalLayerConstructor<Goldilocks> for Poseidon2InternalLayerGoldilocks
Source§fn new_from_constants(internal_constants: Vec<Goldilocks>) -> Self
fn new_from_constants(internal_constants: Vec<Goldilocks>) -> Self
Source§impl Mul for Goldilocks
impl Mul for Goldilocks
Source§impl<T: Into<Self>> MulAssign<T> for Goldilocks
impl<T: Into<Self>> MulAssign<T> for Goldilocks
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
*= operation. Read moreSource§impl Neg for Goldilocks
impl Neg for Goldilocks
Source§impl Ord for Goldilocks
impl Ord for Goldilocks
Source§impl PartialEq for Goldilocks
impl PartialEq for Goldilocks
Source§impl PartialOrd for Goldilocks
impl PartialOrd for Goldilocks
Source§impl PermutationMonomial<7> for Goldilocks
impl PermutationMonomial<7> for Goldilocks
Source§fn injective_exp_root_n(&self) -> Self
fn injective_exp_root_n(&self) -> Self
In the field Goldilocks, a^{1/7} is equal to a^{10540996611094048183}.
This follows from the calculation 7*10540996611094048183 = 4*(2^64 - 2**32) + 1 = 1 mod (p - 1).
Source§impl PrimeCharacteristicRing for Goldilocks
impl PrimeCharacteristicRing for Goldilocks
Source§type PrimeSubfield = Goldilocks
type PrimeSubfield = Goldilocks
ℤ/p where the characteristic of this ring is p.Source§fn from_prime_subfield(f: Self::PrimeSubfield) -> Self
fn from_prime_subfield(f: Self::PrimeSubfield) -> Self
Source§fn mul_2exp_u64(&self, exp: u64) -> Self
fn mul_2exp_u64(&self, exp: u64) -> Self
mul_2exp_u64(a, exp) = a * 2^{exp}. Read moreSource§fn div_2exp_u64(&self, exp: u64) -> Self
fn div_2exp_u64(&self, exp: u64) -> Self
div_2exp_u64(a, exp) = a/2^exp Read moreSource§fn sum_array<const N: usize>(input: &[Self]) -> Self
fn sum_array<const N: usize>(input: &[Self]) -> Self
Source§fn dot_product<const N: usize>(lhs: &[Self; N], rhs: &[Self; N]) -> Self
fn dot_product<const N: usize>(lhs: &[Self; N], rhs: &[Self; N]) -> Self
Source§fn zero_vec(len: usize) -> Vec<Self>
fn zero_vec(len: usize) -> Vec<Self>
len. Many operating systems zero pages
before assigning them to a userspace process. In that case, our process should not need to
write zeros, which would be redundant. However, the compiler may not always recognize this. Read moreSource§fn from_usize(int: usize) -> Self
fn from_usize(int: usize) -> Self
Source§fn from_isize(int: isize) -> Self
fn from_isize(int: isize) -> Self
Source§fn xor(&self, y: &Self) -> Self
fn xor(&self, y: &Self) -> Self
xor. Read moreSource§fn xor3(&self, y: &Self, z: &Self) -> Self
fn xor3(&self, y: &Self, z: &Self) -> Self
xor. Read moreSource§fn bool_check(&self) -> Self
fn bool_check(&self) -> Self
x * (x - 1). Read moreSource§fn exp_const_u64<const POWER: u64>(&self) -> Self
fn exp_const_u64<const POWER: u64>(&self) -> Self
Source§fn exp_power_of_2(&self, power_log: usize) -> Self
fn exp_power_of_2(&self, power_log: usize) -> Self
exp_power_of_2(a, power_log) = a^{2^power_log}. Read moreSource§fn powers(&self) -> Powers<Self>
fn powers(&self) -> Powers<Self>
self: self^0, self^1, self^2, ....Source§fn shifted_powers(&self, start: Self) -> Powers<Self>
fn shifted_powers(&self, start: Self) -> Powers<Self>
self shifted by start: start, start*self^1, start*self^2, ....Source§impl PrimeField for Goldilocks
impl PrimeField for Goldilocks
Source§fn as_canonical_biguint(&self) -> BigUint
fn as_canonical_biguint(&self) -> BigUint
value in canonical form
which lies in the range 0 <= x < self.order().Source§impl PrimeField64 for Goldilocks
impl PrimeField64 for Goldilocks
const ORDER_U64: u64 = 18_446_744_069_414_584_321u64
Source§fn as_canonical_u64(&self) -> u64
fn as_canonical_u64(&self) -> u64
value in canonical form
which lies in the range 0 <= x < ORDER_U64.Source§fn to_unique_u64(&self) -> u64
fn to_unique_u64(&self) -> u64
u64 such that any two field elements
are converted to the same u64 if and only if they represent the same value. Read moreSource§impl Product for Goldilocks
impl Product for Goldilocks
Source§impl QuotientMap<i128> for Goldilocks
impl QuotientMap<i128> for Goldilocks
Source§fn from_int(int: i128) -> Goldilocks
fn from_int(int: i128) -> Goldilocks
Convert a given i128 integer into an element of the Goldilocks field.
This checks the sign and then makes use of the equivalent method for unsigned integers. This should be avoided in performance critical locations.
Source§fn from_canonical_checked(int: i128) -> Option<Goldilocks>
fn from_canonical_checked(int: i128) -> Option<Goldilocks>
Convert a given u128 integer into an element of the Goldilocks field.
Returns None if the input does not lie in the range:[-(2^63 - 2^31), 2^63 - 2^31].
Source§unsafe fn from_canonical_unchecked(int: i128) -> Goldilocks
unsafe fn from_canonical_unchecked(int: i128) -> Goldilocks
Convert a given u128 integer into an element of the Goldilocks field.
§Safety
The input must lie in the range:[1 + 2^32 - 2^64, 2^64 - 1].
Source§impl QuotientMap<i16> for Goldilocks
impl QuotientMap<i16> for Goldilocks
Source§fn from_int(int: i16) -> Self
fn from_int(int: i16) -> Self
Convert a given i16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: i16) -> Option<Self>
fn from_canonical_checked(int: i16) -> Option<Self>
Convert a given i16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: i16) -> Self
unsafe fn from_canonical_unchecked(int: i16) -> Self
Convert a given i16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<i32> for Goldilocks
impl QuotientMap<i32> for Goldilocks
Source§fn from_int(int: i32) -> Self
fn from_int(int: i32) -> Self
Convert a given i32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: i32) -> Option<Self>
fn from_canonical_checked(int: i32) -> Option<Self>
Convert a given i32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: i32) -> Self
unsafe fn from_canonical_unchecked(int: i32) -> Self
Convert a given i32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<i64> for Goldilocks
impl QuotientMap<i64> for Goldilocks
Source§fn from_int(int: i64) -> Self
fn from_int(int: i64) -> Self
Convert a given i64 integer into an element of the Goldilocks field.
We simply need to deal with the sign.
Source§fn from_canonical_checked(int: i64) -> Option<Self>
fn from_canonical_checked(int: i64) -> Option<Self>
Convert a given i64 integer into an element of the Goldilocks field.
Returns none if the input does not lie in the range (-(2^63 - 2^31), 2^63 - 2^31).
Source§unsafe fn from_canonical_unchecked(int: i64) -> Self
unsafe fn from_canonical_unchecked(int: i64) -> Self
Convert a given i64 integer into an element of the Goldilocks field.
§Safety
In this case this function is actually always safe as the internal value is allowed to be any u64.
Source§impl QuotientMap<i8> for Goldilocks
impl QuotientMap<i8> for Goldilocks
Source§fn from_int(int: i8) -> Self
fn from_int(int: i8) -> Self
Convert a given i8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: i8) -> Option<Self>
fn from_canonical_checked(int: i8) -> Option<Self>
Convert a given i8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: i8) -> Self
unsafe fn from_canonical_unchecked(int: i8) -> Self
Convert a given i8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<u128> for Goldilocks
impl QuotientMap<u128> for Goldilocks
Source§fn from_int(int: u128) -> Goldilocks
fn from_int(int: u128) -> Goldilocks
Convert a given u128 integer into an element of the Goldilocks field.
Uses a modular reduction to reduce to canonical form. This should be avoided in performance critical locations.
Source§fn from_canonical_checked(int: u128) -> Option<Goldilocks>
fn from_canonical_checked(int: u128) -> Option<Goldilocks>
Convert a given u128 integer into an element of the Goldilocks field.
Returns None if the input does not lie in the range:[0, 2^64 - 2^32].
Source§unsafe fn from_canonical_unchecked(int: u128) -> Goldilocks
unsafe fn from_canonical_unchecked(int: u128) -> Goldilocks
Convert a given u128 integer into an element of the Goldilocks field.
§Safety
The input must lie in the range:[0, 2^64 - 1].
Source§impl QuotientMap<u16> for Goldilocks
impl QuotientMap<u16> for Goldilocks
Source§fn from_int(int: u16) -> Self
fn from_int(int: u16) -> Self
Convert a given u16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: u16) -> Option<Self>
fn from_canonical_checked(int: u16) -> Option<Self>
Convert a given u16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: u16) -> Self
unsafe fn from_canonical_unchecked(int: u16) -> Self
Convert a given u16 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<u32> for Goldilocks
impl QuotientMap<u32> for Goldilocks
Source§fn from_int(int: u32) -> Self
fn from_int(int: u32) -> Self
Convert a given u32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: u32) -> Option<Self>
fn from_canonical_checked(int: u32) -> Option<Self>
Convert a given u32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: u32) -> Self
unsafe fn from_canonical_unchecked(int: u32) -> Self
Convert a given u32 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl QuotientMap<u64> for Goldilocks
impl QuotientMap<u64> for Goldilocks
Source§fn from_int(int: u64) -> Self
fn from_int(int: u64) -> Self
Convert a given u64 integer into an element of the Goldilocks field.
No reduction is needed as the internal value is allowed to be any u64.
Source§fn from_canonical_checked(int: u64) -> Option<Self>
fn from_canonical_checked(int: u64) -> Option<Self>
Convert a given u64 integer into an element of the Goldilocks field.
Return None if the given integer is greater than p = 2^64 - 2^32 + 1.
Source§unsafe fn from_canonical_unchecked(int: u64) -> Self
unsafe fn from_canonical_unchecked(int: u64) -> Self
Convert a given u64 integer into an element of the Goldilocks field.
§Safety
In this case this function is actually always safe as the internal value is allowed to be any u64.
Source§impl QuotientMap<u8> for Goldilocks
impl QuotientMap<u8> for Goldilocks
Source§fn from_int(int: u8) -> Self
fn from_int(int: u8) -> Self
Convert a given u8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§fn from_canonical_checked(int: u8) -> Option<Self>
fn from_canonical_checked(int: u8) -> Option<Self>
Convert a given u8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§unsafe fn from_canonical_unchecked(int: u8) -> Self
unsafe fn from_canonical_unchecked(int: u8) -> Self
Convert a given u8 integer into an element of the Goldilocks field.
Due to the integer type, the input value is always canonical.
Source§impl RawDataSerializable for Goldilocks
impl RawDataSerializable for Goldilocks
Source§const NUM_BYTES: usize = 8usize
const NUM_BYTES: usize = 8usize
Source§fn into_bytes(self) -> [u8; 8]
fn into_bytes(self) -> [u8; 8]
Source§fn into_u32_stream(
input: impl IntoIterator<Item = Self>,
) -> impl IntoIterator<Item = u32>
fn into_u32_stream( input: impl IntoIterator<Item = Self>, ) -> impl IntoIterator<Item = u32>
Source§fn into_u64_stream(
input: impl IntoIterator<Item = Self>,
) -> impl IntoIterator<Item = u64>
fn into_u64_stream( input: impl IntoIterator<Item = Self>, ) -> impl IntoIterator<Item = u64>
Source§fn into_parallel_byte_streams<const N: usize>(
input: impl IntoIterator<Item = [Self; N]>,
) -> impl IntoIterator<Item = [u8; N]>
fn into_parallel_byte_streams<const N: usize>( input: impl IntoIterator<Item = [Self; N]>, ) -> impl IntoIterator<Item = [u8; N]>
Source§fn into_parallel_u32_streams<const N: usize>(
input: impl IntoIterator<Item = [Self; N]>,
) -> impl IntoIterator<Item = [u32; N]>
fn into_parallel_u32_streams<const N: usize>( input: impl IntoIterator<Item = [Self; N]>, ) -> impl IntoIterator<Item = [u32; N]>
Source§fn into_parallel_u64_streams<const N: usize>(
input: impl IntoIterator<Item = [Self; N]>,
) -> impl IntoIterator<Item = [u64; N]>
fn into_parallel_u64_streams<const N: usize>( input: impl IntoIterator<Item = [Self; N]>, ) -> impl IntoIterator<Item = [u64; N]>
Source§fn into_byte_stream(
input: impl IntoIterator<Item = Self>,
) -> impl IntoIterator<Item = u8>
fn into_byte_stream( input: impl IntoIterator<Item = Self>, ) -> impl IntoIterator<Item = u8>
Source§impl Serialize for Goldilocks
impl Serialize for Goldilocks
Source§impl Sub for Goldilocks
impl Sub for Goldilocks
Source§impl<T: Into<Self>> SubAssign<T> for Goldilocks
impl<T: Into<Self>> SubAssign<T> for Goldilocks
Source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
-= operation. Read moreSource§impl Sum for Goldilocks
impl Sum for Goldilocks
Source§impl TwoAdicField for Goldilocks
impl TwoAdicField for Goldilocks
Source§const TWO_ADICITY: usize = 32usize
const TWO_ADICITY: usize = 32usize
Source§fn two_adic_generator(bits: usize) -> Self
fn two_adic_generator(bits: usize) -> Self
2^bits.
Assumes bits <= TWO_ADICITY, otherwise the result is undefined.Source§impl UniformSamplingField for Goldilocks
impl UniformSamplingField for Goldilocks
Source§const MAX_SINGLE_SAMPLE_BITS: usize = 24usize
const MAX_SINGLE_SAMPLE_BITS: usize = 24usize
impl Copy for Goldilocks
impl Eq for Goldilocks
impl MdsPermutation<Goldilocks, 12> for MdsMatrixGoldilocks
impl MdsPermutation<Goldilocks, 16> for MdsMatrixGoldilocks
impl MdsPermutation<Goldilocks, 24> for MdsMatrixGoldilocks
impl MdsPermutation<Goldilocks, 32> for MdsMatrixGoldilocks
impl MdsPermutation<Goldilocks, 64> for MdsMatrixGoldilocks
impl MdsPermutation<Goldilocks, 68> for MdsMatrixGoldilocks
impl MdsPermutation<Goldilocks, 8> for MdsMatrixGoldilocks
impl Packable for Goldilocks
Auto Trait Implementations§
impl Freeze for Goldilocks
impl RefUnwindSafe for Goldilocks
impl Send for Goldilocks
impl Sync for Goldilocks
impl Unpin for Goldilocks
impl UnwindSafe for Goldilocks
Blanket Implementations§
Source§impl<F> BasedVectorSpace<F> for Fwhere
F: PrimeCharacteristicRing,
impl<F> BasedVectorSpace<F> for Fwhere
F: PrimeCharacteristicRing,
Source§const DIMENSION: usize = 1usize
const DIMENSION: usize = 1usize
Source§fn as_basis_coefficients_slice(&self) -> &[F]
fn as_basis_coefficients_slice(&self) -> &[F]
A and uses this to
map an element of A to a slice of DIMENSION F elements. Read moreSource§fn from_basis_coefficients_fn<Fn>(f: Fn) -> F
fn from_basis_coefficients_fn<Fn>(f: Fn) -> F
A and uses this to
map DIMENSION F elements to an element of A. Similar
to core:array::from_fn, the DIMENSION F elements are
given by Fn(0), ..., Fn(DIMENSION - 1) called in that order. Read moreSource§fn from_basis_coefficients_iter<I>(iter: I) -> Option<F>where
I: ExactSizeIterator<Item = F>,
fn from_basis_coefficients_iter<I>(iter: I) -> Option<F>where
I: ExactSizeIterator<Item = F>,
A and uses this to
map DIMENSION F elements to an element of A. Read moreSource§fn flatten_to_base(vec: Vec<F>) -> Vec<F>
fn flatten_to_base(vec: Vec<F>) -> Vec<F>
Source§fn reconstitute_from_base(vec: Vec<F>) -> Vec<F>
fn reconstitute_from_base(vec: Vec<F>) -> Vec<F>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F> ExtensionField<F> for Fwhere
F: Field,
impl<F> ExtensionField<F> for Fwhere
F: Field,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<F> PackedField for Fwhere
F: Field,
impl<F> PackedField for Fwhere
F: Field,
type Scalar = F
Source§fn packed_powers(base: Self::Scalar) -> Powers<Self>
fn packed_powers(base: Self::Scalar) -> Powers<Self>
base packed into packed field elements. Read moreSource§impl<F> PackedFieldPow2 for Fwhere
F: Field,
impl<F> PackedFieldPow2 for Fwhere
F: Field,
Source§impl<T> PackedValue for Twhere
T: Packable,
impl<T> PackedValue for Twhere
T: Packable,
Source§fn from_slice(slice: &[<T as PackedValue>::Value]) -> &T
fn from_slice(slice: &[<T as PackedValue>::Value]) -> &T
Source§fn from_slice_mut(slice: &mut [<T as PackedValue>::Value]) -> &mut T
fn from_slice_mut(slice: &mut [<T as PackedValue>::Value]) -> &mut T
Source§fn from_fn<Fn>(f: Fn) -> T
fn from_fn<Fn>(f: Fn) -> T
Source§fn as_slice(&self) -> &[<T as PackedValue>::Value]
fn as_slice(&self) -> &[<T as PackedValue>::Value]
Source§fn as_slice_mut(&mut self) -> &mut [<T as PackedValue>::Value]
fn as_slice_mut(&mut self) -> &mut [<T as PackedValue>::Value]
Source§fn pack_slice(buf: &[Self::Value]) -> &[Self]
fn pack_slice(buf: &[Self::Value]) -> &[Self]
Source§fn pack_slice_with_suffix(buf: &[Self::Value]) -> (&[Self], &[Self::Value])
fn pack_slice_with_suffix(buf: &[Self::Value]) -> (&[Self], &[Self::Value])
Source§fn pack_slice_mut(buf: &mut [Self::Value]) -> &mut [Self]
fn pack_slice_mut(buf: &mut [Self::Value]) -> &mut [Self]
Source§fn pack_maybe_uninit_slice_mut(
buf: &mut [MaybeUninit<Self::Value>],
) -> &mut [MaybeUninit<Self>]
fn pack_maybe_uninit_slice_mut( buf: &mut [MaybeUninit<Self::Value>], ) -> &mut [MaybeUninit<Self>]
Source§fn pack_slice_with_suffix_mut(
buf: &mut [Self::Value],
) -> (&mut [Self], &mut [Self::Value])
fn pack_slice_with_suffix_mut( buf: &mut [Self::Value], ) -> (&mut [Self], &mut [Self::Value])
Source§fn pack_maybe_uninit_slice_with_suffix_mut(
buf: &mut [MaybeUninit<Self::Value>],
) -> (&mut [MaybeUninit<Self>], &mut [MaybeUninit<Self::Value>])
fn pack_maybe_uninit_slice_with_suffix_mut( buf: &mut [MaybeUninit<Self::Value>], ) -> (&mut [MaybeUninit<Self>], &mut [MaybeUninit<Self::Value>])
Source§fn unpack_slice(buf: &[Self]) -> &[Self::Value]
fn unpack_slice(buf: &[Self]) -> &[Self::Value]
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<F> QuotientMap<isize> for Fwhere
F: QuotientMap<i8> + QuotientMap<i16> + QuotientMap<i32> + QuotientMap<i64> + QuotientMap<i128>,
impl<F> QuotientMap<isize> for Fwhere
F: QuotientMap<i8> + QuotientMap<i16> + QuotientMap<i32> + QuotientMap<i64> + QuotientMap<i128>,
Source§fn from_int(int: isize) -> F
fn from_int(int: isize) -> F
We use the from_int method of the primitive integer type identical to isize on this machine
Source§fn from_canonical_checked(int: isize) -> Option<F>
fn from_canonical_checked(int: isize) -> Option<F>
We use the from_canonical_checked method of the primitive integer type identical to isize on this machine
Source§unsafe fn from_canonical_unchecked(int: isize) -> F
unsafe fn from_canonical_unchecked(int: isize) -> F
We use the from_canonical_unchecked method of the primitive integer type identical to isize on this machine
Source§impl<F> QuotientMap<usize> for Fwhere
F: QuotientMap<u8> + QuotientMap<u16> + QuotientMap<u32> + QuotientMap<u64> + QuotientMap<u128>,
impl<F> QuotientMap<usize> for Fwhere
F: QuotientMap<u8> + QuotientMap<u16> + QuotientMap<u32> + QuotientMap<u64> + QuotientMap<u128>,
Source§fn from_int(int: usize) -> F
fn from_int(int: usize) -> F
We use the from_int method of the primitive integer type identical to usize on this machine
Source§fn from_canonical_checked(int: usize) -> Option<F>
fn from_canonical_checked(int: usize) -> Option<F>
We use the from_canonical_checked method of the primitive integer type identical to usize on this machine
Source§unsafe fn from_canonical_unchecked(int: usize) -> F
unsafe fn from_canonical_unchecked(int: usize) -> F
We use the from_canonical_unchecked method of the primitive integer type identical to usize on this machine