Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Bindings with class.
Synopsis
- class (IsCurve c, Demote meth) => ToCurve meth c where
- toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint c))
- class (KnownNat (SerializedSize p), KnownNat (CompressedSize p)) => IsPoint p where
- toAffine :: Point p -> IO (Affine p)
- fromAffine :: Affine p -> IO (Point p)
- affSerialize :: Affine p -> IO (SizedByteArray (SerializedSize p) Bytes)
- affCompress :: Affine p -> IO (SizedByteArray (CompressedSize p) Bytes)
- uncompress :: ByteArrayAccess ba => SizedByteArray (CompressedSize p) ba -> IO (Either BlstError (Affine p))
- addOrDoubleAffine :: Point p -> Affine p -> IO (Point p)
- deserialize :: ByteArrayAccess ba => SizedByteArray (SerializedSize p) ba -> IO (Either BlstError (Affine p))
- class (IsPoint (CurveToMsgPoint c), IsPoint (CurveToPkPoint c)) => IsCurve c where
- skToPkPoint :: Scalar -> IO (Point (CurveToPkPoint c))
- signPk :: Point (CurveToMsgPoint c) -> Scalar -> IO (Point (CurveToMsgPoint c))
- coreVerifyPk :: (ByteArrayAccess ba, ByteArrayAccess ba2) => Affine (CurveToPkPoint c) -> Affine (CurveToMsgPoint c) -> EncodeMethod -> ba -> Maybe ba2 -> IO BlstError
- pairingChkNAggrPk :: ByteArrayAccess ba => PairingCtx -> Affine (CurveToPkPoint c) -> Bool -> Maybe (Affine (CurveToMsgPoint c)) -> Bool -> ba -> IO BlstError
- type family CompressedSize p = r | r -> p where ...
- type family SerializedSize p = r | r -> p where ...
- type family CurveToMsgPoint c = r | r -> c where ...
- type family CurveToPkPoint c = r | r -> c where ...
- data Curve
Documentation
class (IsCurve c, Demote meth) => ToCurve meth c where Source #
Class for encoding/hashing to curve.
toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint c)) Source #
Instances
ToCurve 'Encode 'G1 Source # | |
Defined in Crypto.BLST.Internal.Classy toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint 'G1)) Source # | |
ToCurve 'Encode 'G2 Source # | |
Defined in Crypto.BLST.Internal.Classy toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint 'G2)) Source # | |
ToCurve 'Hash 'G1 Source # | |
Defined in Crypto.BLST.Internal.Classy toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint 'G1)) Source # | |
ToCurve 'Hash 'G2 Source # | |
Defined in Crypto.BLST.Internal.Classy toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint 'G2)) Source # |
class (KnownNat (SerializedSize p), KnownNat (CompressedSize p)) => IsPoint p where Source #
Class for operations on points.
toAffine :: Point p -> IO (Affine p) Source #
fromAffine :: Affine p -> IO (Point p) Source #
affSerialize :: Affine p -> IO (SizedByteArray (SerializedSize p) Bytes) Source #
affCompress :: Affine p -> IO (SizedByteArray (CompressedSize p) Bytes) Source #
uncompress :: ByteArrayAccess ba => SizedByteArray (CompressedSize p) ba -> IO (Either BlstError (Affine p)) Source #
addOrDoubleAffine :: Point p -> Affine p -> IO (Point p) Source #
deserialize :: ByteArrayAccess ba => SizedByteArray (SerializedSize p) ba -> IO (Either BlstError (Affine p)) Source #
Instances
class (IsPoint (CurveToMsgPoint c), IsPoint (CurveToPkPoint c)) => IsCurve c where Source #
Class for operations on curves.
skToPkPoint :: Scalar -> IO (Point (CurveToPkPoint c)) Source #
signPk :: Point (CurveToMsgPoint c) -> Scalar -> IO (Point (CurveToMsgPoint c)) Source #
coreVerifyPk :: (ByteArrayAccess ba, ByteArrayAccess ba2) => Affine (CurveToPkPoint c) -> Affine (CurveToMsgPoint c) -> EncodeMethod -> ba -> Maybe ba2 -> IO BlstError Source #
pairingChkNAggrPk :: ByteArrayAccess ba => PairingCtx -> Affine (CurveToPkPoint c) -> Bool -> Maybe (Affine (CurveToMsgPoint c)) -> Bool -> ba -> IO BlstError Source #
Instances
type family CompressedSize p = r | r -> p where ... Source #
Size of compressed serialized point.
type family SerializedSize p = r | r -> p where ... Source #
Size of serialized point.
type family CurveToMsgPoint c = r | r -> c where ... Source #
Message/signature point depending on the curve.
CurveToMsgPoint 'G1 = 'P2 | |
CurveToMsgPoint 'G2 = 'P1 |
type family CurveToPkPoint c = r | r -> c where ... Source #
Public key point type depending on the curve.
CurveToPkPoint 'G1 = 'P1 | |
CurveToPkPoint 'G2 = 'P2 |