pub struct MontyField31<MP: MontyParameters> { /* private fields */ }
Implementations§
Source§impl<MP: MontyParameters + TwoAdicData> MontyField31<MP>
impl<MP: MontyParameters + TwoAdicData> MontyField31<MP>
pub fn backward_fft(a: &mut [Self], root_table: &[Vec<Self>])
Source§impl<MP: FieldParameters + TwoAdicData> MontyField31<MP>
impl<MP: FieldParameters + TwoAdicData> MontyField31<MP>
Sourcepub fn roots_of_unity_table(n: usize) -> Vec<Vec<Self>>
pub fn roots_of_unity_table(n: usize) -> Vec<Vec<Self>>
Given a field element gen
of order n where n = 2^lg_n
,
return a vector of vectors table
where table[i] is the
vector of twiddle factors for an fft of length n/2^i. The values
gen^0 = 1 are skipped, as are g_i^k for k >= i/2 as these are
just the negatives of the other roots (using g_i^{i/2} = -1).
Source§impl<MP: MontyParameters + TwoAdicData> MontyField31<MP>
impl<MP: MontyParameters + TwoAdicData> MontyField31<MP>
pub fn forward_fft(a: &mut [Self], root_table: &[Vec<Self>])
Source§impl<MP: MontyParameters> MontyField31<MP>
impl<MP: MontyParameters> MontyField31<MP>
pub const fn new(value: u32) -> Self
Sourcepub const fn new_array<const N: usize>(input: [u32; N]) -> [Self; N]
pub const fn new_array<const N: usize>(input: [u32; N]) -> [Self; N]
Convert a constant u32 array into a constant array of field elements. Constant version of array.map(MontyField31::new).
Sourcepub const fn new_2d_array<const N: usize, const M: usize>(
input: [[u32; N]; M],
) -> [[Self; N]; M]
pub const fn new_2d_array<const N: usize, const M: usize>( input: [[u32; N]; M], ) -> [[Self; N]; M]
Convert a constant 2d u32 array into a constant 2d array of field elements. Constant version of array.map(MontyField31::new_array).
Sourcepub const fn mul_2exp_neg_n(&self, n: u32) -> Self
pub const fn mul_2exp_neg_n(&self, n: u32) -> Self
Multiply the given MontyField31 element by 2^{-n}
.
This makes use of the fact that, as the monty constant is 2^32
,
the monty form of 2^{-n}
is 2^{32 - n}
. Monty reduction works
provided the input is < 2^32P
so this works for 0 <= n <= 32
.
Trait Implementations§
Source§impl<FP: FieldParameters> AbstractField for MontyField31<FP>
impl<FP: FieldParameters> AbstractField for MontyField31<FP>
const ZERO: Self = FP::MONTY_ZERO
const ONE: Self = FP::MONTY_ONE
const TWO: Self = FP::MONTY_TWO
const NEG_ONE: Self = FP::MONTY_NEG_ONE
type F = MontyField31<FP>
fn from_f(f: Self::F) -> Self
Source§fn from_canonical_u8(n: u8) -> Self
fn from_canonical_u8(n: u8) -> Self
u8
. Read moreSource§fn from_canonical_u16(n: u16) -> Self
fn from_canonical_u16(n: u16) -> Self
u16
. Read moreSource§fn from_canonical_u32(n: u32) -> Self
fn from_canonical_u32(n: u32) -> Self
u32
. Read moreSource§fn from_canonical_u64(n: u64) -> Self
fn from_canonical_u64(n: u64) -> Self
u64
. Read moreSource§fn from_canonical_usize(n: usize) -> Self
fn from_canonical_usize(n: usize) -> Self
usize
. Read morefn from_wrapped_u32(n: u32) -> Self
fn from_wrapped_u64(n: u64) -> Self
Source§fn mul_2exp_u64(&self, exp: u64) -> Self
fn mul_2exp_u64(&self, exp: u64) -> 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 morefn double(&self) -> Self
fn square(&self) -> Self
fn cube(&self) -> Self
fn exp_const_u64<const POWER: u64>(&self) -> Self
fn exp_power_of_2(&self, power_log: usize) -> Self
fn powers(&self) -> Powers<Self>
fn shifted_powers(&self, start: Self) -> Powers<Self>
fn powers_packed<P>(&self) -> PackedPowers<Self, P>where
P: PackedField<Scalar = Self>,
fn shifted_powers_packed<P>(&self, start: Self) -> PackedPowers<Self, P>where
P: PackedField<Scalar = Self>,
fn dot_product<const N: usize>(u: &[Self; N], v: &[Self; N]) -> Self
fn try_div<Rhs>(self, rhs: Rhs) -> Option<Self::Output>
Source§impl<PMP: PackedMontyParameters> Add<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
impl<PMP: PackedMontyParameters> Add<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
Source§type Output = PackedMontyField31Neon<PMP>
type Output = PackedMontyField31Neon<PMP>
+
operator.Source§fn add(self, rhs: MontyField31<PMP>) -> Self
fn add(self, rhs: MontyField31<PMP>) -> Self
+
operation. Read moreSource§impl<PMP: PackedMontyParameters> Add<PackedMontyField31Neon<PMP>> for MontyField31<PMP>
impl<PMP: PackedMontyParameters> Add<PackedMontyField31Neon<PMP>> for MontyField31<PMP>
Source§type Output = PackedMontyField31Neon<PMP>
type Output = PackedMontyField31Neon<PMP>
+
operator.Source§fn add(self, rhs: PackedMontyField31Neon<PMP>) -> PackedMontyField31Neon<PMP>
fn add(self, rhs: PackedMontyField31Neon<PMP>) -> PackedMontyField31Neon<PMP>
+
operation. Read moreSource§impl<FP: MontyParameters> Add for MontyField31<FP>
impl<FP: MontyParameters> Add for MontyField31<FP>
Source§impl<PMP: PackedMontyParameters> AddAssign<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
impl<PMP: PackedMontyParameters> AddAssign<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
Source§fn add_assign(&mut self, rhs: MontyField31<PMP>)
fn add_assign(&mut self, rhs: MontyField31<PMP>)
+=
operation. Read moreSource§impl<FP: MontyParameters> AddAssign for MontyField31<FP>
impl<FP: MontyParameters> AddAssign for MontyField31<FP>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+=
operation. Read moreSource§impl<const WIDTH: usize, FP> BinomiallyExtendable<WIDTH> for MontyField31<FP>where
FP: BinomialExtensionData<WIDTH> + FieldParameters,
impl<const WIDTH: usize, FP> BinomiallyExtendable<WIDTH> for MontyField31<FP>where
FP: BinomialExtensionData<WIDTH> + FieldParameters,
Source§impl<MP: Clone + MontyParameters> Clone for MontyField31<MP>
impl<MP: Clone + MontyParameters> Clone for MontyField31<MP>
Source§fn clone(&self) -> MontyField31<MP>
fn clone(&self) -> MontyField31<MP>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<FP: MontyParameters> Debug for MontyField31<FP>
impl<FP: MontyParameters> Debug for MontyField31<FP>
Source§impl<MP: Default + MontyParameters> Default for MontyField31<MP>
impl<MP: Default + MontyParameters> Default for MontyField31<MP>
Source§fn default() -> MontyField31<MP>
fn default() -> MontyField31<MP>
Source§impl<'de, FP: FieldParameters> Deserialize<'de> for MontyField31<FP>
impl<'de, FP: FieldParameters> Deserialize<'de> for MontyField31<FP>
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Source§impl<FP: MontyParameters> Display for MontyField31<FP>
impl<FP: MontyParameters> Display for MontyField31<FP>
Source§impl<FP: MontyParameters> Distribution<MontyField31<FP>> for Standard
impl<FP: MontyParameters> Distribution<MontyField31<FP>> for Standard
Source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> MontyField31<FP>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> MontyField31<FP>
T
, using rng
as the source of randomness.Source§fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
T
, using rng
as
the source of randomness. Read moreSource§impl<FP: FieldParameters> Div<MontyField31<FP>> for PackedMontyField31Neon<FP>
impl<FP: FieldParameters> Div<MontyField31<FP>> for PackedMontyField31Neon<FP>
Source§type Output = PackedMontyField31Neon<FP>
type Output = PackedMontyField31Neon<FP>
/
operator.Source§fn div(self, rhs: MontyField31<FP>) -> Self
fn div(self, rhs: MontyField31<FP>) -> Self
/
operation. Read moreSource§impl<FP: FieldParameters> Div for MontyField31<FP>
impl<FP: FieldParameters> Div for MontyField31<FP>
Source§impl<FP, const WIDTH: usize, const D: u64> ExternalLayer<MontyField31<FP>, WIDTH, D> for Poseidon2ExternalLayerMonty31<FP, WIDTH>where
FP: FieldParameters,
impl<FP, const WIDTH: usize, const D: u64> ExternalLayer<MontyField31<FP>, WIDTH, D> for Poseidon2ExternalLayerMonty31<FP, WIDTH>where
FP: FieldParameters,
Source§fn permute_state_initial(&self, state: &mut [MontyField31<FP>; WIDTH])
fn permute_state_initial(&self, state: &mut [MontyField31<FP>; WIDTH])
Perform the initial external layers of the Poseidon2 permutation on the given state.
Source§fn permute_state_terminal(&self, state: &mut [MontyField31<FP>; WIDTH])
fn permute_state_terminal(&self, state: &mut [MontyField31<FP>; WIDTH])
Perform the terminal external layers of the Poseidon2 permutation on the given state.
Source§impl<FP: FieldParameters> Field for MontyField31<FP>
impl<FP: FieldParameters> Field for MontyField31<FP>
Source§const GENERATOR: Self = FP::MONTY_GEN
const GENERATOR: Self = FP::MONTY_GEN
type Packing = PackedMontyField31Neon<FP>
Source§fn exp_u64_generic<AF: AbstractField<F = Self>>(val: AF, power: u64) -> AF
fn exp_u64_generic<AF: AbstractField<F = Self>>(val: AF, power: u64) -> AF
u64
power. This is similar to exp_u64
, but more general in that it
can be used with AbstractField
s, not just this concrete field. Read moreSource§fn try_inverse(&self) -> Option<Self>
fn try_inverse(&self) -> Option<Self>
Source§fn halve(&self) -> Self
fn halve(&self) -> Self
fn order() -> BigUint
fn is_zero(&self) -> bool
fn is_one(&self) -> bool
Source§fn div_2exp_u64(&self, exp: u64) -> Self
fn div_2exp_u64(&self, exp: u64) -> Self
fn inverse(&self) -> Self
Source§fn multiplicative_group_factors() -> Vec<(BigUint, usize)>
fn multiplicative_group_factors() -> Vec<(BigUint, usize)>
fn bits() -> usize
Source§impl<PMP: PackedMontyParameters> From<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
impl<PMP: PackedMontyParameters> From<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
Source§fn from(value: MontyField31<PMP>) -> Self
fn from(value: MontyField31<PMP>) -> Self
Source§impl<const WIDTH: usize, FP> HasTwoAdicBionmialExtension<WIDTH> for MontyField31<FP>
impl<const WIDTH: usize, FP> HasTwoAdicBionmialExtension<WIDTH> for MontyField31<FP>
const EXT_TWO_ADICITY: usize = _
Source§fn ext_two_adic_generator(bits: usize) -> [Self; WIDTH]
fn ext_two_adic_generator(bits: usize) -> [Self; WIDTH]
bits
powers of two, otherwise the
behavior is undefined.Source§impl<MP: Hash + MontyParameters> Hash for MontyField31<MP>
impl<MP: Hash + MontyParameters> Hash for MontyField31<MP>
Source§impl<FP, const WIDTH: usize, P2P, const D: u64> InternalLayer<MontyField31<FP>, WIDTH, D> for Poseidon2InternalLayerMonty31<FP, WIDTH, P2P>where
FP: FieldParameters,
P2P: InternalLayerParameters<FP, WIDTH>,
impl<FP, const WIDTH: usize, P2P, const D: u64> InternalLayer<MontyField31<FP>, WIDTH, D> for Poseidon2InternalLayerMonty31<FP, WIDTH, P2P>where
FP: FieldParameters,
P2P: InternalLayerParameters<FP, WIDTH>,
Source§fn permute_state(&self, state: &mut [MontyField31<FP>; WIDTH])
fn permute_state(&self, state: &mut [MontyField31<FP>; WIDTH])
Perform the internal layers of the Poseidon2 permutation on the given state.
Source§impl<PMP: PackedMontyParameters> Mul<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
impl<PMP: PackedMontyParameters> Mul<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
Source§type Output = PackedMontyField31Neon<PMP>
type Output = PackedMontyField31Neon<PMP>
*
operator.Source§fn mul(self, rhs: MontyField31<PMP>) -> Self
fn mul(self, rhs: MontyField31<PMP>) -> Self
*
operation. Read moreSource§impl<PMP: PackedMontyParameters> Mul<PackedMontyField31Neon<PMP>> for MontyField31<PMP>
impl<PMP: PackedMontyParameters> Mul<PackedMontyField31Neon<PMP>> for MontyField31<PMP>
Source§type Output = PackedMontyField31Neon<PMP>
type Output = PackedMontyField31Neon<PMP>
*
operator.Source§fn mul(self, rhs: PackedMontyField31Neon<PMP>) -> PackedMontyField31Neon<PMP>
fn mul(self, rhs: PackedMontyField31Neon<PMP>) -> PackedMontyField31Neon<PMP>
*
operation. Read moreSource§impl<FP: MontyParameters> Mul for MontyField31<FP>
impl<FP: MontyParameters> Mul for MontyField31<FP>
Source§impl<PMP: PackedMontyParameters> MulAssign<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
impl<PMP: PackedMontyParameters> MulAssign<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
Source§fn mul_assign(&mut self, rhs: MontyField31<PMP>)
fn mul_assign(&mut self, rhs: MontyField31<PMP>)
*=
operation. Read moreSource§impl<FP: MontyParameters> MulAssign for MontyField31<FP>
impl<FP: MontyParameters> MulAssign for MontyField31<FP>
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*=
operation. Read moreSource§impl<FP: FieldParameters> Neg for MontyField31<FP>
impl<FP: FieldParameters> Neg for MontyField31<FP>
Source§impl<FP: MontyParameters> Ord for MontyField31<FP>
impl<FP: MontyParameters> Ord for MontyField31<FP>
Source§impl<MP: PartialEq + MontyParameters> PartialEq for MontyField31<MP>
impl<MP: PartialEq + MontyParameters> PartialEq for MontyField31<MP>
Source§impl<FP: MontyParameters> PartialOrd for MontyField31<FP>
impl<FP: MontyParameters> PartialOrd for MontyField31<FP>
Source§impl<FP: FieldParameters> PrimeField for MontyField31<FP>
impl<FP: FieldParameters> PrimeField for MontyField31<FP>
fn as_canonical_biguint(&self) -> BigUint
Source§impl<FP: FieldParameters> PrimeField32 for MontyField31<FP>
impl<FP: FieldParameters> PrimeField32 for MontyField31<FP>
Source§impl<FP: FieldParameters> PrimeField64 for MontyField31<FP>
impl<FP: FieldParameters> PrimeField64 for MontyField31<FP>
Source§impl<FP: FieldParameters> Product<MontyField31<FP>> for PackedMontyField31Neon<FP>
impl<FP: FieldParameters> Product<MontyField31<FP>> for PackedMontyField31Neon<FP>
Source§fn product<I>(iter: I) -> Selfwhere
I: Iterator<Item = MontyField31<FP>>,
fn product<I>(iter: I) -> Selfwhere
I: Iterator<Item = MontyField31<FP>>,
Self
from the elements by multiplying
the items.Source§impl<FP: FieldParameters> Product for MontyField31<FP>
impl<FP: FieldParameters> Product for MontyField31<FP>
Source§impl<FP: FieldParameters> Serialize for MontyField31<FP>
impl<FP: FieldParameters> Serialize for MontyField31<FP>
Source§impl<PMP: PackedMontyParameters> Sub<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
impl<PMP: PackedMontyParameters> Sub<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
Source§type Output = PackedMontyField31Neon<PMP>
type Output = PackedMontyField31Neon<PMP>
-
operator.Source§fn sub(self, rhs: MontyField31<PMP>) -> Self
fn sub(self, rhs: MontyField31<PMP>) -> Self
-
operation. Read moreSource§impl<PMP: PackedMontyParameters> Sub<PackedMontyField31Neon<PMP>> for MontyField31<PMP>
impl<PMP: PackedMontyParameters> Sub<PackedMontyField31Neon<PMP>> for MontyField31<PMP>
Source§type Output = PackedMontyField31Neon<PMP>
type Output = PackedMontyField31Neon<PMP>
-
operator.Source§fn sub(self, rhs: PackedMontyField31Neon<PMP>) -> PackedMontyField31Neon<PMP>
fn sub(self, rhs: PackedMontyField31Neon<PMP>) -> PackedMontyField31Neon<PMP>
-
operation. Read moreSource§impl<FP: MontyParameters> Sub for MontyField31<FP>
impl<FP: MontyParameters> Sub for MontyField31<FP>
Source§impl<PMP: PackedMontyParameters> SubAssign<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
impl<PMP: PackedMontyParameters> SubAssign<MontyField31<PMP>> for PackedMontyField31Neon<PMP>
Source§fn sub_assign(&mut self, rhs: MontyField31<PMP>)
fn sub_assign(&mut self, rhs: MontyField31<PMP>)
-=
operation. Read moreSource§impl<FP: MontyParameters> SubAssign for MontyField31<FP>
impl<FP: MontyParameters> SubAssign for MontyField31<FP>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-=
operation. Read moreSource§impl<FP: FieldParameters> Sum<MontyField31<FP>> for PackedMontyField31Neon<FP>
impl<FP: FieldParameters> Sum<MontyField31<FP>> for PackedMontyField31Neon<FP>
Source§fn sum<I>(iter: I) -> Selfwhere
I: Iterator<Item = MontyField31<FP>>,
fn sum<I>(iter: I) -> Selfwhere
I: Iterator<Item = MontyField31<FP>>,
Self
from the elements by “summing up”
the items.Source§impl<FP: MontyParameters> Sum for MontyField31<FP>
impl<FP: MontyParameters> Sum for MontyField31<FP>
Source§impl<FP: FieldParameters + TwoAdicData> TwoAdicField for MontyField31<FP>
impl<FP: FieldParameters + TwoAdicData> TwoAdicField for MontyField31<FP>
Source§const TWO_ADICITY: usize = FP::TWO_ADICITY
const TWO_ADICITY: usize = FP::TWO_ADICITY
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<MP: MontyParameters + FieldParameters + TwoAdicData> TwoAdicSubgroupDft<MontyField31<MP>> for RecursiveDft<MontyField31<MP>>
impl<MP: MontyParameters + FieldParameters + TwoAdicData> TwoAdicSubgroupDft<MontyField31<MP>> for RecursiveDft<MontyField31<MP>>
DFT implementation that uses DIT for the inverse “backward” direction and DIF for the “forward” direction.
The API mandates that the LDE is applied column-wise on the row-major input. This is awkward for memory coherence, so the algorithm here transposes the input and operates on the rows in the typical way, then transposes back again for the output. Even for modestly large inputs, the cost of the two tranposes outweighed by the improved performance from operating row-wise.
The choice of DIT for inverse and DIF for “forward” transform mean that a (coset) LDE
- IDFT / zero extend / DFT
expands to
- bit-reverse input
- invDFT DIT
- result is in “correct” order
- coset shift and zero extend result
- DFT DIF on result
- output is bit-reversed, as required for FRI.
Hence the only bit-reversal that needs to take place is on the input.
type Evaluations = RowIndexMappedView<BitReversalPerm, DenseMatrix<MontyField31<MP>>>
Source§fn dft_batch(&self, mat: RowMajorMatrix<MontyField31<MP>>) -> Self::Evaluations
fn dft_batch(&self, mat: RowMajorMatrix<MontyField31<MP>>) -> Self::Evaluations
mat
.
This is the only method an implementer needs to define, all other
methods can be derived from this one.Source§fn idft_batch(
&self,
mat: RowMajorMatrix<MontyField31<MP>>,
) -> RowMajorMatrix<MontyField31<MP>>
fn idft_batch( &self, mat: RowMajorMatrix<MontyField31<MP>>, ) -> RowMajorMatrix<MontyField31<MP>>
mat
.Source§fn coset_lde_batch(
&self,
mat: RowMajorMatrix<MontyField31<MP>>,
added_bits: usize,
shift: MontyField31<MP>,
) -> Self::Evaluations
fn coset_lde_batch( &self, mat: RowMajorMatrix<MontyField31<MP>>, added_bits: usize, shift: MontyField31<MP>, ) -> Self::Evaluations
mat
onto a coset of a larger subgroup.Source§fn coset_dft(&self, vec: Vec<F>, shift: F) -> Vec<F>
fn coset_dft(&self, vec: Vec<F>, shift: F) -> Vec<F>
vec
. This can be viewed as interpolation onto a coset of a
multiplicative subgroup, rather than the subgroup itself.Source§fn coset_dft_batch(&self, mat: DenseMatrix<F>, shift: F) -> Self::Evaluations
fn coset_dft_batch(&self, mat: DenseMatrix<F>, shift: F) -> Self::Evaluations
mat
. This can be viewed as interpolation onto a
coset of a multiplicative subgroup, rather than the subgroup itself.Source§fn coset_idft(&self, vec: Vec<F>, shift: F) -> Vec<F>
fn coset_idft(&self, vec: Vec<F>, shift: F) -> Vec<F>
vec
. This can be viewed as an inverse operation of
“coset DFT”, that interpolates over a coset of a multiplicative subgroup, rather than
subgroup itself.Source§fn coset_idft_batch(&self, mat: DenseMatrix<F>, shift: F) -> DenseMatrix<F>
fn coset_idft_batch(&self, mat: DenseMatrix<F>, shift: F) -> DenseMatrix<F>
mat
. This can be viewed as an inverse operation
of “coset DFT”, that interpolates over a coset of a multiplicative subgroup, rather than the
subgroup itself.Source§fn lde(&self, vec: Vec<F>, added_bits: usize) -> Vec<F>
fn lde(&self, vec: Vec<F>, added_bits: usize) -> Vec<F>
vec
onto a larger subgroup.Source§fn lde_batch(&self, mat: DenseMatrix<F>, added_bits: usize) -> Self::Evaluations
fn lde_batch(&self, mat: DenseMatrix<F>, added_bits: usize) -> Self::Evaluations
mat
onto a larger subgroup.impl<MP: Copy + MontyParameters> Copy for MontyField31<MP>
impl<MP: Eq + MontyParameters> Eq for MontyField31<MP>
impl<FP: MontyParameters, MU: MDSUtils> MdsPermutation<MontyField31<FP>, 12> for MdsMatrixMontyField31<MU>
impl<FP: MontyParameters, MU: MDSUtils> MdsPermutation<MontyField31<FP>, 16> for MdsMatrixMontyField31<MU>
impl<FP: BarrettParameters, MU: MDSUtils> MdsPermutation<MontyField31<FP>, 24> for MdsMatrixMontyField31<MU>
impl<FP: BarrettParameters, MU: MDSUtils> MdsPermutation<MontyField31<FP>, 32> for MdsMatrixMontyField31<MU>
impl<FP: BarrettParameters, MU: MDSUtils> MdsPermutation<MontyField31<FP>, 64> for MdsMatrixMontyField31<MU>
impl<FP: MontyParameters, MU: MDSUtils> MdsPermutation<MontyField31<FP>, 8> for MdsMatrixMontyField31<MU>
impl<FP: FieldParameters> Packable for MontyField31<FP>
impl<MP: MontyParameters> StructuralPartialEq for MontyField31<MP>
Auto Trait Implementations§
impl<MP> Freeze for MontyField31<MP>
impl<MP> RefUnwindSafe for MontyField31<MP>where
MP: RefUnwindSafe,
impl<MP> Send for MontyField31<MP>
impl<MP> Sync for MontyField31<MP>
impl<MP> Unpin for MontyField31<MP>where
MP: Unpin,
impl<MP> UnwindSafe for MontyField31<MP>where
MP: UnwindSafe,
Blanket Implementations§
Source§impl<AF> AbstractExtensionField<AF> for AFwhere
AF: AbstractField,
impl<AF> AbstractExtensionField<AF> for AFwhere
AF: AbstractField,
const D: usize = 1usize
fn from_base(b: AF) -> AF
Source§fn from_base_slice(bs: &[AF]) -> AF
fn from_base_slice(bs: &[AF]) -> AF
Base
and f is an irreducible
polynomial of degree D
. This function takes a slice bs
of
length at exactly D, and constructs the field element
\sum_i bs[i] * X^i. Read morefn from_base_iter<I>(iter: I) -> AFwhere
I: Iterator<Item = AF>,
Source§fn from_base_fn<F>(f: F) -> AF
fn from_base_fn<F>(f: F) -> AF
core:array::from_fn
, with the same caveats as
from_base_slice
.Source§fn as_base_slice(&self) -> &[AF]
fn as_base_slice(&self) -> &[AF]
Base
and f is an irreducible
polynomial of degree D
. This function takes a field element
\sum_i bs[i] * X^i and returns the coefficients as a slice
bs
of length at most D containing, from lowest degree to
highest. Read moreSource§fn monomial(exponent: usize) -> Self
fn monomial(exponent: usize) -> Self
Base
and f is an irreducible
polynomial of degree D
. This function returns the field
element X^exponent
if exponent < D
and panics otherwise.
(The fact that f is not known at the point that this function
is defined prevents implementing exponentiation of higher
powers since the reduction cannot be performed.) Read moreSource§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<F> ExtensionField<F> for Fwhere
F: Field,
impl<F> ExtensionField<F> for Fwhere
F: Field,
type ExtensionPacking = <F as Field>::Packing
fn is_in_basefield(&self) -> bool
fn as_base(&self) -> Option<Base>
fn ext_powers_packed(&self) -> impl Iterator<Item = Self::ExtensionPacking>
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 more