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

Safe HaskellNone
LanguageHaskell2010

Pairing.Hash

Synopsis

Documentation

swEncBN :: (MonadIO m, MonadRandom m) => ByteString -> m (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