pub trait MapToCurve<T>: Sizedwhere
T: CurveGroup,{
// Required methods
fn check_parameters() -> Result<(), HashToCurveError>;
fn map_to_curve(
point: <T as CurveGroup>::BaseField,
) -> Result<<T as CurveGroup>::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 as CurveGroup>::BaseField,
) -> Result<<T as CurveGroup>::Affine, HashToCurveError>
fn map_to_curve( point: <T as CurveGroup>::BaseField, ) -> Result<<T as CurveGroup>::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.