mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
In random_add_noise, put the hashed noise into the pool, not the raw noise
random_add_noise calls SHATransform for every 64 octets of incoming noise, yet instead of xor'ing the hashed noise into the pool it instead only xor'ed 20 octets of the raw noise in each iteration. This effectively reduced the amount of new entropy entering the pool.
This commit is contained in:
parent
6f871e3d22
commit
fa38307244
@ -240,7 +240,7 @@ void random_add_noise(void *noise, int length)
|
||||
length -= HASHINPUT - pool.incomingpos;
|
||||
SHATransform((word32 *) pool.incoming, (word32 *) pool.incomingb);
|
||||
for (i = 0; i < HASHSIZE; i++) {
|
||||
pool.pool[pool.poolpos++] ^= pool.incomingb[i];
|
||||
pool.pool[pool.poolpos++] ^= pool.incoming[i];
|
||||
if (pool.poolpos >= POOLSIZE)
|
||||
pool.poolpos = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user