HashToCurve

Trait HashToCurve 

Source
pub trait HashToCurve {
    type Output;

    // Required method
    fn hash(
        &self,
        domain: &[u8],
        message: &[u8],
    ) -> Result<Self::Output, BLSError>;
}
Expand description

Trait for hashing arbitrary data to a group element on an elliptic curve

Required Associated Types§

Source

type Output

The type of the curve being used.

Required Methods§

Source

fn hash(&self, domain: &[u8], message: &[u8]) -> Result<Self::Output, BLSError>

Given a domain separator and a message, produces a hash of them which is a curve point.

Implementors§

Source§

impl<'a, H, P> HashToCurve for TryAndIncrement<'a, H, P>
where H: Hasher<Error = BLSError>, P: SWModelParameters,