Truly random number generators and PHP, lava lamps
"People working with computers often sloppily talk about their system's 'random number generator' and the 'random numbers' it produces. But numbers calculated by a computer through a deterministic process, cannot, by definition, be random. [...] Truly random numbers are typically generated by sampling and processing a source of entropy outside the computer. [More precisely, using processed data from a chaotic source as the seed value for a software-based pseudorandom number generator, ed.]
The [PHP] function presented here randomly retrieves a random number either from HotBits or Random.org. HotBits numbers are generated by timing successive pairs of radioactive decays detected by a Geiger-Müller tube interfaced to a computer. The Random.org random number generator works by converting background radio frequency noise in to random numbers."
In a related story, Lavarnd uses the movements of Lava Lite lamp's globules as the starting point for generating random numbers: "A digital camera periodically photographs a set of six lava lamps, adding its own electronic noise to the data. The 921,600 bytes of the original image are compressed and scrambled into a 140-byte packet, which then serves as the seed value." Developed by some SGI lab researchers, it is intranet only until November though: "Unfortunately certain SGI bogons decided that allowing employees to express creativity on the web was a legal libility and so they destroyed a wonderful web culture. To our knowledge there is now no external view of an SGI lavarand server." Check back then as idea and realization are way too cool.
Entry first published 2009-05-18 00:59, last edited 2009-05-18 00:59
Share this entry via e-mail - on Twitter