pub trait MapToCurve<T: CurveGroup>: Sized {
// Required methods
fn check_parameters() -> Result<(), HashToCurveError>;
fn map_to_curve(point: T::BaseField) -> Result<T::Affine, HashToCurveError>;
}
Expand description
Trait for mapping a random field element to a random curve point.
Required Methods§
Sourcefn check_parameters() -> Result<(), HashToCurveError>
fn check_parameters() -> Result<(), HashToCurveError>
Checks whether supplied parameters represent a valid map.
Sourcefn map_to_curve(point: T::BaseField) -> Result<T::Affine, HashToCurveError>
fn map_to_curve(point: T::BaseField) -> Result<T::Affine, HashToCurveError>
Map an arbitrary field element to a corresponding 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.