зеркало из https://github.com/github/putty.git
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:
Родитель
6f871e3d22
Коммит
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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче