pub trait Fp3Config:
'static
+ Send
+ Sync
+ Sized {
type Fp: PrimeField;
const NONRESIDUE: Self::Fp;
const FROBENIUS_COEFF_FP3_C1: &'static [Self::Fp];
const FROBENIUS_COEFF_FP3_C2: &'static [Self::Fp];
const TWO_ADICITY: u32;
const TRACE_MINUS_ONE_DIV_TWO: &'static [u64];
const QUADRATIC_NONRESIDUE_TO_T: Fp3<Self>;
// Provided method
fn mul_fp_by_nonresidue_in_place(fe: &mut Self::Fp) -> &mut Self::Fp { ... }
}
Expand description
Trait that specifies constants and methods for defining degree-three extension fields.
Required Associated Constants§
Sourceconst NONRESIDUE: Self::Fp
const NONRESIDUE: Self::Fp
Cubic non-residue in Self::Fp
used to construct the extension
field. That is, NONRESIDUE
is such that the cubic polynomial
f(X) = X^3 - Self::NONRESIDUE
in Fp[X] is irreducible in Self::Fp
.
const FROBENIUS_COEFF_FP3_C1: &'static [Self::Fp]
const FROBENIUS_COEFF_FP3_C2: &'static [Self::Fp]
Sourceconst TWO_ADICITY: u32
const TWO_ADICITY: u32
p^3 - 1 = 2^s * t, where t is odd.
const TRACE_MINUS_ONE_DIV_TWO: &'static [u64]
Sourceconst QUADRATIC_NONRESIDUE_TO_T: Fp3<Self>
const QUADRATIC_NONRESIDUE_TO_T: Fp3<Self>
t-th power of a quadratic nonresidue in Fp3.
Required Associated Types§
Sourcetype Fp: PrimeField
type Fp: PrimeField
Base prime field underlying this extension.
Provided Methods§
Sourcefn mul_fp_by_nonresidue_in_place(fe: &mut Self::Fp) -> &mut Self::Fp
fn mul_fp_by_nonresidue_in_place(fe: &mut Self::Fp) -> &mut Self::Fp
Return fe * Self::NONRESIDUE
.
The default implementation can be specialized if Self::NONRESIDUE
has a special
structure that can speed up multiplication
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.