Re: Recommendation for Pseudo-Random Number Generator Written in or Callable from C?



Alexander Klauer <aklauer@xxxxxxxxxxxxxxxxxxxxx> writes:
David Schwartz wrote:

[...]

The difference between /dev/random and /dev/urandom, when the pool is
properly seeded, is that /dev/random is believed to be truly random
while /dev/urandom is only pseudo-random. That makes no different to
you (nor, IMO, to anyone except a philosopher).

That being said, it should be pointed out that if you use random numbers for
a different purpose than the one stated (such as a human-vs-computer
blackjack application for example), it may very well make a difference
whether you use /dev/random or /dev/urandom. Specifically, some pseudo-RNGs
have the property that an intelligent observer can guess the next generated
number from relatively few previously generated numbers. The Mersenne
twister is notorious in this respect.

According to the corresponding documentation, no attack of this kind
against the algorithm(s) used to generate the numbers from the
/dev/urandom PRNG exists in unclassified literature. Something which
might be of interest in this context:

http://lwn.net/Articles/184925

I don't know whether there are standardised semantics for /dev/urandom which
prevent such problems.

/dev/urandom is a completely non-standardized Linux-feature.
.



Relevant Pages

  • Re: real random
    ... The Mersenne ... Twister is likely to give you better pseudo-random numbers than ... your implementation's rand(), but they're still pseudo-random, ...
    (comp.lang.c)
  • Re: real random
    ...  The Mersenne ... Twister is likely to give you better pseudo-random numbers than ... your implementation's rand(), but they're still pseudo-random, ...
    (comp.lang.c)
  • Re: real random
    ... Twister is likely to give you better pseudo-random numbers than ... your implementation's rand(), but they're still pseudo-random, ... correlation between successive values. ...
    (comp.lang.c)
  • Re: real random
    ... Twister is likely to give you better pseudo-random numbers than ... your implementation's rand(), but they're still pseudo-random, ... correlation between successive values. ...
    (comp.lang.c)
  • Re: Recommendation for Pseudo-Random Number Generator Written in or Callable from C?
    ... "Rainer Weikusat" wrote in message ... while /dev/urandom is only pseudo-random. ... a different purpose than the one stated (such as a human-vs-computer ... The Mersenne ...
    (comp.unix.programmer)