Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- swEncBN :: MonadRandom m => ByteString -> m (Maybe (Point Fq))
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