Uprating of the passphrase pixie.
[u/mdw/catacomb] / pfilt.h
diff --git a/pfilt.h b/pfilt.h
index e3461d2..652d2eb 100644 (file)
--- a/pfilt.h
+++ b/pfilt.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: pfilt.h,v 1.1 1999/12/22 15:49:39 mdw Exp $
+ * $Id: pfilt.h,v 1.4 2004/04/08 01:36:15 mdw Exp $
  *
  * Finding and testing prime numbers
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: pfilt.h,v $
- * Revision 1.1  1999/12/22 15:49:39  mdw
- * Renamed from `pgen'.  Reworking for new prime-search system.
- *
- * Revision 1.3  1999/12/10 23:29:48  mdw
- * Change header file guard names.
- *
- * Revision 1.2  1999/11/20 22:23:05  mdw
- * Add multiply-and-add function for Diffie-Hellman safe prime generation.
- *
- * Revision 1.1  1999/11/19 13:17:57  mdw
- * Prime number generator and tester.
- *
- */
-
 #ifndef CATACOMB_PFILT_H
 #define CATACOMB_PFILT_H
 
@@ -57,7 +40,7 @@
 #  include "mp.h"
 #endif
 
-#ifndef CATACOMB_PTAB_H
+#ifndef CATACOMB_PRIMETAB_H
 #  include "primetab.h"
 #endif
 
 
 typedef struct pfilt {
   mp *m;
-  unsigned char r[NPRIME];
+  smallprime r[NPRIME];
 } pfilt;
 
 /*----- Functions provided ------------------------------------------------*/
 
+/* --- @pfilt_smallfactor@ --- *
+ *
+ * Arguments:  @mp *m@ = integer to test
+ *
+ * Returns:    One of the @PGEN@ result codes.
+ *
+ * Use:                Tests a number by dividing by a number of small primes.  This
+ *             is a useful first step if you're testing random primes; for
+ *             sequential searches, @pfilt_create@ works better.
+ */
+
+extern int pfilt_smallfactor(mp */*m*/);
+
 /* --- @pfilt_create@ --- *
  *
  * Arguments:  @pfilt *p@ = pointer to prime filtering context