blob: fc66fcb34a48702f5196c9ec9f55d974e0536548 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
module G1 : Curve.S with type t = Curves.E.t and type F.t = Fields.Fp.t
module G2 : Curve.S with type t = Curves.E2.t and type F.t = Fields.Fp2.t
module Gt : sig
type t
val identity : t
(** The group's identity element. *)
val dot : t -> t -> t
(** [dot a b] is the group operation applied to [a] and [b]. *)
val inverse : t -> t
(** [inverse a] is the inverse of [a]. Note that the invariant
[equal identity (dot a (inverse a))] always holds. *)
val equal : t -> t -> bool
(** [equal a b] is true if [a] has the same value as [b] *)
val to_fp12 : t -> Fields.Fp12.t
(** [to_fp12 a] is the underlying field value of the group element [a]. *)
val to_string : t -> string
(** [to_string a] is the string representation of [a]. *)
(** Unsafe pairing group construction functions. *)
module Unsafe : sig
val of_fp12_unchecked : Fields.Fp12.t -> t
(** [of_fp12_unchecked a] is a pairing element of value [a]. This function
does not check whether the value actually belongs to the pairing group
[Gt]. *)
val of_string_unchecked : string -> t
(** [of_string_unchecked s] returns the pairing element represented by [s].
This function does not check whether the value belongs to the group
[Gt]. *)
end
end
val e : G1.t -> G2.t -> Gt.t
(** [e p q] is the elliptic curve pairing of [p] and [q]. *)
|