Truly random numbers

Thursday 25 March 2004This is over 19 years old. Be careful.

Usually when a software person talks about random numbers, they mean ones generated by a software algorithm, which means they are really talking about pseudo-random numbers. There are better (but less plentiful) sources, which are based on physical processes that produce truly random numbers. Quantum physics is behind, which generates numbers using a single-photon optics rig. Another is HotBits, which relies on radioactive decay. I’m not sure how you’d put these to use in any practical way, but it’s somehow comforting and empowering to know that in distant corners of the world, physics has been harnessed to give me truly random numbers at my fingertips.


I remember talking to one of my CS teachers about random generators, wondering why we don't have more chips using physical phenomema as entropy source.
He replied that in lots of cases you don't want truly random generators. You want good deterministic ones, so that you can generate the same "random" sequence in two places.
Didn't SGI run some random number generators by using digitized images of lava lamps at one point?
I also remember reading about random number generators based on lava lamps -- just hook a webcam to a lava lamp, grab the image, calculate the MD5 and get the first digit. Should be random enough.

I think there's also some generators that collect entropy from the line in of the computers sound board. Even if there's nothing plugged in, the white noise from interference is random and can be used.
Don't forget about, which uses atmospheric noise. It will give you random integers, bytes, and sequences, and it has simple HTTP, SOAP, and CORBA interfaces, as well as a number of prewritten clients in a bunch of languages. What's really cool about the site is its statistics about the generated numbers. It also has a really nice explanation of how the numbers are generated and analyzed.

As for what you would use it for, it looks like it gets a lot of use for contests, scientific research, and seeding for a Backgammon server. Not all of those applications actually need truly random numbers, but some definitely do.

I know the SGI generator was called lavarand, but I don't think it exists anymore.

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.