Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pairing.Serialize.Types
Description
Base API for Point serialisation for G1, G2 and GT
Documentation
class MkCompressedForm a where Source #
Methods
serializeCompressed :: (ByteRepr b, FromX b, Ord b) => a -> Point b -> Maybe LByteString Source #
The serialisation may fail if y cannot be obtained from x
Instances
MkCompressedForm MCLWASM Source # | |
Defined in Pairing.Serialize.MCLWasm Methods serializeCompressed :: (ByteRepr b, FromX b, Ord b) => MCLWASM -> Point b -> Maybe LByteString Source # | |
MkCompressedForm Jivsov Source # | |
Defined in Pairing.Serialize.Jivsov Methods serializeCompressed :: (ByteRepr b, FromX b, Ord b) => Jivsov -> Point b -> Maybe LByteString Source # |
class MkUncompressedForm a where Source #
Methods
serializePointUncompressed :: (ByteRepr b, FromX b, Eq b) => a -> Point b -> Maybe LByteString Source #
serializeUncompressed :: ByteRepr c => a -> c -> Maybe LByteString Source #
Instances
MkUncompressedForm Jivsov Source # | |
Defined in Pairing.Serialize.Jivsov Methods serializePointUncompressed :: (ByteRepr b, FromX b, Eq b) => Jivsov -> Point b -> Maybe LByteString Source # serializeUncompressed :: ByteRepr c => Jivsov -> c -> Maybe LByteString Source # |
class FromSerialisedForm a where Source #
Methods
unserializePoint :: (ByteRepr b, FromX b, Ord b, Show b, Validate (Point b)) => a -> Point b -> LByteString -> Either Text (Point b) Source #
Instances
FromSerialisedForm MCLWASM Source # | |
FromSerialisedForm Jivsov Source # | |
class FromUncompressedForm a where Source #
Methods
unserialize :: (ByteRepr b, Validate b, Eq b, Show b) => a -> b -> LByteString -> Either Text b Source #
Instances
FromUncompressedForm Jivsov Source # | |
Defined in Pairing.Serialize.Jivsov |
minReprLength :: Int Source #
buildPoint :: ByteRepr a => a -> ByteOrderLength -> ByteString -> ByteOrderLength -> ByteString -> Maybe (Point a) Source #