/* -*-c-*-
*
- * $Id: keygen.c,v 1.2 1997/08/04 10:24:23 mdw Exp $
+ * $Id: keygen.c,v 1.3 1997/09/17 15:29:28 mdw Exp $
*
* Key generation
*
/*----- Revision history --------------------------------------------------*
*
* $Log: keygen.c,v $
+ * Revision 1.3 1997/09/17 15:29:28 mdw
+ * Mix the noise from the key timings with some other environmental noise
+ * (obtained from `noise_acquire') for a little bit more randomness.
+ *
* Revision 1.2 1997/08/04 10:24:23 mdw
* Sources placed under CVS control.
*
/* --- Local headers --- */
#include "config.h"
-#include "tx.h"
#include "mdwopt.h"
+#include "noise.h"
+#include "rand.h"
+#include "tx.h"
#include "utils.h"
/*----- Static variables --------------------------------------------------*/
kg__gen(uip, sz);
kg__crepair();
+ /* --- Find some noise from the environment too --- */
+
+ rand_clear();
+ noise_acquire();
+ rand_add(uip, sz / 8);
+ rand_churn();
+ rand_extract(uip, sz / 8);
+
/* --- Now write the number and exit --- */
D( fputs("*** ", fp); tx_putBits(uip, sz, stdout); )
if (file)
fclose(fp);
memset(uip, 0, sz / 8); /* Burn temporary buffer */
+ rand_clear();
return (0);
}