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 Types§
sourcetype Fp: PrimeField
type Fp: PrimeField
Base prime field underlying this extension.
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.
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