ark_test_curves

Trait CurveConfig

Source
pub trait CurveConfig:
    Sized
    + Send
    + Sync
    + '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 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

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.

Provided Methods§

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.

Implementors§