X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/3688eb757240b2332f67ec827be8caf6f6abe924..02dfbd5b7af7816959dbd39c1fe628451204e35f:/dh.h diff --git a/dh.h b/dh.h index 8288740..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 @@ -182,6 +205,19 @@ extern int dh_limlee(dh_param */*dp*/, unsigned /*ql*/, unsigned /*pl*/, extern int dh_checkparam(keycheck */*kc*/, const dh_param */*dp*/, mp **/*v*/, size_t /*n*/); +/* ---- @dh_infofromdata@ --- * + * + * Arguments: @dh_param *dp@ = parameters to fill in + * @pdata *pd@ = packed data structure + * + * Returns: --- + * + * Use: Fills in a parameters structure from a packed data block. + */ + +struct pdata; +extern void dh_infofromdata(dh_param */*dp*/, struct pdata */*pd*/); + /* --- @dh_parse@, @dhbin_parse@ --- * * * Arguments: @qd_parse *qd@ = parser context