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