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§
sourcetype BaseField: IsField + Clone + Debug
type BaseField: IsField + Clone + Debug
BaseField is the field used for each of the coordinates of a point p belonging to the curve.
sourcetype PointRepresentation: IsGroup + FromAffine<Self::BaseField>
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§
sourcefn generator() -> Self::PointRepresentation
fn generator() -> Self::PointRepresentation
Returns the generator of the main subgroup.
Provided Methods§
sourcefn create_point_from_affine(
x: FieldElement<Self::BaseField>,
y: FieldElement<Self::BaseField>,
) -> Result<Self::PointRepresentation, EllipticCurveError>
fn create_point_from_affine( x: FieldElement<Self::BaseField>, y: FieldElement<Self::BaseField>, ) -> Result<Self::PointRepresentation, EllipticCurveError>
Returns an affine point.
Object Safety§
This trait is not object safe.