|
05 December 2003 An Experimental Random Number Generator by Roy McCammon Every time some smart guy thinks he has a source of crypto quality random numbers, some smarter guy proves him wrong, so I wouldn't dream of saying the following circuit can produce crypto quality random numbers, but you may want to try it. The idea is to have two oscillators that have a random relationship to each other, and then use one to sample the other. I would make two different types at very different frequencies and take care that there is no inadvertent coupling through poor ground or power supply connections. At least one would probably be very drifty. Start with an about 10MHz crystal oscillator, and a 1000Hz rc oscillator such as a 555 or a few cmos gates. Uses high temperature coefficient capacitors like Z5U's and even thermisters if you are so inclined for the 1000 Hz oscillator. Run the 10 MHz to a flip flop set up to toggle. Call the output of this flip flop T1. T1 has close to a 50% duty cycle. Call the 1000Hz output T2. Connect T1 to the serial input of a shift register (8 stages should be fine) and T2 to the clock input of the shift register. Take your random bit stream at the output of the last stage of the shift register. If you need absolute equal percentages of ones and zeros do this. Take your bits in pairs. Then let 01 be a one and 10 be a zero. Throw away 00 and 11. You can do similar things on greater numbers of bits if you are worried about higher order correlations. Gather the bits up into numbers of the size of your choice. The purpose of the shift register
is to suppress meta-stable outputs. Use only the last stage of the shift
register. |