[Cryptography] TRNG review: Arduino based TRNGs

Ron Garret ron at flownet.com
Sat Jan 16 20:29:53 EST 2016


On Jan 15, 2016, at 5:49 PM, Bill Cox <waywardgeek at gmail.com> wrote:

> Can you try generating a bunch of floating A0 samples when running on a battery, with good bypass caps, in a nice shielded environment like a metal box?

Just to put this issue to rest, I did this experiment.  I plugged the Teensy3 into my laptop (a Macbook Pro Retina) and collected ADC samples with the laptop plugged in and unplugged, as well as with the teensy unshielded, and shielded in several layers of aluminum foil.  I ran the resulting data through some basic statistical tests.  The mean and standard deviation of the data were the same in all four cases (400 and 45 respectively).  A histogram looked normal to casual observation, and there were no obvious peaks in the FFT.  I ran these tests on multiple sequences of 1024 data points collected in a tight loop, which took about 500 ms, so this is far from the fastest that the ADC is capable of going according to the book.  My guess is that the limiting factor is the analogRead library routine.  I don’t have the source code for that, so I can’t tell what is actually going on in there.

So I think two bits of entropy per sample (i.e. 4 kilobits per second) is a very conservative estimate of what a floating analog input on a Teensy3 provides without even trying hard.  That should be more than adequate for all but the most demanding applications.

A plot of a typical sample is attached.

rg


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.metzdowd.com/pipermail/cryptography/attachments/20160116/54ba69e7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2016-01-16 at 5.27.10 PM.png
Type: image/png
Size: 42719 bytes
Desc: not available
URL: <http://www.metzdowd.com/pipermail/cryptography/attachments/20160116/54ba69e7/attachment.png>


More information about the cryptography mailing list