Minor changes for key fetching. Typesetting fixes.
authormdw <mdw>
Sat, 17 Jun 2000 10:53:42 +0000 (10:53 +0000)
committermdw <mdw>
Sat, 17 Jun 2000 10:53:42 +0000 (10:53 +0000)
dsa.h

diff --git a/dsa.h b/dsa.h
index e8dee83..e891b40 100644 (file)
--- a/dsa.h
+++ b/dsa.h
@@ -1,6 +1,6 @@
 /* -*-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
  *
@@ -30,6 +30,9 @@
 /*----- 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
@@ -83,6 +90,17 @@ typedef struct dsa_param {
   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
@@ -97,6 +115,17 @@ typedef struct dsa_sig {
   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 {