200 points · by h0ek · 7y ago · 75 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.
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.
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://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.
I vaguely remember after it was announced that the project was disbanded, that there was one single commit from the authors whose only change was a textual replacement of "United States" with "USA" everywhere it appeared.
Coming from the highly anonymous and secretive TrueCrypt group, this was interpreted in this most scandalous possible way. I.e. the US govt was somehow strongarming them. I'm not claiming that part is true, I'm just curious if my memory is correct about the whole incident.
https://www.wired.com/story/mastermind-excerpt/
https://magazine.atavist.com/the-mastermind
It's pretty likely that Paul Le Roux was behind TrueCrypt.
He worked on E4M, but I can't imagine that he did TrueCrypt, given the stuff he did at these (post-E4M) times. It simply doesn't fit. Also, from Wikipedia link:
"Le Roux himself has denied developing TrueCrypt in a court hearing in March 2016, in which he also confirmed he had written E4M."
Also:
https://en.wikipedia.org/wiki/TrueCrypt#E4M_and_SecurStar_di...
Also:
https://www.securstar.com/en/about-us.html
Also:
https://groups.google.com/forum/?_escaped_fragment_=topic/al...
And:
https://groups.google.com/forum/?hl=en&_escaped_fragment_=ms...
> he [liked] the video game Wing Commander [1]
Somewhere between 1990 and 1995 I recall that Windows PCs in South Africa shipped with a games CD. You would get Ultima (immediately banned by your parents), Wing Commander, Sea Wolf and other games and this would be your staple for a while. When Warcraft 2 (or it may have been Starcraft) came out I think it cost about R 350 (USD 90 in 1995) so you would need to be more picky in the games you could buy than today. One should mention the rand's historic dissonance with regard to the exchange rate and PPP, but whatever.
I remember buying some shitty Disney game for the same amount and regretting it instantly (I played Warcraft 2 instead). It was not until 1999 that I saw games "in bulk" with Tiberian Sun, ReVolt and a multitude of other games being shared on DC.
[1] https://en.wikipedia.org/wiki/Paul_Le_Roux, edited for sensational language. Note that he had the console version, but I am not sure which console that would be. The PS1 was the first major console in South Africa (apart from "video games", i.e. famicon or NES clones) but I may stand corrected.
I feel really bad for his kids. When I studying in Asia, I met a few mixed-race kids that had racist expat parents and they often had major identity issues. For those that didn’t stay in the expat bubble, they would shun their “Western side” and try to completely blend in with the locals.
https://news.bitcoin.com/satoshi-nakamoto-could-be-criminal-...
Something straight of a complex spy thriller.
> WARNING: Using TrueCrypt is not secure as it may contain unfixed security issues
Which if you are into conspiracy theories can be rendered as
Using TrueCrypt is Not Secure As => using TrueCrypt is NSA
http://truecrypt.sourceforge.net/
and Wikipedia article is accurate:
I used a workaround suggested on the VeraCrypt forums: renaming the Windows boot loader, replacing it with the VeraCrypt one, and pointing VeraCrypt at the renamed option. This meant that any Windows update that updated the boot loader would break the whole arrangement and to fix it I needed to boot from a USB stick.
I think I most recently tried on version 1.22. It does sound like this version has some relevant fixes though.
Another machine couldn't even update to 1809 without decrypting. After updating and re-encrypting, it refuses to mount any system favorite volumes. VeraCrypt is a mess. Or rather, Windows keeps breaking things.
Probably this does not even has to do with VeraCrypt: After a bit of research I found some posts. It seems like this error is caused by my SSD... I guess I have to reinstall my Windows.
Doesn't make sense to me. Cos on my laptops is running a 2015 version of windows 10. I refused to update it. Yet calculator still works there.
It's possible that you're right and mine only works cos I did a lot of firewalling.
Additionally TrueCrypt has been out there and well known for a long time. It even had a pretty decent audit done. Even with its flaws this is a strong foundation to build on. Any brand new undertaking is pretty much guaranteed to have more flaws. Thus we should definitely focus on improving VeraCrypt. It would also be easier to do an audit on just the changes from TrueCrypt to VeraCrypt as opposed to a whole new program.
The added advantage is that you can easily do backups of it.