pub trait MapToCurve: CurveArithmetic<ProjectivePoint: CofactorGroup<Subgroup = Self::ProjectivePoint>> {
type SecurityLevel: Unsigned;
type FieldElement: Reduce<Array<u8, Self::Length>> + Default + Copy;
type Length: ArraySize + NonZero;
// Required method
fn map_to_curve(element: Self::FieldElement) -> ProjectivePoint<Self>;
}Expand description
Trait for converting field elements into a point via a mapping method like Simplified Shallue-van de Woestijne-Ulas or Elligator.
Required Associated Types§
Sourcetype SecurityLevel: Unsigned
type SecurityLevel: Unsigned
The target security level in bytes: https://www.rfc-editor.org/rfc/rfc9380.html#section-8.9-2.2 https://www.rfc-editor.org/rfc/rfc9380.html#name-target-security-levels
Required Methods§
Sourcefn map_to_curve(element: Self::FieldElement) -> ProjectivePoint<Self>
fn map_to_curve(element: Self::FieldElement) -> ProjectivePoint<Self>
Map a field element into a curve 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.