[][src]Trait hash2curve::HashToCurveXof

pub trait HashToCurveXof {
    type Output;
    fn encode_to_curve_xof<X: ExtendableOutput + Input + Reset + Default>(
        &self,
        data: &[u8]
    ) -> Result<Self::Output, HashingError>;
fn hash_to_curve_xof<X: ExtendableOutput + Input + Reset + Default>(
        &self,
        data: &[u8]
    ) -> Result<Self::Output, HashingError>; }

The HashToCurveXof trait specifies an interface common for mapping to curve functions using XMD to expand the message.

Associated Types

type Output

The return type by the underlying hash to curve implementation

Loading content...

Required methods

fn encode_to_curve_xof<X: ExtendableOutput + Input + Reset + Default>(
    &self,
    data: &[u8]
) -> Result<Self::Output, HashingError>

Nonuniform encoding. This function encodes byte strings to points in G. The distribution of the output is not uniformly random in G.

fn hash_to_curve_xof<X: ExtendableOutput + Input + Reset + Default>(
    &self,
    data: &[u8]
) -> Result<Self::Output, HashingError>

Random oracle encoding (hash_to_curve). This function encodes byte strings to points in G. This function is suitable for applications requiring a random oracle returning points in G, provided that map_to_curve is "well distributed".

Loading content...

Implementors

impl HashToCurveXof for Bls12381G1Sswu[src]

type Output = G1

Loading content...