<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Feb 4, 2014, at 2:19 AM, Tony Arcieri <<a href="mailto:bascule@gmail.com">bascule@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 3, 2014 at 9:12 PM, Watson Ladd <span dir="ltr"><<a href="mailto:watsonbladd@gmail.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=watsonbladd@gmail.com&cc=&bcc=&su=&body=','_blank');return false;">watsonbladd@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Why does /dev/random not do this and so avoid blocking after startup?<br></blockquote><div><br></div><div>The /dev/random vs /dev/urandom distinction is probably a mistake. Also making these things files in /dev is also probably a mistake. Ideally there would just be a system call to obtain some randomness from the kernel, then an awful lot of work to ensure that randomness is good. It shouldn't block.</div></div></div></div></div></blockquote><div><br></div><div>If the pool doesn't have enough entropy, it *has* to block or return an error code or something. Otherwise, we get back into the realm of the bug that led to all those appliance routers and firewalls sharing primes in their RSA moduli.</div><div><br></div><div>Now, if you have a hardware RNG and you're willing to trust it, you can avoid blocking, since the hardware RNG is surely going to be able to give you 256 bits of entropy very quickly, and you can use that to seed AES256 CTR-DRBG or SHA256 HMAC-DRBG, and from there you have as many bits as you need.  </div><div><br></div><div>If you have a hardware RNG and don't want to trust it, then you're back to either blocking or generating output bits you don't fully trust. </div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra">Tony Arcieri</div></div></div></blockquote><br><div>--John</div></body></html>