summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.c b/main.c
index fe63404..712e1c0 100644
--- a/main.c
+++ b/main.c
@@ -426,6 +426,7 @@ hexdump(byte *input, int len) {
static struct {
byte seed_sequence[4]; /* sequence number in PRNG sequence */
byte seed_random[RMDbytes]; /* 160 bits collected at start */
+ byte seed_previous[RMDbytes]; /* 160 bits from previous iteration */
byte seed_owner[RMDbytes]; /* 160 bit hash of owner ident */
} seed;
@@ -638,6 +639,10 @@ main (int argc, char *argv[])
seed.seed_sequence[2] = (seqno>>16) & 0xFF;
seed.seed_sequence[3] = (seqno>>24) & 0xFF;
/*
+ * Seed the next iteration with the current output
+ */
+ memcpy(seed.seed_previous, hashcode, RMDbytes);
+ /*
* Run all the bits through the hash
*/
hashcode = RMDhash((byte *) &seed, sizeof(seed));