pairing-1.0.0: Bilinear pairings

Safe HaskellNone
LanguageHaskell2010

Data.Pairing.Hash

Contents

Synopsis

Documentation

Shallue-van de Woestijne encoding to BLS12 curves

swEncBLS12 :: forall e m q r u v w. (MonadRandom m, ECPairing e q r u v w) => ByteString -> m (Maybe (G1 e)) Source #

Encodes a given byte string to a point on the BLS12 curve.

The implementation uses the Shallue-van de Woestijne encoding to BLS12 curves as specified in Section 3 of Fast and simple constant-time hashing to the BLS12-381 elliptic curve.

This function is not implemented yet.

Shallue-van de Woestijne encoding to BN curves

swEncBN :: forall e m q r u v w. (MonadRandom m, ECPairing e q r u v w) => ByteString -> m (Maybe (G1 e)) Source #

Encodes a given byte string to a point on the BN curve.

The implementation uses the Shallue-van de Woestijne encoding to BN curves as specified in Section 6 of Indifferentiable Hashing to Barreto-Naehrig Curves.

This function evaluates an empty bytestring or one that contains NUL to zero and is sent to an arbitrary point on the curve.