+/*----- Curve parameter sets ----------------------------------------------*/
+
+/* --- @ec_curveparse@ --- *
+ *
+ * Arguments: @qd_parse *qd@ = parser context
+ *
+ * Returns: Elliptic curve pointer if OK, or null.
+ *
+ * Use: Parses an elliptic curve description, which has the form
+ *
+ * * a field description
+ * * an optional `/'
+ * * `prime', `primeproj', `bin', or `binproj'
+ * * an optional `:'
+ * * the %$a$% parameter
+ * * an optional `,'
+ * * the %$b$% parameter
+ */
+
+extern ec_curve *ec_curveparse(qd_parse */*qd*/);
+
+/* --- @ec_ptparse@ --- *
+ *
+ * Arguments: @qd_parse *qd@ = parser context
+ * @ec *p@ = where to put the point
+ *
+ * Returns: The point address, or null.
+ *
+ * Use: Parses an elliptic curve point. This has the form
+ *
+ * * %$x$%-coordinate
+ * * optional `,'
+ * * %$y$%-coordinate
+ */
+
+extern ec *ec_ptparse(qd_parse */*qd*/, ec */*p*/);
+
+/* --- @ec_infoparse@ --- *
+ *
+ * Arguments: @qd_parse *qd@ = parser context
+ * @ec_info *ei@ = curve information block, currently
+ * uninitialized
+ *
+ * Returns: Zero on success, nonzero on failure.
+ *
+ * Use: Parses an elliptic curve information string, and stores the
+ * information in @ei@. This has the form
+ *
+ * * elliptic curve description
+ * * optional `/'
+ * * common point
+ * * optional `:'
+ * * group order
+ * * optional `*'
+ * * cofactor
+ */
+
+extern int ec_infoparse(qd_parse */*qd*/, ec_info */*ei*/);
+
+/* --- @ec_getinfo@ --- *
+ *
+ * Arguments: @ec_info *ei@ = where to write the information
+ * @const char *p@ = string describing a curve
+ *
+ * Returns: Null on success, or a pointer to an error message.
+ *
+ * Use: Parses out information about a curve. The string is either a
+ * standard curve name, or a curve info string.
+ */
+
+extern const char *ec_getinfo(ec_info */*ei*/, const char */*p*/);
+
+/* --- @ec_freeinfo@ --- *
+ *
+ * Arguments: @ec_info *ei@ = elliptic curve information block to free
+ *
+ * Returns: ---
+ *
+ * Use: Frees the information block.
+ */
+
+extern void ec_freeinfo(ec_info */*ei*/);
+
+/* --- @ec_checkinfo@ --- *
+ *
+ * Arguments: @const ec_info *ei@ = elliptic curve information block
+ *
+ * Returns: Null if OK, or pointer to error message.
+ *
+ * Use: Checks an elliptic curve according to the rules in SEC1.
+ */
+
+extern const char *ec_checkinfo(const ec_info */*ei*/, grand */*gr*/);
+