From 9312c71ff376dd96fdf970002fd3adb5aeec8db3 Mon Sep 17 00:00:00 2001 From: mdw Date: Sun, 8 Oct 2000 12:16:07 +0000 Subject: [PATCH] Remove vestiges of @primorial@. --- Makefile.m4 | 11 +++++--- pfilt.c | 6 +++-- primorial.c | 89 ------------------------------------------------------------- primorial.h | 75 --------------------------------------------------- 4 files changed, 12 insertions(+), 169 deletions(-) delete mode 100644 primorial.c delete mode 100644 primorial.h diff --git a/Makefile.m4 b/Makefile.m4 index c51d03f..f623a70 100644 --- a/Makefile.m4 +++ b/Makefile.m4 @@ -1,6 +1,6 @@ ## -*-makefile-*- ## -## $Id: Makefile.m4,v 1.41 2000/08/15 21:46:20 mdw Exp $ +## $Id: Makefile.m4,v 1.42 2000/10/08 12:16:06 mdw Exp $ ## ## Makefile for Catacomb ## @@ -29,6 +29,9 @@ ##----- Revision history ---------------------------------------------------- ## ## $Log: Makefile.m4,v $ +## Revision 1.42 2000/10/08 12:16:06 mdw +## Remove vestiges of @primorial@. +## ## Revision 1.41 2000/08/15 21:46:20 mdw ## Set up the dependencies on primetab.[ch] and mptypes.h properly. ## There's some m4 hacking, but it's worth it not to have to recompile all @@ -251,7 +254,7 @@ pkginclude_HEADERS = \ key.h key-data.h passphrase.h pixie.h lmem.h \ mpx.h mpw.h mpscan.h mparena.h mp.h mptext.h mpint.h \ mpbarrett.h mpmont.h mpcrt.h mprand.h mpmul.h \ - primetab.h pfilt.h primorial.h rabin.h \ + primetab.h pfilt.h rabin.h \ pgen.h prim.h strongprime.h limlee.h \ bbs.h rsa.h dh.h dsarand.h dsa.h \ oaep.h pkcs1.h pss.h \ @@ -272,7 +275,7 @@ define(`MP_SOURCES', PGEN_SOURCES') define(`PGEN_SOURCES', - `pfilt.c rabin.c primorial.c \ + `pfilt.c rabin.c \ pgen.c pgen-stdev.c pgen-safe.c pgen-gcd.c prim.c strongprime.c \ limlee.c \ bbs-rand.c bbs-gen.c bbs-jump.c bbs-fetch.c \ @@ -452,6 +455,8 @@ CLEANFILES = \ $(srcdir)/Makefile.am: $(srcdir)/Makefile.m4 m4 $(srcdir)/Makefile.m4 >$(srcdir)/Makefile.am +DISTCLEANFILES = libtool + MAINTAINERCLEANFILES = \ $(srcdir)/Makefile.am \ $(srcdir)/getdate.c getdate.c \ diff --git a/pfilt.c b/pfilt.c index 4b58304..1dc46a1 100644 --- a/pfilt.c +++ b/pfilt.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: pfilt.c,v 1.3 2000/08/15 21:44:27 mdw Exp $ + * $Id: pfilt.c,v 1.4 2000/10/08 12:14:57 mdw Exp $ * * Finding and testing prime numbers * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: pfilt.c,v $ + * Revision 1.4 2000/10/08 12:14:57 mdw + * Remove vestiges of @primorial@. + * * Revision 1.3 2000/08/15 21:44:27 mdw * (pfilt_smallfactor): New function for doing trial division the hard * way. @@ -64,7 +67,6 @@ #include "pfilt.h" #include "pgen.h" #include "primetab.h" -#include "primorial.h" /*----- Main code ---------------------------------------------------------*/ diff --git a/primorial.c b/primorial.c deleted file mode 100644 index 68c45ad..0000000 --- a/primorial.c +++ /dev/null @@ -1,89 +0,0 @@ -/* -*-c-*- - * - * $Id: primorial.c,v 1.4 2000/08/15 21:41:09 mdw Exp $ - * - * Computes the product of the small primes - * - * (c) 1999 Straylight/Edgeware - */ - -/*----- Licensing notice --------------------------------------------------* - * - * This file is part of Catacomb. - * - * Catacomb is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * Catacomb is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with Catacomb; if not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - */ - -/*----- Revision history --------------------------------------------------* - * - * $Log: primorial.c,v $ - * Revision 1.4 2000/08/15 21:41:09 mdw - * Bug fix: minimize the right thing. - * - * Revision 1.3 2000/07/15 10:02:07 mdw - * Include missing header file. - * - * Revision 1.2 2000/07/09 21:31:43 mdw - * Use `mpmul'. - * - * Revision 1.1 1999/12/22 15:51:02 mdw - * Calculate product of small primes for DSA prime search. - * - */ - -/*----- Header files ------------------------------------------------------*/ - -#include "mp.h" -#include "mpint.h" -#include "mpmul.h" -#include "primetab.h" - -/*----- Global variables --------------------------------------------------*/ - -mp *primorial = 0; - -/*----- Main code ---------------------------------------------------------*/ - -/* --- @primorial_setup@ --- * - * - * Arguments: --- - * - * Returns: --- - * - * Use: Computes the product of the small primes in the table - * @primetab@. - */ - -void primorial_setup(void) -{ - mp *p = MP_NEW; - mpmul mm = MPMUL_INIT; - int i; - - if (primorial) - return; - - for (i = 0; i < NPRIME; i++) { - p = mp_fromuint(p, primetab[i]); - mpmul_add(&mm, p); - } - mp_drop(p); - primorial = mpmul_done(&mm); - mp_minimize(primorial); - primorial->a->n--; /* Permanent allocation */ -} - -/*----- That's all, folks -------------------------------------------------*/ diff --git a/primorial.h b/primorial.h deleted file mode 100644 index 787c5a9..0000000 --- a/primorial.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*-c-*- - * - * $Id: primorial.h,v 1.1 1999/12/22 15:51:02 mdw Exp $ - * - * Computes the product of the small primes - * - * (c) 1999 Straylight/Edgeware - */ - -/*----- Licensing notice --------------------------------------------------* - * - * This file is part of Catacomb. - * - * Catacomb is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * Catacomb is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with Catacomb; if not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - */ - -/*----- Revision history --------------------------------------------------* - * - * $Log: primorial.h,v $ - * Revision 1.1 1999/12/22 15:51:02 mdw - * Calculate product of small primes for DSA prime search. - * - */ - -#ifndef CATACOMB_PRIMORIAL_H -#define CATACOMB_PRIMORIAL_H - -#ifdef __cplusplus - extern "C" { -#endif - -/*----- Header files ------------------------------------------------------*/ - -#ifndef CATACOMB_MP_H -# include "mp.h" -#endif - -/*----- Global variables --------------------------------------------------*/ - -extern mp *primorial; - -/*----- Main code ---------------------------------------------------------*/ - -/* --- @primorial_setup@ --- * - * - * Arguments: --- - * - * Returns: --- - * - * Use: Computes the product of the small primes in the table - * @primetab@. - */ - -extern void primorial_setup(void); - -/*----- That's all, folks -------------------------------------------------*/ - -#ifdef __cplusplus - } -#endif - -#endif -- 2.11.0