/* -*-c-*-
*
- * $Id: rspit.c,v 1.17 2001/05/07 17:33:19 mdw Exp $
+ * $Id$
*
* Spit out random numbers
*
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: rspit.c,v $
- * Revision 1.17 2001/05/07 17:33:19 mdw
- * New Rijndael block sizes.
- *
- * Revision 1.16 2001/04/29 18:11:32 mdw
- * New block ciphers.
- *
- * Revision 1.15 2001/04/19 18:26:13 mdw
- * Use the new MAC keysize names.
- *
- * Revision 1.14 2001/02/21 20:03:22 mdw
- * Added support for MD2 hash function.
- *
- * Revision 1.13 2000/12/06 20:33:27 mdw
- * Make flags be macros rather than enumerations, to ensure that they're
- * unsigned.
- *
- * Revision 1.12 2000/10/08 15:49:18 mdw
- * Remove failed kludge for shutting up a warning.
- *
- * Revision 1.11 2000/10/08 12:10:32 mdw
- * Make table have external linkage to bodge around deficiency in C. The
- * problem is that @static gen generators[];@ is considered to be a
- * `tentative definition', and therefore mustn't have incomplete type,
- * which it obviously has.
- *
- * Revision 1.10 2000/08/11 21:34:59 mdw
- * New restartable interface to Maurer testing.
- *
- * Revision 1.9 2000/08/04 23:24:15 mdw
- * Add a timer and a discard option.
- *
- * Revision 1.8 2000/07/29 22:05:47 mdw
- * Fix error in help message about Maurer test syntax.
- *
- * Revision 1.7 2000/07/18 23:01:26 mdw
- * Improve progress indications, and allow user to choose chunk sizes for
- * Maurer's test.
- *
- * 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.
- *
- * Revision 1.3 2000/02/12 18:21:03 mdw
- * Overhaul of key management (again).
- *
- * Revision 1.2 1999/12/22 15:59:51 mdw
- * New prime-search system. Read BBS keys from key files.
- *
- * Revision 1.1 1999/12/10 23:29:13 mdw
- * Emit random numbers for statistical tests.
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include "config.h"
#include "idea-ofb.h"
#include "cast128-ofb.h"
#include "cast256-ofb.h"
+#include "noekeon-ofb.h"
#include "rijndael-ofb.h"
#include "rijndael192-ofb.h"
#include "rijndael256-ofb.h"
#include "idea-counter.h"
#include "cast128-counter.h"
#include "cast256-counter.h"
+#include "noekeon-counter.h"
#include "rijndael-counter.h"
#include "rijndael192-counter.h"
#include "rijndael256-counter.h"
E(SQUARE, square) \
E(SAFER, safer) \
E(SAFERSK, safersk) \
+ E(NOEKEON, noekeon) \
E(RIJNDAEL, rijndael) \
E(RIJNDAEL192, rijndael192) \
E(RIJNDAEL256, rijndael256) \
*/
const char *mt =
- "120511284390135742513572142094334711443073194119732569353820828435640527418092392240366088035509890969913081816369160298961490135716255689660470370755013177656905237112577648090277537209936078171554274553448103698084782669252936352843649980105109850503830397166360721262431179505917248447259735253684659338653";
+ "12051128439013574251357214209433471144307319411973256935382082"
+ "84356405274180923922403660880355098909699130818163691602989614"
+ "90135716255689660470370755013177656905237112577648090277537209"
+ "93607817155427455344810369808478266925293635284364998010510985"
+ "0503830397166360721262431179505917248447259735253684659338653";
/* --- Other things --- */
/* --- Read the key data --- */
- if ((kk->k.e & KF_ENCMASK) != KENC_STRUCT)
+ if ((kk->k->e & KF_ENCMASK) != KENC_STRUCT)
die(EXIT_FAILURE, "key is not structured");
- if ((kd = key_structfind(&kk->k, "n")) == 0)
+ if ((kd = key_structfind(kk->k, "n")) == 0)
die(EXIT_FAILURE, "key has no subkey `n'");
if ((kd->e & KF_ENCMASK) != KENC_MP)
- die(EXIT_FAILURE, "incomatible subkey encoding");
+ die(EXIT_FAILURE, "incompatible subkey encoding");
m = MP_COPY(kd->u.m);
key_close(&kf);
} else {