by CiPHPerCoder · 7y ago · 0 comments
I have never heard of Jitterentropy but it sounds vaguely like previous attempts at RNGs.
/r/crypto had a good discussion about this topic a while ago: https://www.reddit.com/r/crypto/comments/9dln0v/whats_the_pr...
My intuition is that this is dangerous and will likely result in security bugs in the future.
> Using the Jitter RNG core, the rngd provides an entropy source that feeds into the Linux /dev/random device if its entropy runs low. It updates the /dev/random entropy estimator such that the newly provided entropy unblocks /dev/random.
This is a red flag. Entropy doesn't run low. https://www.2uo.de/myths-about-urandom
I'm calling it now: Don't use VeraCrypt.
They made a very questionable decision based on the sort of ignorance that leads people to use /dev/random and haveged rather than RtlGenRandom (Windows), getrandom(2) (new Linux), or /dev/urandom (old Linux).
Cryptography engineering requires care and this sort of ignorance tends to undermine secure implementations.
You can see your current entropy level, which is probably high due to having a keyboard, with this command:
cat /proc/sys/kernel/random/entropy_avail
You can watch this number drain by reading from /dev/random continuously.
http://www.issihosts.com/haveged/ Haveged has existed since 2003 and has lots of documentation and discussion of its randomness.
Entropy running low is not an actual problem. AES-CTR doesn't "run out of key".
If your OS's "entropy estimator" is producing small numbers and your userspace applications are using /dev/random, yes, that will degrade your performance. That's the actual problem.
The solution is for the developers of your software to stop using /dev/random, wholesale.
Saying that the actual problem is "entropy running low" is like saying "water is flammable". That might be true in extreme cases, but isn't in the general case.
Once the generator had been seeded (once), sure, read from urandom and don't worry.
The main issue is trying to read from it at boot time
You are observing the misguided attempts of fixing this non-problem.
To me with my overly vivid imagination, the fast forking of TrueCrypt to VeraCrypt looked like a hasty power grab by DGSE. Pure speculation, though.
In contrast, VeraCrypt developers did not seem to understand what a TPM is when I tried to discuss the topic with them.
It's a valid statement in context, and using it as a dependency is not a red flag.
(Though VeraCrypt doesn't seem to get enough randomness to be safe if jitter fails, which is pretty worrying.)
Having an answer to this question is going to require research, which might take time.
https://blog.cryptographyengineering.com/2015/04/02/truecryp...
https://opencryptoaudit.org/reports/TrueCrypt_Phase_II_NCC_O...
The keyfiles bug mentioned was previously disclosed against 7.0a: https://cyberside.net.ee/truecrypt/misc/truecrypt_7.0a-analy...
https://news.ycombinator.com/item?id=21152552
https://fuchsia.dev/fuchsia-src/zircon/jitterentropy/config-...
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
See 50ee7529ec4500c88f8664560770a7a1b65db72b.
Dangerous in what way? If it's properly mixed into the pool, it shouldn't make the pool more predictable.
Is JitterEntropy actually a CSPRNG or just a PRNG?
Is it fork-safe?
Is VeraCrypt's implementation secure?
I originally proposed BLAKE2 for this purpose on their issue tracker, circa 2014.
Page 15 describes it in detail.