pairing-1.1.0: Bilinear pairings

Safe HaskellNone
LanguageHaskell2010

Data.Pairing

Contents

Synopsis

Pairings

class (Arbitrary (G1 e), Arbitrary (G2 e), Arbitrary (GT e), Eq (G1 e), Eq (G2 e), Eq (GT e), Generic (G1 e), Generic (G2 e), Generic (GT e), Group (G1 e), Group (G2 e), Group (GT e), NFData (G1 e), NFData (G2 e), NFData (GT e), Random (G1 e), Random (G2 e), Random (GT e), Show (G1 e), Show (G2 e), Show (GT e)) => Pairing e where Source #

Pairings of general cryptographic groups.

Let G1 and G2 be additive cyclic groups of prime order r, and GT be a multiplicative cyclic group of prime order r.

Then the pairing is defined to be of type G1 x G2 -> GT, and satisfies bilinearity, non-degeneracy, and computability.

Associated Types

type G1 e = (g :: *) | g -> e Source #

Left group G1.

type G2 e = (g :: *) | g -> e Source #

Right group G2.

type GT e = (g :: *) | g -> e Source #

Target group GT.

Methods

pairing :: G1 e -> G2 e -> GT e Source #

Computable non-degenerate bilinear map.

Instances
Pairing BN462 Source # 
Instance details

Defined in Data.Pairing.BN462

Associated Types

type G1 BN462 = (g :: Type) Source #

type G2 BN462 = (g :: Type) Source #

type GT BN462 = (g :: Type) Source #

Methods

pairing :: G1 BN462 -> G2 BN462 -> GT BN462 Source #

Pairing BN254D Source # 
Instance details

Defined in Data.Pairing.BN254D

Associated Types

type G1 BN254D = (g :: Type) Source #

type G2 BN254D = (g :: Type) Source #

type GT BN254D = (g :: Type) Source #

Pairing BN254C Source # 
Instance details

Defined in Data.Pairing.BN254C

Associated Types

type G1 BN254C = (g :: Type) Source #

type G2 BN254C = (g :: Type) Source #

type GT BN254C = (g :: Type) Source #

Pairing BN254B Source # 
Instance details

Defined in Data.Pairing.BN254B

Associated Types

type G1 BN254B = (g :: Type) Source #

type G2 BN254B = (g :: Type) Source #

type GT BN254B = (g :: Type) Source #

Pairing BN254A Source # 
Instance details

Defined in Data.Pairing.BN254A

Associated Types

type G1 BN254A = (g :: Type) Source #

type G2 BN254A = (g :: Type) Source #

type GT BN254A = (g :: Type) Source #

Pairing BN254 Source # 
Instance details

Defined in Data.Pairing.BN254

Associated Types

type G1 BN254 = (g :: Type) Source #

type G2 BN254 = (g :: Type) Source #

type GT BN254 = (g :: Type) Source #

Methods

pairing :: G1 BN254 -> G2 BN254 -> GT BN254 Source #

Pairing BLS12381 Source # 
Instance details

Defined in Data.Pairing.BLS12381

Associated Types

type G1 BLS12381 = (g :: Type) Source #

type G2 BLS12381 = (g :: Type) Source #

type GT BLS12381 = (g :: Type) Source #

Pairing-friendly elliptic curves

type ECPairing e q r u v w = (Pairing e, ECPairingG1 e q r, ECPairingG2 e q r u, ECPairingGT e q r u v w) Source #

Pairings of a family of pairing-friendly elliptic curves.

Let E(Fq) be an elliptic curve over a prime field Fq, and let Fq < Fq' < Fq'' < Fq''' be a tower of simple field extensions defined by irreducible monic polynomials u, v, and w.

Then the pairing is defined to be of type E(Fq) x E(Fq') -> U_r, where U_r is the r-th roots of unity multiplicative subgroup of Fq''', and r is the order of E(Fq) and the order of a prime field Fr.

type ECPairingG1 e q r = (KnownNat q, WACurve e (Prime q) (Prime r), G1 e ~ WAPoint e (Prime q) (Prime r)) Source #

Pairing-friendly elliptic curve left group E(Fq).

type ECPairingG2 e q r u = (IrreducibleMonic u (Prime q), WACurve e (Extension u (Prime q)) (Prime r), G2 e ~ WAPoint e (Extension u (Prime q)) (Prime r)) Source #

Pairing-friendly elliptic curve right group E(Fq').

type ECPairingGT e q r u v w = (KnownNat r, IrreducibleMonic v (Extension u (Prime q)), IrreducibleMonic w (Extension v (Extension u (Prime q))), GT e ~ RootsOfUnity r (Extension w (Extension v (Extension u (Prime q))))) Source #

Pairing-friendly field multiplicative target group U_r.