True Randomness
November 7th, 2006 by SplineGuy
Enough with coding your own pseudo-random number generators, check out Random.org. Here’s a site that makes the claim of providing “true random numbers” to anyone on the internet. If you need many numbers you can actually download pregenerated files or even write your own client that will access their server via HTTP, SOAP or CORBA.
So what is “true randomness,” you ask? From their own introduction:
Randomness and random numbers have traditionally been used for a variety of purposes, for example games such as dice games. With the advent of computers, people recognized the need for a means of introducing randomness into a computer program. Surprising as it may seem, however, it is difficult to get a computer to do something by chance. A computer running a program follows its instructions blindly and is therefore completely predictable.
Computer engineers chose to introduce randomness into computers in the form of pseudo-random number generators. As the name suggests, pseudo-random numbers are not truly random. Rather, they are computed from a mathematical formula or simply taken from a precalculated list. A lot of research has gone into pseudo-random number theory and modern algorithms for generating them are so good that the numbers look exactly like they were really random. Pseudo-random numbers have the characteristic that they are predictable, meaning they can be predicted if you know where in the sequence the first number is taken from. For some purposes, predictability is a good characteristic, for others it is not.
…
True Random Numbers
True random numbers are typically generated by sampling and processing a source of entropy outside the computer. A source of entropy can be very simple, like the little variations in somebody’s mouse movements or in the amount of time between keystrokes. In practice, however, it can be tricky to use user input as a source of entropy. Keystrokes, for example, are often buffered by the computer’s operating system, meaning that several keystrokes are collected before they are sent to the program waiting for them. To the program, it will seem as though the keys were pressed almost simultaneously.
A really good source of entropy is a radioactive source. The points in time at which a radioactive source decays are completely unpredictable, and can be sampled and fed into a computer, avoiding any buffering mechanisms in the operating system. In fact, this is what the HotBits people at Fourmilab in Switzerland are doing. Another source of entropy could be atmospheric noise from a radio, like that used here at random.org, or even just background noise from an office or laboratory. The lavarand people at Silicon Graphics have been clever enough to use lava lamps to generate random numbers, so their entropy source not only gives them entropy, it also looks good! The latest random number generator to come online (both lavarand and HotBits precede random.org) is Damon Hart-Davis’ Java EntropyPool which gathers random bits from a variety of sources including HotBits and random.org, but also from web page hits received by the EntropyPool’s web server.
This is another one for my file, “I wish I thought of that.” A number of times in my research in stochastic partial differential equations or in variable knot splines algorithms I relied on fairly standard linear congruential pseudo random number generators. I often wondered in the back of my mind just how perturbed my results might have been have the lack of “true” randomness. I’d always resigned myself to not being able to attain true randomness. I might give this site a try.








Back in the olden days when processor speed was measured in microseconds, we used to use Monte Carlo simulations to evaluate reservoir economics. Computer generated random numbers were used to input quantities such as reservoir area, pay thickness, depth, water-cut, drilling cost per foot, producing cost, market price, etc., etc. A critical input was the random number seed–the first random number and the “mother” of all the random numbers. After awhile, the engineers knew which seed to use depending on the desired output.
Since the slowness of the computers dictated a small number of samples, the “answers” varied greatly and were pretty useless (if you didn’t like the results, you just ran it again). I guess we would have done better if we had used lava lamps–readily available at that time.
I should mention that the quoted portion of the article refers to lavarand in which SGI used lava lamps to generate random numbers. That is a little misleading because, in fact, they use images of lava lamps to select the seed for pseudo-random number generators. The link LavaRnd is an algorithm that uses a webcam and lavalamp to directly produce cryptographically sound random numbers. A single camera image frame can typically produce between 340 and 1420 bytes bytes of random numbers. For more of the difference between lavarand and LavaRnd, check out this page.