aboutsummaryrefslogtreecommitdiff
path: root/lib/fields.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fields.mli')
-rw-r--r--lib/fields.mli50
1 files changed, 5 insertions, 45 deletions
diff --git a/lib/fields.mli b/lib/fields.mli
index 18bc142..2ccc23b 100644
--- a/lib/fields.mli
+++ b/lib/fields.mli
@@ -1,50 +1,10 @@
(** Finite fields used by the BLS12-381 curve and pairings *)
module Fp : Field.S
-(* The prime field over which the BLS12-381 curve is defined. *)
+(** The prime field over which the BLS12-381 curve is defined. *)
-module Fp2 : sig
- include Field.S
+module Fp2 : Field.Sx with type f = Fp.t
+(** The polynomial field extension of degree 2 for BLS12-381 pairings. *)
- type coeffs = Fp.t * Fp.t
- (** Polynomial coefficients of the extension field. *)
-
- val of_fp : Fp.t -> t
- (** [of_fp a] returns maps a field element to the extension field. *)
-
- val of_coeffs : coeffs -> t
- (** [of_coeffs c] is the field element with polynomial coefficients [c]. *)
-
- val to_coeffs : t -> coeffs
- (** [to_coeffs a] are the polynomial coefficients of [a]. *)
-end
-(* The polynomial field extension of degree 2 for BLS12-381 pairings. *)
-
-module Fp12 : sig
- include Field.S
-
- type coeffs =
- Fp.t
- * Fp.t
- * Fp.t
- * Fp.t
- * Fp.t
- * Fp.t
- * Fp.t
- * Fp.t
- * Fp.t
- * Fp.t
- * Fp.t
- * Fp.t
- (** Polynomial coefficients of the extension field. *)
-
- val of_fp : Fp.t -> t
- (** [of_fp a] returns maps a field element to the extension field. *)
-
- val of_coeffs : coeffs -> t
- (** [of_coeffs c] is the field element with polynomial coefficients [c]. *)
-
- val to_coeffs : t -> coeffs
- (** [to_coeffs a] are the polynomial coefficients of [a]. *)
-end
-(* The polynomial field extension of degree 12 for BLS12-381 pairings. *)
+module Fp12 : Field.Sx with type f = Fp.t
+(** The polynomial field extension of degree 12 for BLS12-381 pairings. *)