Financial Times

A hunt for the haphazard

By John Whitfield

Published: Jun 11, 2004

Today's computerised world depends partly on a property that computers themselves cannot produce - randomness.

Online privacy and financial security, for example, rely on long strings of random digits used to encrypt messages during e-commerce transactions and other sensitive communications.

Random numbers also underlie gambling websites and lotteries, whether that means deciding who wins a cruise or which employees get drug-tested. They are crucial to scientists who want to simulate complex systems such as weather patterns or the stock market.

But although computers have a vast appetite for random numbers, they cannot make them, because everything they do is driven by rules - and rules, by definition, cannot produce randomness.

"The problem is how to get something that's designed to behave precisely to do something unexpected," says Landon Curt Noll, a San Francisco-based computer security consultant with the company System Experts. "If a computer does something unpredictable, we usually send it out to get fixed."

The biggest demand for random numbers comes from the cryptography industry. Computers turn confidential information such as credit card numbers into gobbledegook using a set of mathematical rules and a key. This key is a long string of digits used to control the encoding and decoding of the message.

However complicated the encryption process, if hackers or fraudsters get hold of the key they can read the message - and any pattern in a key gives them a point of attack. "The only thing that'll protect a communication is to choose a key that's as difficult as possible to guess. This is a random key," says Gregoire Ribordy, a physicist at the University of Geneva whose spin-off company, ID Quantique, sells a device for generating random numbers.

Likewise, an online casino that showed any predictability could soon go broke. And researchers want to be sure that their simulations really represent whatever process they are studying, and are not biased by some mathematical fluke. "Quite a few scientific results have been undermined by the bad quality of their random numbers," says Mr Ribordy.

At present, most computers use mathematical operations that produce strings of what look like random numbers, but are not. In the mid-1990s, computer scientists in California cracked the security of the Netscape browser by working out how the programme generated these not-so-random random values. These techniques are harder to subvert now, but still far from perfect. "Randomness isn't being used properly," says Mr Noll. "The problem is very serious, and not well appreciated."

In a string of random numbers, the frequency of all numbers (within whatever limits are set, such as between zero and one, or one and ten) should be equal, and the probability of getting one number in a sequence is unaffected by what came before: a two appearing in one place makes it no more or less likely that you will get a zero next time.

But separating the truly random from the merely messy is hard. What look like patterns arise even in randomness: in an infinite sequence of random numbers, every possible combination is certain to crop up - a thousand fours in a row, the digits of pi or the English county cricket scores for 1957, for example. The US government takes the issue so seriously that it runs a project to subject random number generators to the sophisticated mathematical tests needed to verify randomness.

A good way of creating random numbers is to draw data from a physical process happening outside the computer; and scientists have come up with ingenious ways to feed such data to machines. In 1996, Mr Noll and his colleagues patented a random number generator that used a camera pointing at a lava lamp, with a computer turning the lamp's unpredictable bubbling into numbers. Last year, the team launched a generator based on a webcam with the lens cap on - the computer turns the electronic noise inside the blacked-out camera into numbers. They provide software free of charge that allows anyone to do the same at their website,

Mads Haahr, a computer scientist at Trinity College, Dublin, takes a similar approach. His site,, generates numbers from the white noise of a cheap portable radio tuned to an empty wavelength. Mr Haahr came up with the idea with some colleagues while working on an online casino. The gambling site never took off, but Mr Haahr now gives away up to 4,000 random numbers per second to visitors to his website.

Among Mr Haahr's more unusual clients are a locksmith who randomises his lock designs, musicians, fabric designers and techno-mystics who use the numbers to cast tarot cards or the I Ching. Parapsychologists use random number generators to see if the mind can predict or influence their output. Mr Haahr also caters to the more conventional needs of sweepstake operators and researchers running randomised drug trials.

"I've been surprised how many things random numbers are used for," says Mr Haahr. "I have a problem meeting demand." He has two radios running, and plans to upgrade to three.

Researchers may be happy to download random numbers from the internet. But businesses that require watertight security such as casinos or online retailers are not.

Technology companies are working hard to meet demand. In August, the Finnish computer company Areanus plans to begin selling a software plug-in, priced at €150 (£99), that turns electronic noise into random numbers at the rate of 100,000 bits per second.

"Potential customers are testing prototype units for generating cryptographic keys," says Andreas Gustafsson, a software engineer with the company. "We have also had inquiries from people interested in running financial simulations."

Eventually, says Mr Noll, personal computers and mobile phones will have such devices built into them. In fact, it has already begun. Recent generations of Pentium chips have a random number generator that listens to the crackle of its own diodes.

RANDOM NUMBERS YOU CAN COUNT ON Computers might not be good at producing randomness, but nature has given us a copper-bottomed source of unpredictability: quantum physics, writes John Whitfield. Quantum theory has shown that the behaviour of particles such as electrons and photons is truly unknowable. The more precisely one knows how quickly a particle is moving, for example, the less one knows about where it is. This makes quantum processes ideal for making random numbers, says Landon Curt Noll, a California-based computer security expert: "The underlying physics will prevent you from predicting what's going to happen." One way of harnessing these effects is through radioactive decay. One online random number generator, called HotBits, makes its numbers from the crackles of a Geiger counter pointed at a sample of radioactive krypton. But radioactive computer components have obvious drawbacks. Physicist Gregoire Ribordy and his colleagues at Id Quantique in Geneva realised they could turn quantum unpredictability into random numbers using nothing more exotic than light. Their device fires photons, one at a time, at a half-mirrored surface. The mirror has a 50 per cent chance of letting the photon through or bouncing it back, but there is no way of knowing which path any one photon will take. The computer turns each event into a one or a zero. "From what I've seen, this looks like a good solution," Mr Noll says. Id Quantique launched a website providing free random numbers ( March, and began selling a device for installation inside computers. A basic setup costs €1,000 ($1,205). This will produce an impressive 4m random bits a second. "In a sense, this is the first quantum computer," Mr Ribordy says. In theory, the ability of quantum particles to occupy different physical states simultaneously could be used to make powerful computers that could do many things at once - today's do one thing at a time. But physicists have so far been able to perform only simple computations using quantum particles.