Skip to main content

MapToCurve

Trait MapToCurve 

Source
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§

Source

type SecurityLevel: Unsigned

Source

type FieldElement: Reduce<Array<u8, Self::Length>> + Default + Copy

The field element representation for a group value with multiple elements.

Source

type Length: ArraySize + NonZero

The L parameter as specified in the RFC.

Required Methods§

Source

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.

Implementors§