VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Random.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-03 18:49:09 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-10-03 19:32:33 +0200
commit9f91c47bd22e5753d62e9c19f05f3ad79672d008 (patch)
tree51eeecc4a51e9cff8c92ba68c1b649c0235232cb /src/Common/Random.c
parentbe09fa8a5333a77aee73eff48699ab05f9c47cee (diff)
downloadVeraCrypt-9f91c47bd22e5753d62e9c19f05f3ad79672d008.tar.gz
VeraCrypt-9f91c47bd22e5753d62e9c19f05f3ad79672d008.zip
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
Diffstat (limited to 'src/Common/Random.c')
-rw-r--r--src/Common/Random.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/Common/Random.c b/src/Common/Random.c
index 1c6b9530..a2da77f8 100644
--- a/src/Common/Random.c
+++ b/src/Common/Random.c
@@ -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)))