+/* --- @dh_gen@ --- *
+ *
+ * Arguments: @dh_param *dp@ = pointer to output parameter block
+ * @unsigned ql@ = length of %$q$% in bits, or zero
+ * @unsigned pl@ = length of %$p$% in bits
+ * @unsigned steps@ = number of steps to go
+ * @grand *r@ = random number source
+ * @pgen_proc *event@ = event handler function
+ * @void *ectx@ = argument for the event handler
+ *
+ * Returns: @PGEN_DONE@ if it worked, @PGEN_ABORT@ if it didn't.
+ *
+ * Use: Generates Diffie-Hellman parameters.
+ *
+ * The parameters are a prime %$q$%, relatively small, and a
+ * large prime %$p = kq + 1$% for some %$k$%, together with a
+ * generator %$g$% of the cyclic subgroup of order %$q$%. These
+ * are actually the same as the DSA parameter set, but the
+ * generation algorithm is different. Also, if @ql@ is zero,
+ * this algorithm forces %$k = 2$%, and chooses %$g = 4$%. Make
+ * sure you have something interesting to do if you choose this
+ * option.
+ */
+
+extern int dh_gen(dh_param */*dp*/, unsigned /*ql*/, unsigned /*pl*/,
+ unsigned /*steps*/, grand */*r*/, pgen_proc */*event*/,
+ void */*ectx*/);
+
+/* --- @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.