If you have rdrand,  there is no need to build your own PRNG on top of rdrand.   RdRand already incorporates one so that it can produce random numbers as fast as they can be requested,  and this number is continuously re-seeded with the on-chip entropy source.<div>
<br></div><div>It would be nice to have a little more information about /dev/urandom and how it varies by OS and hardware,   but on Linux and FreeBSD at least it&#39;s supposed to be a cryptographically secure RNG that incorporates a PRNG to produce numbers in case you exhaust the entropy pool.</div>
<div><br><div class="gmail_quote">On Wed, Nov 28, 2012 at 5:00 PM, Vincent Hanquez <span dir="ltr">&lt;<a href="mailto:tab@snarc.org" target="_blank">tab@snarc.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 11/28/2012 09:31 PM, Leon Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Quite possibly,  entropy does seem to be a pretty lightweight dependency...<br>
<br>
Though doesn&#39;t recent kernels use rdrand to seed /dev/urandom if it&#39;s available?   So /dev/urandom is the most portable source of random numbers on unix systems,  though rdrand does have the advantage of avoiding system calls,  so it certainly would be preferable, especially if you need large numbers of random numbers.<br>

</blockquote></div>
There&#39;s no much information on this i think, but if you need large number of random numbers you should build a PRNG yourself on top of the best random seed you can get, and make sure you reseed your prng casually with more entropy bytes. Also if<br>

you don&#39;t have enough initial entropy, you should block.<br>
<br>
/dev/urandom is not the same thing on every unix system. leading to various assumptions broken when varying the unixes. It also varies with the hardware context: for example on an embedded or some virtualized platform, giving you really terrible entropy.<span class="HOEnZb"><font color="#888888"><br>

<br>
-- <br>
Vincent<br>
</font></span></blockquote></div><br></div>