<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 23, 2016 at 3:22 PM, Ron Garret <span dir="ltr"><<a href="mailto:ron@flownet.com" target="_blank">ron@flownet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On Nov 23, 2016, at 6:55 AM, Salz, Rich <<a href="mailto:rsalz@akamai.com">rsalz@akamai.com</a>> wrote:<br>
<br>
>> Everything that matters about randomness can be summarized in four bullet points:<br>
>><br>
>> 1. You need two things: an entropy source, and a whitener. No entropy<br>
>> source is perfect, so you need a whitener no matter what. You don't have to<br>
>> do anything fancy in your whitener. Any cryptographically secure hash<br>
>> function (like SHA512) will do.<br>
>><br>
>> 2. Since you need a whitener no matter what, it doesn't really matter how<br>
>> good your entropy source is, except insofar as it might take a long time to<br>
>> collect enough entropy from a very poor source. All that matters is that you<br>
>> have an accurate lower bound for how much entropy your source actually<br>
>> provides, and this is the case no matter how good (or bad) your source<br>
>> actually is. As long as you feed >N bits of entropy into your whitener, you can<br>
>> safely extract N bits of true randomness out of it.<br>
>><br>
>> 3. You don't need more than a few hundred bits of randomness. 128 bits is<br>
>> enough, 256 is a comfortable margin, 512 is serious overkill. Seed a<br>
>> cryptographically secure PRNG with a few hundred bits of entropy and you<br>
>> can safely extract gigabytes of key material out of it.<br>
><br>
> (I omitted #4)<br>
><br>
> Is the above accurate?<br>
<br>
</span>Yes ;-)<br></blockquote><div><br></div><div>+1.  However, you now incorporate any security flaws in your CPRNG into your random number source, thus spreading the flaws to all crypto on your system.  You also integrate the probability over time that an attacker has taken a snapshot of your CPRNG state.  I like to reseed the CPRNG now and then with a few hundred unpredictable bits.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I would also add:<br>
<br>
5.  It is not possible to assess the quality of a random number generator by looking at post-whitener output.  Post-whitener output will *always* pass all statistical tests (otherwise you there is a flaw in the hash function).  This is why most of the performance data for e.g. OneRNG and RDRand is useless.<br></blockquote><div><br></div><div>Absolutely right.  Only TRNGs that make raw data available should be trusted.  Further, the source should have a simple physical model which is proven out by measurements, preferably continuously.</div><div><br></div><div>Bill</div></div></div></div>