Jump to content

Hardware random number generator

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 208.186.187.74 (talk) at 07:45, 22 December 2002 (New article). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Random numbers generated by computers are usually pseudo-random numbers generated by an arithmetic algorithm. This is not reassuring. Most pseudo-random number generators show statistical regularities when examined according to some process. That is to say, a casino using them could lose. True random numbers have no regularities.

Utility

The big industrial use of true random numbers is to make unpredictable keys for encryption. Since most keys are a few thousand bits at most, simple slow random number generators are good enough. This use is important-enough that many designers believe every computer should have a way to generate true random numbers.

Occasionally people need them for statistical research, or other uses.

Cheap random numbers (if available) are handy for erasing files, reducing radio emissions from computers. Engineers often invent uses for such a thing.

The global consciousness project, maintains RNGs in many cities, and reported chi-square fluctuations during the 9/11 attacks. This event was not controlled for power fluctuations and the like. Many researchers involved in paranormal research use random number generators in their test designs.

How they work

True random number generators measure some physical quantity and use the result to generate a random number. In real life, these range from the amusing to the well-engineered.

The classic design starts with a reverse-biased zener diode. A diode's junction noise is perfectly random quantum mechanical noise. The diode's junction noise is amplified and filtered, then run through a logic circuit to make a randomly varying logic signal. In effect, the "snap action" hysteresis of the logic circuit's input measures the amplified noise. Then, this logic value is converted to an "RS-232" level signal (possibly by the original logic circuit). A computer's serial port reads the result, and software ignores the errors caused by bad formatting of the serial data.

The digital data from such a system is prone to be biased, with 1s or 0s predominating. John Von Neumann invented a simple algorithm to fix this (it's called a "decorrelator"): When two successive bits are the same, they are not used as a random bit. A sequence of 1,0 becomes a 1. A sequence of 0,1 becomes a zero. This perfectly eliminates bias, and is eaasy to implement in a computer program or digital logic. It reduces the bit rate.

Another method applies the central limit theorem to adjust the threshold of the logic device. Ultra-high speed random numebr generators use this method.

A quality device might use two diodes and eliminate signals that are common to both- this elimiantes interference from outside electric and magnetic fields. This is recommended for gambling devices, to prevent cheating.

The Intel RNG (supplied in their board-level chip sets for a PC), uses most of the above tricks and adds another: The non-common-mode noise from two diodes controls a voltage-controlled oscillator, which clocks bits from a rapid oscillator (the new trick), which then go through a Von-Neumann decorrelator.

Another method uses two uncoupled oscillators, and counts events in one from the time-base of another. This method has been used on PCs to generate pure-software true-random number generators. It requires a PC with two clock crystals, one for the real-time clock, and another for the processor. The program loops, counting the time that one of the bits of the counter of the real-time clock is a 1. The least significant bit of the loop-counter is quite random.

People have successfully used a radiation source (some from a smoke-alarm) to drive Geiger counters attached to a PC [www.hotbots.com]. They have also measured atmospheric noise with a radio receiver attached to a PC [www.random.org]. A group at Silicon Graphics even used digital cameras to watch LavaLamps (TM) to generate random numbers!

Problems

It is very easy to mis-construct such devices. Also, they break silently, often having increasingly less-random numbers before failing.

Statistical tests should be performed constantly. Many such devices build the tests into the software that reads the device.