~mdw
/
become
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mix the noise from the key timings with some other environmental noise
[become]
/
src
/
keygen.c
diff --git
a/src/keygen.c
b/src/keygen.c
index
f1b0abe
..
eba38d9
100644
(file)
--- a/
src/keygen.c
+++ b/
src/keygen.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-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
*
*
* Key generation
*
@@
-29,6
+29,10
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: keygen.c,v $
/*----- 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.
*
* Revision 1.2 1997/08/04 10:24:23 mdw
* Sources placed under CVS control.
*
@@
-60,8
+64,10
@@
/* --- Local headers --- */
#include "config.h"
/* --- Local headers --- */
#include "config.h"
-#include "tx.h"
#include "mdwopt.h"
#include "mdwopt.h"
+#include "noise.h"
+#include "rand.h"
+#include "tx.h"
#include "utils.h"
/*----- Static variables --------------------------------------------------*/
#include "utils.h"
/*----- Static variables --------------------------------------------------*/
@@
-567,6
+573,14
@@
int main(int argc, char *argv[])
kg__gen(uip, sz);
kg__crepair();
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); )
/* --- Now write the number and exit --- */
D( fputs("*** ", fp); tx_putBits(uip, sz, stdout); )
@@
-574,6
+588,7
@@
int main(int argc, char *argv[])
if (file)
fclose(fp);
memset(uip, 0, sz / 8); /* Burn temporary buffer */
if (file)
fclose(fp);
memset(uip, 0, sz / 8); /* Burn temporary buffer */
+ rand_clear();
return (0);
}
return (0);
}