X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/34e4f738bcba58e6d8c4cabbb0b3232a65b42a9d..025c5f4aa5ffbf8948482a4233318db81c2df5d2:/dh.h diff --git a/dh.h b/dh.h index 56dbf0a..0ddc342 100644 --- a/dh.h +++ b/dh.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: dh.h,v 1.8 2004/04/01 12:50:09 mdw Exp $ + * $Id$ * * Diffie-Hellman and related public-key systems * @@ -27,34 +27,6 @@ * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: dh.h,v $ - * Revision 1.8 2004/04/01 12:50:09 mdw - * Add cyclic group abstraction, with test code. Separate off exponentation - * functions for better static linking. Fix a buttload of bugs on the way. - * Generally ensure that negative exponents do inversion correctly. Add - * table of standard prime-field subgroups. (Binary field subgroups are - * currently unimplemented but easy to add if anyone ever finds a good one.) - * - * Revision 1.7 2001/02/03 16:08:24 mdw - * Add consistency checking for public keys. - * - * Revision 1.6 2000/07/29 10:01:16 mdw - * Supply commentry for the Diffie-Hellman parameters. Add Lim-Lee - * parameter generation. - * - * Revision 1.5 2000/07/01 11:20:51 mdw - * New functions for freeing public and private keys. - * - * Revision 1.4 2000/06/17 10:52:47 mdw - * Minor changes for key fetching. - * - * Revision 1.3 2000/02/12 18:21:02 mdw - * Overhaul of key management (again). - * - */ - #ifndef CATACOMB_DH_H #define CATACOMB_DH_H @@ -210,19 +182,33 @@ 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_parse@ --- * +/* ---- @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 * @dh_param *dp@ = parameters to fill in * * Returns: Zero if OK, nonzero on error. * - * Use: Parses a prime group string. This is either one of the - * standard group strings, or a %$p$%, %$q$%, %$g$% triple + * Use: Parses a prime/binary group string. This is either one of + * the standard group strings, or a %$p$%, %$q$%, %$g$% triple * separated by commas. */ extern int dh_parse(qd_parse */*qd*/, dh_param */*dp*/); +extern int dhbin_parse(qd_parse */*qd*/, gbin_param */*gb*/); /*----- That's all, folks -------------------------------------------------*/