10 ms·
> /dev/urandom in certain systems, notably OSX, at some point may block for some time This is not true. OS X has the same behavior as the BSDs: /dev/urandom is
by geofft 11y ago
> /dev/urandom in certain systems, notably OSX, at some point may block for some time
This is not true. OS X has the same behavior as the BSDs: /dev/urandom is a compatibility symlink to /dev/random, and neither device blocks.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man4/random.4.html https://developer.apple.com/library/mac/documentation/Darwin...
"Yarrow is a fairly resilient algorithm, and is believed to be resistant to non-root. The quality of its output is however dependent on regular addition of appropriate entropy. If the SecurityServer daemon fails for any reason, output quality will suffer over time without any explicit indication from the random device itself."
The only device node that's broken in this way is Linux's /dev/random.
- antirez 11y agoI had to switch implementation to use SHA1 in counter mode in actual code, because on OSX, /dev/urandom blocked. To make it block did not required a huge amount of data.
- geofft 11y agoHuh. Well that's a fairly serious bug that someone should track down and document widely. I'll see if I can reproduce it on my OS X machine.