+/* --- @dh_limlee@ --- *
+ *
+ * Arguments: @dh_param *dp@ = pointer to output parameter block
+ * @unsigned ql@ = length of smallest factor of %$(p - 1)/2$%
+ * @unsigned pl@ = length of %$p$% in bits
+ * @unsigned flags@ = other generation flags
+ * @unsigned steps@ = number of steps to go
+ * @grand *r@ = random number source
+ * @pgen_proc *oev@ = outer event handler function
+ * @void *oec@ = argument for the outer event handler
+ * @pgen_proc *iev@ = inner event handler function
+ * @void *iec@ = argument for the inner event handler
+ * @size_t *nf@, @mp ***f@ = output array for factors
+ *
+ * Returns: @PGEN_DONE@ if it worked, @PGEN_ABORT@ if it didn't.
+ *
+ * Use: Generates Diffie-Hellman parameters based on a Lim-Lee prime.
+ *
+ * The modulus is a large prime %$p = 2 \prod q_i + 1$%, @pl@
+ * bits long, where the %$q_i$% are smaller primes each at least
+ * @ql@ bits long. It is safe to set @nf@ and @f@ to zero if
+ * you're not interested in the factor values.
+ *
+ * The returned %$g$% generates a subgroup of order %$q_0$% (the
+ * first factor, returned as @f[0]@), if the flag @DH_SUBGROUP@
+ * is set on entry; otherwise %$g$% will have order
+ * %$(p - 1)/2$%.
+ */
+
+#define DH_SUBGROUP 1u
+
+extern int dh_limlee(dh_param */*dp*/, unsigned /*ql*/, unsigned /*pl*/,
+ unsigned /*flags*/, unsigned /*steps*/, grand */*r*/,
+ pgen_proc */*oev*/, void */*oec*/, pgen_proc */*iev*/,
+ void */*iec*/, size_t */*nf*/, mp ***/*f*/);
+
+/* --- @dh_checkparam@ --- *
+ *
+ * Arguments: @keycheck *kc@ = keycheck state
+ * @const dh_param *dp@ = pointer to the parameter set
+ * @mp **v@ = optional vector of factors
+ * @size_t n@ = size of vector
+ *
+ * Returns: Zero if all OK, or return status from function.
+ *
+ * Use: Checks a set of Diffie-Hellman parameters for consistency and
+ * security.
+ */
+
+extern int dh_checkparam(keycheck */*kc*/, const dh_param */*dp*/,
+ mp **/*v*/, size_t /*n*/);
+