[−][src]Trait hash2curve::HashToCurveXof
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
Required methods
fn encode_to_curve_xof<X: ExtendableOutput + Input + Reset + Default>(
&self,
data: &[u8]
) -> Result<Self::Output, HashingError>
&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>
&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".
Implementors
impl HashToCurveXof for Bls12381G1Sswu
[src]
type Output = G1
fn encode_to_curve_xof<X: ExtendableOutput + Input + Reset + Default>(
&self,
data: &[u8]
) -> Result<Self::Output, HashingError>
[src]
&self,
data: &[u8]
) -> Result<Self::Output, HashingError>
fn hash_to_curve_xof<X: ExtendableOutput + Input + Reset + Default>(
&self,
data: &[u8]
) -> Result<Self::Output, HashingError>
[src]
&self,
data: &[u8]
) -> Result<Self::Output, HashingError>