pub trait CubicExtConfig:
'static
+ Send
+ Sync
+ Sized {
type BasePrimeField: PrimeField;
type BaseField: Field<BasePrimeField = Self::BasePrimeField>;
type FrobCoeff: Field;
const SQRT_PRECOMP: Option<SqrtPrecomputation<CubicExtField<Self>>>;
const DEGREE_OVER_BASE_PRIME_FIELD: usize;
const NONRESIDUE: Self::BaseField;
const FROBENIUS_COEFF_C1: &'static [Self::FrobCoeff];
const FROBENIUS_COEFF_C2: &'static [Self::FrobCoeff];
// Required method
fn mul_base_field_by_frob_coeff(
c1: &mut Self::BaseField,
c2: &mut Self::BaseField,
power: usize,
);
// Provided methods
fn mul_base_field_by_nonresidue_in_place(
fe: &mut Self::BaseField,
) -> &mut Self::BaseField { ... }
fn mul_base_field_by_nonresidue(fe: Self::BaseField) -> Self::BaseField { ... }
}
Expand description
Defines a Cubic extension field from a cubic non-residue.
Required Associated Constants§
Sourceconst SQRT_PRECOMP: Option<SqrtPrecomputation<CubicExtField<Self>>>
const SQRT_PRECOMP: Option<SqrtPrecomputation<CubicExtField<Self>>>
Determines the algorithm for computing square roots.
Sourceconst DEGREE_OVER_BASE_PRIME_FIELD: usize
const DEGREE_OVER_BASE_PRIME_FIELD: usize
The degree of the extension over the base prime field.
Sourceconst NONRESIDUE: Self::BaseField
const NONRESIDUE: Self::BaseField
The cubic non-residue used to construct the extension.
Sourceconst FROBENIUS_COEFF_C1: &'static [Self::FrobCoeff]
const FROBENIUS_COEFF_C1: &'static [Self::FrobCoeff]
Coefficients for the Frobenius automorphism.
const FROBENIUS_COEFF_C2: &'static [Self::FrobCoeff]
Required Associated Types§
Sourcetype BasePrimeField: PrimeField
type BasePrimeField: PrimeField
The prime field that this cubic extension is eventually an extension of.
Sourcetype BaseField: Field<BasePrimeField = Self::BasePrimeField>
type BaseField: Field<BasePrimeField = Self::BasePrimeField>
The base field that this field is a cubic extension of.
Note: while for simple instances of cubic extensions such as Fp3
we might see BaseField == BasePrimeField
, it won’t always hold true.
E.g. for an extension tower: BasePrimeField == Fp
, but BaseField == Fp2
.
Required Methods§
Sourcefn mul_base_field_by_frob_coeff(
c1: &mut Self::BaseField,
c2: &mut Self::BaseField,
power: usize,
)
fn mul_base_field_by_frob_coeff( c1: &mut Self::BaseField, c2: &mut Self::BaseField, power: usize, )
A specializable method for multiplying an element of the base field by the appropriate Frobenius coefficient.
Provided Methods§
Sourcefn mul_base_field_by_nonresidue_in_place(
fe: &mut Self::BaseField,
) -> &mut Self::BaseField
fn mul_base_field_by_nonresidue_in_place( fe: &mut Self::BaseField, ) -> &mut Self::BaseField
A specializable method for multiplying an element of the base field by the quadratic non-residue. This is used in multiplication and squaring.
Sourcefn mul_base_field_by_nonresidue(fe: Self::BaseField) -> Self::BaseField
fn mul_base_field_by_nonresidue(fe: Self::BaseField) -> Self::BaseField
A defaulted method for multiplying an element of the base field by the quadratic non-residue. This is used in multiplication and squaring.
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.