pub trait IsEllipticCurve {
    type BaseField: IsField + Clone + Debug;
    type PointRepresentation: IsGroup + FromAffine<Self::BaseField>;

    // Required method
    fn generator() -> Self::PointRepresentation;

    // Provided method
    fn create_point_from_affine(
        x: FieldElement<Self::BaseField>,
        y: FieldElement<Self::BaseField>
    ) -> Result<Self::PointRepresentation, EllipticCurveError> { ... }
}

Required Associated Types§

source

type BaseField: IsField + Clone + Debug

BaseField is the field used for each of the coordinates of a point p belonging to the curve.

source

type PointRepresentation: IsGroup + FromAffine<Self::BaseField>

The representation of the point. For example it can be projective coordinates, affine coordinates, XYZZ, depending on the curve and its possible optimizations.

Required Methods§

source

fn generator() -> Self::PointRepresentation

Returns the generator of the main subgroup.

Provided Methods§

Implementors§