X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/bb78535ed9f01dd4b0afa408a0d513c0660c1d30..265fb162d066fe35bcdcc5e1a9b76d0cff7c46a5:/rspit.c diff --git a/rspit.c b/rspit.c index e10d05fa..71a6c1ab 100644 --- a/rspit.c +++ b/rspit.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: rspit.c,v 1.4 2000/06/17 12:08:28 mdw Exp $ + * $Id: rspit.c,v 1.6 2000/07/15 20:53:35 mdw Exp $ * * Spit out random numbers * @@ -30,6 +30,13 @@ /*----- Revision history --------------------------------------------------* * * $Log: rspit.c,v $ + * Revision 1.6 2000/07/15 20:53:35 mdw + * Add a load of new ciphers and hashes. + * + * Revision 1.5 2000/07/01 11:27:03 mdw + * Portability fix: don't assume that `stdout' is a constant expression. + * Remove old type name `bbs_param'. + * * Revision 1.4 2000/06/17 12:08:28 mdw * Restructure handling of cipher-based generators. Add counter-mode * ciphers and MGF-1 hash functions. Add FIPS 140-1 and Maurer's tests. @@ -89,30 +96,42 @@ #include "des3-ofb.h" #include "rc2-ofb.h" #include "rc5-ofb.h" +#include "skipjack-ofb.h" +#include "tea-ofb.h" +#include "xtea-ofb.h" #include "blowfish-ofb.h" #include "twofish-ofb.h" #include "idea-ofb.h" #include "cast128-ofb.h" #include "cast256-ofb.h" #include "rijndael-ofb.h" +#include "square-ofb.h" #include "serpent-ofb.h" #include "des-counter.h" #include "des3-counter.h" #include "rc2-counter.h" #include "rc5-counter.h" +#include "skipjack-counter.h" +#include "tea-counter.h" +#include "xtea-counter.h" #include "blowfish-counter.h" #include "twofish-counter.h" #include "idea-counter.h" #include "cast128-counter.h" #include "cast256-counter.h" #include "rijndael-counter.h" +#include "square-counter.h" #include "serpent-counter.h" #include "md4-mgf.h" #include "md5-mgf.h" #include "sha-mgf.h" +#include "tiger-mgf.h" +#include "rmd128-mgf.h" #include "rmd160-mgf.h" +#include "rmd256-mgf.h" +#include "rmd320-mgf.h" #include "rmd160.h" @@ -132,11 +151,15 @@ static gen generators[]; E(DES3, des3) \ E(RC2, rc2) \ E(RC5, rc5) \ + E(SKIPJACK, skipjack) \ + E(TEA, tea) \ + E(XTEA, xtea) \ E(BLOWFISH, blowfish) \ E(TWOFISH, twofish) \ E(IDEA, idea) \ E(CAST128, cast128) \ E(CAST256, cast256) \ + E(SQUARE, square) \ E(RIJNDAEL, rijndael) \ E(SERPENT, serpent) @@ -144,7 +167,11 @@ static gen generators[]; E(MD4, md4) \ E(MD5, md5) \ E(SHA, sha) \ - E(RMD160, rmd160) + E(TIGER, tiger) \ + E(RMD128, rmd128) \ + E(RMD160, rmd160) \ + E(RMD256, rmd256) \ + E(RMD320, rmd320) #define E(PRE, pre) CIPHER_##PRE, enum { CIPHERS CIPHER__bogus }; @@ -179,7 +206,7 @@ static struct { /*----- Miscellaneous static data -----------------------------------------*/ -static FILE *outfp = stdout; +static FILE *outfp; static size_t outsz = 0; static int argc; @@ -578,7 +605,7 @@ static grand *gen_bbs(unsigned i) m = MP_COPY(kd->u.m); key_close(&kf); } else { - bbs_param bp; + bbs_priv bp; if (bbs_gen(&bp, bits, &rand_global, 0, (flags & f_progress) ? pgen_ev : 0, 0)) @@ -1065,6 +1092,7 @@ int main(int ac, char *av[]) addopts(sopts, opts); argc = ac; argv = av; + outfp = stdout; /* --- Read the generator out of the first argument --- */