/* -*-c-*-
*
- * $Id: dsa.h,v 1.1 1999/11/19 19:28:00 mdw Exp $
+ * $Id: dsa.h,v 1.2 1999/11/20 22:23:48 mdw Exp $
*
* Digital Signature Algorithm
*
/*----- Revision history --------------------------------------------------*
*
* $Log: dsa.h,v $
+ * Revision 1.2 1999/11/20 22:23:48 mdw
+ * Allow event handler to abort the search process.
+ *
* Revision 1.1 1999/11/19 19:28:00 mdw
* Implementation of the Digital Signature Algorithm.
*
* Arguments: @dsa_param *dp@ = where to store parameters
* @unsigned l@ = bitlength of @p@ in bits
* @const void *k@ = pointer to key material
+ * @int (*proc)(int ev, mp *m, void *p)@ = event procedure
* @size_t sz@ = size of key material
- * @void (*proc)(int ev, mp *m, void *p)@ = event procedure
- * @void *p@ = argument for event procedure
*
* Returns: Zero if all went well, nonzero if key material was
* unsuitable (one of the @DSAEV@ codes).
* The event procedure is informed of various happenings during
* generation. It is passed an event code describing what
* happened, and a multiprecision number which pertains to the
- * event code.
+ * event code. It may abort the search at any time by returning
+ * a nonzero value, which is returned as the result of the
+ * function.
*/
extern int dsa_seed(dsa_param */*dp*/, unsigned /*l*/,
const void */*k*/, size_t /*sz*/,
- void (*proc)(int /*ev*/, mp */*m*/, void */*p*/),
+ int (*proc)(int /*ev*/, mp */*m*/, void */*p*/),
void */*p*/);
/* --- @dsa_mksig@ --- *