hsblst-0.0.2: Haskell bindings to BLST
Safe HaskellSafe-Inferred
LanguageHaskell2010

Crypto.BLST.Internal.Classy

Description

Bindings with class.

Synopsis

Documentation

class (IsCurve c, Demote meth) => ToCurve meth c where Source #

Class for encoding/hashing to curve.

Methods

toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint c)) Source #

Instances

Instances details
ToCurve 'Encode 'G1 Source # 
Instance details

Defined in Crypto.BLST.Internal.Classy

Methods

toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint 'G1)) Source #

ToCurve 'Encode 'G2 Source # 
Instance details

Defined in Crypto.BLST.Internal.Classy

Methods

toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint 'G2)) Source #

ToCurve 'Hash 'G1 Source # 
Instance details

Defined in Crypto.BLST.Internal.Classy

Methods

toCurve :: (ByteArrayAccess ba, ByteArrayAccess ba2) => ba -> Maybe ba2 -> IO (Point (CurveToMsgPoint 'G1)) Source #

ToCurve 'Hash 'G2 Source # 
Instance details

Defined in Crypto.BLST.Internal.Classy

Methods

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.

class (IsPoint (CurveToMsgPoint c), IsPoint (CurveToPkPoint c)) => IsCurve c where Source #

Class for operations on curves.

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.

type family CurveToPkPoint c = r | r -> c where ... Source #

Public key point type depending on the curve.

Equations

CurveToPkPoint 'G1 = 'P1 
CurveToPkPoint 'G2 = 'P2 

data Curve Source #

Curve data kind.

Constructors

G1 
G2 

Instances

Instances details
Demote 'G1 Source # 
Instance details

Defined in Crypto.BLST.Internal.Classy

Methods

demote :: k Source #

Demote 'G2 Source # 
Instance details

Defined in Crypto.BLST.Internal.Classy

Methods

demote :: k Source #