aboutsummaryrefslogtreecommitdiff
path: root/lib/curve.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/curve.ml')
-rw-r--r--lib/curve.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/curve.ml b/lib/curve.ml
index dd76690..fe8a20a 100644
--- a/lib/curve.ml
+++ b/lib/curve.ml
@@ -2,6 +2,9 @@
(** Module signature for an elliptic curve. *)
module type S = sig
+ module F : Field.S
+ (** The field over which the curve is defined. *)
+
type t
(** A type representing an element in an elliptic curve. *)
@@ -14,6 +17,12 @@ module type S = sig
val n : Z.t
(** The order of the curve. *)
+ val of_coords : F.t * F.t -> t
+ (** [of_coords x y] is the curve element with coordinates [x] and [y]. *)
+
+ val to_coords : t -> (F.t * F.t) option
+ (** [to_coords a] returns the coordinates of [a]. *)
+
val of_string : string -> t
(** [of_string s] returns the curve element represented by [s]. *)