Trait pasta_curves::arithmetic::CurveAffine[][src]

pub trait CurveAffine: PrimeCurveAffine<Scalar = Self::ScalarExt, Curve = Self::CurveExt> + Default + Add<Output = <Self as PrimeCurveAffine>::Curve> + Sub<Output = <Self as PrimeCurveAffine>::Curve> + ConditionallySelectable + ConstantTimeEq + From<<Self as PrimeCurveAffine>::Curve> {
    type ScalarExt: FieldExt;
    type Base: FieldExt;
    type CurveExt: CurveExt<AffineExt = Self, ScalarExt = <Self as CurveAffine>::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; fn read<R: Read>(reader: &mut R) -> Result<Self> { ... }
fn write<W: Write>(&self, writer: &mut W) -> Result<()> { ... } }
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.

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$.

Provided methods

Reads a compressed element from the buffer and attempts to parse it using from_bytes.

Writes an element in compressed form to the buffer.

Implementors