X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/7b6d64f1839f9308d1f8f054fb22f799efc71390..4e67e30be6dbcc7d4f23be754b67bf7c6a0ade92:/dh.h diff --git a/dh.h b/dh.h index 0ddc342..689d8f1 100644 --- a/dh.h +++ b/dh.h @@ -166,6 +166,29 @@ extern int dh_limlee(dh_param */*dp*/, unsigned /*ql*/, unsigned /*pl*/, pgen_proc */*oev*/, void */*oec*/, pgen_proc */*iev*/, void */*iec*/, size_t */*nf*/, mp ***/*f*/); +/* --- @dh_kcdsagen@ --- * + * + * Arguments: @dh_param *dp@ = pointer to output parameter block + * @unsigned ql@ = size of small factor of %$(p - 1)/2$% + * @unsigned pl@ = size of %$p$% in bits + * @unsigned flags@ = other generation flags (none defined) + * @unsigned steps@ = number of steps to go + * @grand *r@ = random number source + * @pgen_proc *ev@ = event handler function + * @void *ec@ = context for the event handler + * + * Returns: @PGEN_DONE@ if it worked, @PGEN_ABORT@ if it failed. + * + * Use: Generates a KCDSA prime group. That is, it chooses a prime + * %$p$%, such that $%p = 2 q v + 1$%, for primes %$q$% and + * %$v$%. The actual group of interest is the subgroup of order + * %$q$%. + */ + +extern int dh_kcdsagen(dh_param */*dp*/, unsigned /*ql*/, unsigned /*pl*/, + unsigned /*flags*/, unsigned /*steps*/, grand */*r*/, + pgen_proc */*ev*/, void */*ec*/); + /* --- @dh_checkparam@ --- * * * Arguments: @keycheck *kc@ = keycheck state