Trait ark_ff::fields::models::quadratic_extension::QuadExtParameters [−][src]
pub trait QuadExtParameters: 'static + Send + Sync + Sized { type BasePrimeField: PrimeField; type BaseField: Field<BasePrimeField = Self::BasePrimeField>; type FrobCoeff: Field; const DEGREE_OVER_BASE_PRIME_FIELD: usize; const NONRESIDUE: Self::BaseField; const FROBENIUS_COEFF_C1: &'static [Self::FrobCoeff]; fn mul_base_field_by_frob_coeff(fe: &mut Self::BaseField, power: usize); fn mul_base_field_by_nonresidue(fe: &Self::BaseField) -> Self::BaseField { ... } fn add_and_mul_base_field_by_nonresidue(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField { ... } fn add_and_mul_base_field_by_nonresidue_plus_one(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField { ... } fn sub_and_mul_base_field_by_nonresidue(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField { ... } fn cyclotomic_exp(
fe: &QuadExtField<Self>,
exponent: impl AsRef<[u64]>
) -> QuadExtField<Self> { ... } }
Expand description
Defines a Quadratic extension field from a quadratic non-residue.
Associated Types
The prime field that this quadratic extension is eventually an extension of.
type BaseField: Field<BasePrimeField = Self::BasePrimeField>
[src]
type BaseField: Field<BasePrimeField = Self::BasePrimeField>
[src]The base field that this field is a quadratic extension of.
Associated Constants
const DEGREE_OVER_BASE_PRIME_FIELD: usize
[src]
const DEGREE_OVER_BASE_PRIME_FIELD: usize
[src]The degree of the extension over the base prime field.
const NONRESIDUE: Self::BaseField
[src]
const NONRESIDUE: Self::BaseField
[src]The quadratic non-residue used to construct the extension.
const FROBENIUS_COEFF_C1: &'static [Self::FrobCoeff]
[src]
const FROBENIUS_COEFF_C1: &'static [Self::FrobCoeff]
[src]Coefficients for the Frobenius automorphism.
Required methods
fn mul_base_field_by_frob_coeff(fe: &mut Self::BaseField, power: usize)
[src]
fn mul_base_field_by_frob_coeff(fe: &mut Self::BaseField, power: usize)
[src]A specializable method for multiplying an element of the base field by the appropriate Frobenius coefficient.
Provided methods
fn mul_base_field_by_nonresidue(fe: &Self::BaseField) -> Self::BaseField
[src]
fn mul_base_field_by_nonresidue(fe: &Self::BaseField) -> Self::BaseField
[src]A specializable method for multiplying an element of the base field by the quadratic non-residue. This is used in Karatsuba multiplication and in complex squaring.
fn add_and_mul_base_field_by_nonresidue(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField
[src]
fn add_and_mul_base_field_by_nonresidue(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField
[src]A specializable method for computing x + mul_base_field_by_nonresidue(y) This allows for optimizations when the non-residue is canonically negative in the field.
fn add_and_mul_base_field_by_nonresidue_plus_one(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField
[src]
fn add_and_mul_base_field_by_nonresidue_plus_one(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField
[src]A specializable method for computing x + mul_base_field_by_nonresidue(y) + y This allows for optimizations when the non-residue is not -1.
fn sub_and_mul_base_field_by_nonresidue(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField
[src]
fn sub_and_mul_base_field_by_nonresidue(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField
[src]A specializable method for computing x - mul_base_field_by_nonresidue(y) This allows for optimizations when the non-residue is canonically negative in the field.
fn cyclotomic_exp(
fe: &QuadExtField<Self>,
exponent: impl AsRef<[u64]>
) -> QuadExtField<Self>
[src]
fn cyclotomic_exp(
fe: &QuadExtField<Self>,
exponent: impl AsRef<[u64]>
) -> QuadExtField<Self>
[src]A specializable method for exponentiating that is to be used
only when fe
is known to be in the cyclotommic subgroup.
Implementors
type BasePrimeField = P::Fp
fn add_and_mul_base_field_by_nonresidue(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField
[src]fn add_and_mul_base_field_by_nonresidue_plus_one(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField
[src]fn sub_and_mul_base_field_by_nonresidue(
x: &Self::BaseField,
y: &Self::BaseField
) -> Self::BaseField
[src]type BasePrimeField = <P::Fp2Params as Fp2Parameters>::Fp
type FrobCoeff = Self::BasePrimeField
type BasePrimeField = <P::Fp3Params as Fp3Parameters>::Fp
type FrobCoeff = Self::BasePrimeField
type BasePrimeField = <<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp
type FrobCoeff = Fp2<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params>