/* -*-c-*-
*
- * $Id: dsa.h,v 1.4 1999/12/22 15:52:44 mdw Exp $
+ * $Id: dsa.h,v 1.5 2000/06/17 10:53:42 mdw Exp $
*
* Digital Signature Algorithm
*
/*----- Revision history --------------------------------------------------*
*
* $Log: dsa.h,v $
+ * Revision 1.5 2000/06/17 10:53:42 mdw
+ * Minor changes for key fetching. Typesetting fixes.
+ *
* Revision 1.4 1999/12/22 15:52:44 mdw
* Reworking for new prime-search system.
*
/*----- Header files ------------------------------------------------------*/
+#ifndef CATACOMB_KEY_H
+# include "key.h"
+#endif
+
#ifndef CATACOMB_MP_H
# include "mp.h"
#endif
mp *g; /* Generates order-%$q$% subgroup */
} dsa_param;
+typedef struct dsa_pub {
+ dsa_param dp; /* Shared parameters */
+ mp *y; /* Public key */
+} dsa_pub;
+
+typedef struct dsa_priv {
+ dsa_param dp; /* Shared parameters */
+ mp *x; /* Private key */
+ mp *y; /* %$y \equiv g^x \pmod{p}$% */
+} dsa_priv;
+
/* --- DSA signature structure --- *
*
* This is the recommended structure for a DSA signature. The actual signing
octet s[DSA_SIGLEN]; /* 160-bit @s@ value */
} dsa_sig;
+/*----- Key fetching ------------------------------------------------------*/
+
+extern const key_fetchdef dsa_paramfetch[];
+#define DSA_PARAMFETCHSZ 5
+
+extern const key_fetchdef dsa_pubfetch[];
+#define DSA_PUBFETCHSZ 6
+
+extern const key_fetchdef dsa_privfetch[];
+#define DSA_PRIVFETCHSZ 9
+
/*----- DSA stepper -------------------------------------------------------*/
typedef struct dsa_stepctx {