pub trait CurveAffine: PrimeCurveAffine<Scalar = Self::ScalarExt, Curve = Self::CurveExt> + Default + Add<Self, Output = Self::Curve> + Sub<Self, Output = Self::Curve> + ConditionallySelectable + ConstantTimeEq + From<Self::Curve> {
    type ScalarExt: FieldExt;
    type Base: FieldExt;
    type CurveExt: CurveExt<AffineExt = Self, ScalarExt = Self::ScalarExt>;

    fn coordinates(&self) -> CtOption<Coordinates<Self>>;
    fn from_xy(x: Self::Base, y: Self::Base) -> CtOption<Self>;
    fn is_on_curve(&self) -> Choice;
    fn a() -> Self::Base;
    fn b() -> Self::Base;
}
Expand description

This trait is the affine counterpart to Curve and is used for serialization, storage in memory, and inspection of $x$ and $y$ coordinates.

Requires the alloc feature flag because of hash_to_curve on CurveExt.

Required Associated Types

The scalar field of this elliptic curve.

The base field over which this elliptic curve is constructed.

The projective form of the curve

Required Methods

Gets the coordinates of this point.

Returns None if this is the identity.

Obtains a point given $(x, y)$, failing if it is not on the curve.

Returns whether or not this element is on the curve; should always be true unless an “unchecked” API was used.

Returns the curve constant $a$.

Returns the curve constant $b$.

Implementors