pairing-0.5.0: Bilinear pairings

Safe HaskellNone
LanguageHaskell2010

Pairing.Hash

Synopsis

Documentation

swEncBN :: MonadRandom m => ByteString -> m (Maybe G1) 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 by Pierre-Alain Fouque and Mehdi Tibouchi. This function evaluates an empty bytestring or one that contains NUL to zero, which according to Definition 2 of the paper is sent to an arbitrary point on the curve.