views:

812

answers:

11

I am looking for affordable solutions that generate true random numbers.

I have found LavaRnd, which is a cryptographically sound random number generator. Does anybody has experience in this field and/or knows about other solutions?

PS: IMHO the SO question True random number generator did not really cover this


EDIT:

My curiosity is more of academic nature. I don't want to know about PRNGs that are good enough for practical applications. I know they exist and that they will do.

Of course, generating true random numbers will require hardware devices. That's why I tagged this with hardware.

+1  A: 

Your question depends on how you define "true random numbers". There are plenty of people out there who believe in a deterministic world and there is nothing random at all.

Mehrdad Afshari
-1 I think it's pretty clear what he means.
Jesse Rusak
I think Mehrdad is correct, in that 'true random' is not possible for a computer, because the computer HAS to have an algorithm that is dependant on something. Even if it is seeded by a random number, and then salted with time, it is still dependent on that.
I guess the better question is why a pseudo-random algorithm isn't good enough for OP's purposes. Like Mehrdad said, even thinks like LavaRnd might not be "truly random".
Gregg Lind
True random numbers are possible with special hardware, e.g. by feeding amplified noise into a counter.
starblue
@starblue: Those hardwares generate random numbers by looking at environmental facts like noise or some other stuff, but are those really random? It's under debate in quantum physics. They might produce sufficiently random numbers for some applications, but might be deterministic.
Mehrdad Afshari
@Jesse, @starblue -- It's not proven that white noise is actually random. So Mehrdad is right, that depends how you define "true random".
vartec
Even in a deterministic world, there exist provably chaotic systems -- informally, that means systems whose long-term behaviour cannot be estimated with any accuracy if there is any initial measurement error. And in an analogue world there is always nonzero measurement error.
j_random_hacker
j_random_hacker: you are right, but you have to specify that in your definition of "true random".
Mehrdad Afshari
@j_random_hacker: by your definition pseudo-random is random.
vartec
@Mehrdad: I haven't heard or read an actual physicist say that apparently random quantum phenomena may not be truly random in a long time. Do you have different sources?
David Thornley
@vartec: How so? Are you arguing that a pseudorandom algorithm running on a computer is fundamentally a chaotic, analogue process? It is certainly analogue, but you would need to prove that the algorithm is chaotic when noise (cosmic rays etc.) is introduced. Even then, the time before...
j_random_hacker
...the onset of chaos is enormous because digital logic does an excellent job of eliminating noise. (I.e. you would be seeing a few random bits per million years or so.)
j_random_hacker
@David Thornley: I *am not a physicist* but AFAIK and heard from pro people around, some people still believe in determinism of quantum phenomena. The ultimate theories behind those are *not proven yet* but they seem to work well. There are no counter-proofs yet, ...
Mehrdad Afshari
(..cont'd): so it's like P!=NP. Most people believe they are not equal, but there's no proofs yet (without further assumptions). There are also some people who still think P=NP, but nobody talks much until they have something acceptable to say. :)
Mehrdad Afshari
No, it is not like P != NP. The mathematical question can in principle be proven either way. That nature is random cannot be proved, it could only be disproved if it were the case. But so far all indications are that nature is indeed random, so we should accept it.
starblue
Bell's theorem has been tested up one side and down the other (speaking as a physicist here). The results are unambiguous. Any deterministic, hidden variables in quantum mechanical systems are non-local. That effectively means that they are beyond human ken. So these systems *really* can be taken as *truly* random. The coffin has been nailed shut on this (pending new physics, of course).
dmckee
+6  A: 

http://random.org/

John Rasch
Yeah, well... that doesn't help with local coding solutions, does it?
Seb
Short of attaching an untuned radio to your serial port (and even then it's suspect), there is very little help for local coding solutions.
Evan
LavaRnd does exactly that. It uses inputs from unpredictable devices such as overloaded CCDs or distorting analogue amplifiers.
slim
A: 

True random numbers in computing does not exist and never will. Computers are deterministic, in that if you repeat the same experience under the same environment, the same result will be achieved.

What you get with computers are pseudo-random numbers, mostly depending on current circumstances: date, time, other variables like memory being used, network traffic at the moment, etc.

For example, some online poker sites, to guarantee to some extent the randomness of their dealt hands, had to install specific hardware that takes the ambient noise and generates random numbers based on that (not only that, but it's a major factor).

So, to have pseudo-random numbers that approximate to true randomness, you'll need to take outside factors into account.

Seb
Your first statement is under heavy debate in quantum mechanics.
Mehrdad Afshari
Randomness is something you believe exists because you don't know how it happens. As soon as you discover the mechanics behind the scenery, it stops being random. Talk about predicting rainy days, for example. It couldn't be done 1000 years ago and seemed a random event; not anymore.
Seb
@Seb: Luckily, computers can do I/O, meaning they have access to randomness in the outside world -- see slim's answer.
j_random_hacker
@j_random_hacker: then, you're not talking about randomness in computing, but randomness in outside world.
Seb
@Seb: I apologise, your post is actually making the same point I was trying to make in my comment, somehow I got it backwards... :)
j_random_hacker
Seb, quantum randomness is *really* random. Not just a lack of information, but actual non-determinism.
Phil H
Well, I'm one of those who believe in a deterministic world, so I just believe that's not random but something we cannot predict, giving us the "sensation of randomness". Same with throwing the ball in a roulette. Now, this is getting more and more philosophic than algorithmic :P
Seb
+4  A: 

You didn't specify an environment.

From the documentation for Linux's /dev/random

The random number generator gathers environmental noise from device drivers and other sources into an entropy pool. The generator also keeps an estimate of the number of bit of the noise in the entropy pool. From this entropy pool random numbers are created.

So this is a cryptographically secure random source, based on unpredictable input from such things as the arbitrary timings of ethernet packets, keyboard and mouse input, etc.

There's also Bruce Schneier's Yarrow PRNG server. Not truly random, but considered cryptographically secure.

... and also EGD, the Entropy Gathering Daemon. Written in Perl and hence portable across many platforms.

slim
I would wager that this is essentially what that LavaRnd program the OP mentioned does -- I don't think LavaRnd adds anything that isn't available in most OSes, except perhaps cross-platform portability.
rmeador
The Lava in LavaRnd is a real Lava lamp, the random numbers are computed from images taken with a webcam. Last I heard this wasn't a feature in most OSs.
starblue
I see no reference to a Lava lamp on the LavaRnd web site. It says their chaotic source is a CCD in a dark box.
slim
+1  A: 

I've always been a fan of the Quantum Random Bit Generator: http://random.irb.hr/

job
+1  A: 

There is an article in c't 2/2009 on true and pseudo random numbers. Other than LavaRnd also RandCam and VIA's PadLock are discussed.

starblue
A: 

"True random" generators are based on some form of physical white noise. The thing is, it's randomness is disputable. There are even projects to prove otherwise (although I'm rather skeptic about it)

vartec
+2  A: 

For true random numbers, nothing beats particle physics and the good old Geiger Counter. You can get one with a USB interface for around $200.

DrJokepu
+1  A: 

As ramdom number generators go I have always liked the one made from lego....

TheAlbear
+1  A: 

I've always wanted to buy either the PCI or USB Quantum Random Number Generator, but I have no idea what they cost, and frankly it might be a lot! They do deliver a staggering 16 Mibit/s and 4 Mibit/s respectively of random numbers, though, usable on both *NIX boxes and Windows. That's more than I'd ever need!

Other than that, how 'bout a book full of 'em? A Million Random Digits with 100,000 Normal Deviates is perhaps the coolest book they sell on Amazon! I've yet to buy it, but it's only a matter of time. Must be very handy to have such a stock of true random numbers on your book shelve!

Sebastian Krog
A: 

You could try a nice hot cup of tea.

Dave Webb