Windows: Use Jitterentropy RNG only in SlowPoll call and not in FastPoll since the it consumes too much CPU and FastPoll requires fast and minimal entropy gathering

This commit is contained in:
Mounir IDRASSI 2019-10-03 18:49:09 +02:00
parent be09fa8a53
commit 9f91c47bd2
No known key found for this signature in database
GPG Key ID: 02C30AE90FAE4A6F
1 changed files with 0 additions and 13 deletions

View File

@ -922,19 +922,6 @@ BOOL FastPoll (void)
return FALSE;
}
/* use JitterEntropy library to get good quality random bytes based on CPU timing jitter */
if (0 == jent_entropy_init ())
{
struct rand_data *ec = jent_entropy_collector_alloc (1, 0);
if (ec)
{
ssize_t rndLen = jent_read_entropy (ec, (char*) buffer, sizeof (buffer));
if (rndLen > 0)
RandaddBuf (buffer, (int) rndLen);
jent_entropy_collector_free (ec);
}
}
// use RDSEED or RDRAND from CPU as source of entropy if enabled
if ( IsCpuRngEnabled() &&
( (HasRDSEED() && RDSEED_getBytes (buffer, sizeof (buffer)))