4 ms·
FreeBSD, OS X and iOS have non-blocking /dev/random thanks to http://en.wikipedia.org/wiki/Yarrow_algorithm http://en.wikipedia.org/wiki/Yarrow_algorithm
by Freaky 14y ago
FreeBSD, OS X and iOS have non-blocking /dev/random thanks to http://en.wikipedia.org/wiki/Yarrow_algorithm http://en.wikipedia.org/wiki/Yarrow_algorithm
- B-Con 14y agoThose are more or less the equivalent of /dev/urandom, not /dev/random. On Linux, /dev/random is only raw entropy, /dev/urandom is raw entropy plus PRG stretching when raw entropy runs out.
- __alexs 14y ago/dev/random is not "raw entropy" it goes through the exact same mixing and (SHA-1) compression stages that /dev/urandom does. It just happens to block if there's not much entropy in the pool at the start. Source: http://eprint.iacr.org/2012/251.pdf http://eprint.iacr.org/2012/251.pdf also, the kernel source.
- B-Con 14y agoI understand that, my words were not precise. My point in phrasing it that way was that there is no entropy stretching. (You only get to read (about) as much entropy as has been gathered. You don't have to worry about reading 128 bytes and having them be associated with the previously read 128 bytes, because the pools that generated them are distinct.)
- Freaky 14y agoWell, the main distinction of note would be whether or not they're cryptographically secure, which (despite being much slower) Linux /dev/urandom isn't?
- deleted 14y ago[deleted]