ark_ec

Trait CurveGroup

Source
pub trait CurveGroup:
    PrimeGroup
    + Add<Self::Affine, Output = Self>
    + AddAssign<Self::Affine>
    + Sub<Self::Affine, Output = Self>
    + SubAssign<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.

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§

Source§

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

Source§

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