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