Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- 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
- 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)
- type ECPairingG1 e q r = (KnownNat q, WACurve e (Prime q) (Prime r), G1 e ~ WAPoint e (Prime q) (Prime r))
- 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))
- 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)))))
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.
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
.
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
.