Skip to main content

CurveAffine

Trait CurveAffine 

Source
pub trait CurveAffine:
    GroupEncoding
    + Copy
    + Debug
    + Eq
    + Send
    + Sync
    + 'static
    + Neg<Output = Self>
    + Mul<<Self::Curve as Group>::Scalar, Output = Self::Curve, Output = Self::Curve>
    + for<'r> Mul<&'r <Self::Curve as Group>::Scalar> {
    type Curve: Curve<Affine = Self, Scalar = Self::Scalar>;
    type Scalar: PrimeField;

    // Required methods
    fn identity() -> Self;
    fn generator() -> Self;
    fn is_identity(&self) -> Choice;
    fn to_curve(&self) -> Self::Curve;
}
Expand description

Affine representation of an elliptic curve point.

Required Associated Types§

Source

type Curve: Curve<Affine = Self, Scalar = Self::Scalar>

The efficient representation for this elliptic curve.

Source

type Scalar: PrimeField

Scalars modulo the order of this group’s scalar field.

This associated type is temporary, and will be removed once downstream users have migrated to using Curve as the primary generic bound.

Required Methods§

Source

fn identity() -> Self

Returns the additive identity.

Source

fn generator() -> Self

Returns a fixed generator of unknown exponent.

Source

fn is_identity(&self) -> Choice

Determines if this point represents the additive identity.

Source

fn to_curve(&self) -> Self::Curve

Converts this affine point to its efficient 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§