pub trait CurveConfig: Send + Sync + Sized + 'static {
    type BaseField: Field;
    type ScalarField: PrimeField + Into<<Self::ScalarField as PrimeField>::BigInt>;

    const COFACTOR: &'static [u64];
    const COFACTOR_INV: Self::ScalarField;

    // Provided method
    fn cofactor_is_one() -> bool { ... }
}
Expand description

Elliptic curves can be represented via different “models” with varying efficiency properties. CurveConfig bundles together the types that are common to all models of the given curve, namely the BaseField over which the curve is defined, and the ScalarField defined by the appropriate prime-order subgroup of the curve.

Required Associated Types§

source

type BaseField: Field

Base field that the curve is defined over.

source

type ScalarField: PrimeField + Into<<Self::ScalarField as PrimeField>::BigInt>

Finite prime field corresponding to an appropriate prime-order subgroup of the curve group.

Required Associated Constants§

source

const COFACTOR: &'static [u64]

The cofactor of this curve, represented as a sequence of little-endian limbs.

source

const COFACTOR_INV: Self::ScalarField

Provided Methods§

Implementors§