diff options
author | emkael <emkael@tlen.pl> | 2017-11-25 16:16:43 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-11-25 16:16:43 +0100 |
commit | 5ca7bcc40e2195f22dcac2cf615846ae26ca0cd4 (patch) | |
tree | e0d4d77eec45521322da3539363c9932e366dcee | |
parent | c05d5976d97869e4a981f3403732bea07985c579 (diff) |
-rw-r--r-- | main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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));
|