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 Types§

source

type BasePrimeField: PrimeField

The prime field that this cubic extension is eventually an extension of.

source

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.

source

type FrobCoeff: Field

The type of the coefficients for an efficient implementation of the Frobenius endomorphism.

Required Associated Constants§

source

const SQRT_PRECOMP: Option<SqrtPrecomputation<CubicExtField<Self>>>

Determines the algorithm for computing square roots.

source

const DEGREE_OVER_BASE_PRIME_FIELD: usize

The degree of the extension over the base prime field.

source

const NONRESIDUE: Self::BaseField

The cubic non-residue used to construct the extension.

source

const FROBENIUS_COEFF_C1: &'static [Self::FrobCoeff]

Coefficients for the Frobenius automorphism.

source

const FROBENIUS_COEFF_C2: &'static [Self::FrobCoeff]

Required Methods§

source

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§

source

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.

source

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.

Implementors§

source§

impl<P: Fp3Config> CubicExtConfig for Fp3ConfigWrapper<P>

§

type BasePrimeField = <P as Fp3Config>::Fp

§

type BaseField = <P as Fp3Config>::Fp

§

type FrobCoeff = <P as Fp3Config>::Fp

source§

const DEGREE_OVER_BASE_PRIME_FIELD: usize = 3usize

source§

const NONRESIDUE: Self::BaseField = P::NONRESIDUE

source§

const SQRT_PRECOMP: Option<SqrtPrecomputation<CubicExtField<Self>>> = _

source§

const FROBENIUS_COEFF_C1: &'static [Self::FrobCoeff] = P::FROBENIUS_COEFF_FP3_C1

source§

const FROBENIUS_COEFF_C2: &'static [Self::FrobCoeff] = P::FROBENIUS_COEFF_FP3_C2

source§

impl<P: Fp6Config> CubicExtConfig for Fp6ConfigWrapper<P>

§

type BasePrimeField = <<P as Fp6Config>::Fp2Config as Fp2Config>::Fp

§

type BaseField = QuadExtField<Fp2ConfigWrapper<<P as Fp6Config>::Fp2Config>>

§

type FrobCoeff = QuadExtField<Fp2ConfigWrapper<<P as Fp6Config>::Fp2Config>>

source§

const SQRT_PRECOMP: Option<SqrtPrecomputation<CubicExtField<Self>>> = P::SQRT_PRECOMP

source§

const DEGREE_OVER_BASE_PRIME_FIELD: usize = 6usize

source§

const NONRESIDUE: Self::BaseField = P::NONRESIDUE

source§

const FROBENIUS_COEFF_C1: &'static [Self::FrobCoeff] = P::FROBENIUS_COEFF_FP6_C1

source§

const FROBENIUS_COEFF_C2: &'static [Self::FrobCoeff] = P::FROBENIUS_COEFF_FP6_C2