[][src]Trait hash2curve::HashToCurveXmd

pub trait HashToCurveXmd {
    type Output;
    fn encode_to_curve_xmd<D: BlockInput + Digest<OutputSize = U32>>(
        &self,
        data: &[u8]
    ) -> Result<Self::Output, HashingError>;
fn hash_to_curve_xmd<D: BlockInput + Digest<OutputSize = U32>>(
        &self,
        data: &[u8]
    ) -> Result<Self::Output, HashingError>; }

The HashToCurveXmd 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_xmd<D: BlockInput + Digest<OutputSize = U32>>(
    &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_xmd<D: BlockInput + Digest<OutputSize = U32>>(
    &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 HashToCurveXmd for Bls12381G1Sswu[src]

type Output = G1

Loading content...