error rate is not that good, but dieharder looks better
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 21 Aug 2012 04:20:50 +0000 (13:20 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 21 Aug 2012 04:20:50 +0000 (13:20 +0900)
src/random.c

index b135aa5..2d9e25c 100644 (file)
@@ -132,7 +132,7 @@ static void ep_add (uint8_t entropy_bits, uint8_t another_random_bit,
 
   v ^= entropy_bits;
   v *= FNV_PRIME;
-  v ^= (round >> 19) & 0xff;
+  v ^= ((round >> 19) & 0xff) ^ another_random_bit;
   v *= FNV_PRIME;
 
   epool[ep_count] ^= v;