pairing-0.3.1: Optimal ate pairing over Barreto-Naehrig curves

Safe HaskellNone
LanguageHaskell2010

Pairing.Hash

Synopsis

Documentation

swEncBN :: MonadRandom m => ByteString -> m (Maybe (Point Fq)) Source #

Encodes a given byte string to a point on the BN curve. The implemenation uses the Shallue van de Woestijne encoding to BN curves as specifed 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 Definiton 2 of the paper is sent to an arbitrary point on the curve