3 ms·
Does this imply that XORing /dev/urandom with /dev/random is a good practice? PS: Thanks for clarifying @gizmo686. The arch linux wiki suggests that urandom re
by Cieplak 10y ago
Does this imply that XORing /dev/urandom with /dev/random is a good practice?
PS: Thanks for clarifying @gizmo686. The arch linux wiki suggests that urandom re-uses the entropy pool that dev/random accumulates, so this is indeed a BAD idea.
I found this helpful as well:
https://en.wikipedia.org/wiki/Randomness_extractor
Overall, their construction quite reminds me of a double pendulum, which is one of the simplest examples of deterministic chaos.
- gizmo686 10y agoNo. 1) /dev/urandom and /dev/random are not independent 2) This paper describes an algorithm for combining random streams. That algorithm is not xor (which has been known for a long time).
- cyphar 10y ago/dev/urandom and /dev/random are identical in every way, except that /dev/random blocks when the "entropy estimator" decides there "isn't enough entropy". However, due to the properties of the CSPRNG they use, such estimates have dubious value. Overall, you should always use /dev/urandom. But definitely don't XOR the two.
- Bromskloss 10y agoWhy does /dev/urandom use up the nice entropy of /dev/random when it doesn't provide any guarantees anyway? Also, do you mean that/dev/urandom should be used even for cryptographic applications?
- zokier 10y agoYes, /dev/urandom is backed by a CSPRNG, and thus should be used even for cryptographic applications The recent discussion about Ruby SecureRandom has some references about the subject: https://news.ycombinator.com/item?id=11624890 https://news.ycombinator.com/item?id=11624890
- cyphar 10y agoWhat do you mean by "use up the nice entropy"? You can use /dev/urandom for cryptographic applications (in fact _you should_). Here's a nice article about it: http://www.2uo.de/myths-about-urandom/ http://www.2uo.de/myths-about-urandom/
- Bromskloss 10y agoI shall ready your link in full at a later time. For now, is there any problem with using /dev/random other than that it is blocking?