Trait ark_ec::CurveGroup

source ·
pub trait CurveGroup: Group + Add<Self::Affine, Output = Self> + AddAssign<Self::Affine> + VariableBaseMSM + ScalarMul<MulBase = Self::Affine> + From<Self::Affine> + Into<Self::Affine> + Sum<Self::Affine> + for<'a> Sum<&'a Self::Affine> {
    type Config: CurveConfig<ScalarField = Self::ScalarField, BaseField = Self::BaseField>;
    type BaseField: Field;
    type Affine: AffineRepr<Config = Self::Config, Group = Self, ScalarField = Self::ScalarField, BaseField = Self::BaseField> + From<Self> + Into<Self>;
    type FullGroup;

    // Required method
    fn normalize_batch(v: &[Self]) -> Vec<Self::Affine>;

    // Provided method
    fn into_affine(self) -> Self::Affine { ... }
}
Expand description

An opaque representation of an elliptic curve group element that is suitable for efficient group arithmetic.

The point is guaranteed to be in the correct prime order subgroup.

Required Associated Types§

source

type Config: CurveConfig<ScalarField = Self::ScalarField, BaseField = Self::BaseField>

source

type BaseField: Field

The field over which this curve is defined.

source

type Affine: AffineRepr<Config = Self::Config, Group = Self, ScalarField = Self::ScalarField, BaseField = Self::BaseField> + From<Self> + Into<Self>

The affine representation of this element.

source

type FullGroup

Type representing an element of the full elliptic curve group, not just the prime order subgroup.

Required Methods§

source

fn normalize_batch(v: &[Self]) -> Vec<Self::Affine>

Normalizes a slice of group elements into affine.

Provided Methods§

source

fn into_affine(self) -> Self::Affine

Converts self into the affine representation.

Implementors§

source§

impl<P: SWCurveConfig> CurveGroup for ark_ec::models::short_weierstrass::Projective<P>

§

type Config = P

§

type BaseField = <P as CurveConfig>::BaseField

§

type Affine = Affine<P>

§

type FullGroup = Affine<P>

source§

impl<P: TECurveConfig> CurveGroup for ark_ec::models::twisted_edwards::Projective<P>

§

type Config = P

§

type BaseField = <P as CurveConfig>::BaseField

§

type Affine = Affine<P>

§

type FullGroup = Affine<P>