I read that the random number generator dev/random on Mac and Solaris includes 160 bits of entropy. What can I do, if I need more entropy, for example, 200 bits? Thanks in advance
2 Answers
I'm not sure where you read that 160-bit estimate -- I believe that Solaris, Mac and most BSDs use a 256-bit Yarrow implementation. At any rate, the entropy pool is regularly refilled from even the smallest amount of network or disk activity, so, even though /dev/random
on non-Linux systems doesn't actually block "waiting for more entropy" (it's more like a supposedly higher-quality version of /dev/urandom
, to which on these systems it's typically linked), nothing stops you (if you trust, say, no more than 160 bits at a time from the /dev
) from "blocking and refreshing entropy" yourself -- get N bits, do some disk or network I/O, get another N bits, and so forth.

- 854,459
- 170
- 1,222
- 1,395
-
Not sufficient, see https://www.mail-archive.com/cryptography@metzdowd.com/msg00620.html – augurar Oct 25 '14 at 03:44
And if you think your disk access is too predictable, you could go for some really bizzare sources like, say, a few of the most recent twitter entries if your program has internet access;)

- 796
- 5
- 13
-
It's too predictable. You can approximate the entropy generation time, and brute-force with Twitter data from that time. Problem is similar to using time as entropy source: https://stackoverflow.com/a/1397017/1004787 – Maciej Łoziński Feb 20 '20 at 11:31