Thursday, January 21, 2016

Avalanche-Noise Based (Pseudo) Random Value Generator

Randomness is a hard problem.  There is no definition to it.  However, there is a lot of research into just what exactly is...randomness.  As anyone who studies cryptography will tell you, having randomness while generating keys is one of the most important parts of protecting information.  I was interested in this so I looked into some solutions.  One of which is this circuit, there are other more simple versions, the noise is generally from a zener diode.

I have since moved onto other projects, so this post won't detail my build as much back when I did this last summer (I need to keep up with my blogging, it's just more work. :p ).  The source for this project is this site:  holdenc.altervista.org/avalanche/  The best resource is this site though: https://www.cs.helsinki.fi/u/oottela/tfc-manual.pdf . Make sure you get all the parts, and lay it out on a breadboard to test.  It's easiest if you have access to a newer digital oscilloscope too.  Look up the pinout of a transistor, pinout of the TL082 op-amp, and make sure your 1N4148 diodes have the correct polarity.  I got lucky and the circuit worked on the first power-up (after tuning with an oscilloscope of course).

Oh, the most useful part of this project was how simple it was to capture the entropy of the voltage levels (this is what is random...), was to use the "analogRead()" function in the Arduino toolchain.  It would be handy to take that info and store in a SD card, but that's a project for some time else.

Using analogRead() Arduino example code works ( https://www.arduino.cc/en/Reference/AnalogRead ), and it's very easy to modify it to your needs.  Pictured is my breadboard implementation, take your time and build the circuit, it's a nice feeling when it's done and you start sampling.  I may try to make a PC board of this circuit, which would be nice, will post here of course if I do.

Here's the circuit, enjoy the build if you decide to do it: