|
-
May 2nd, 2007, 06:08 AM
#1
Real random number generator
I need to use randomness in my application in I'm not use that the pseudo-random rand() function will be random enough.
Where can I find a real random generator?
-
May 2nd, 2007, 07:13 AM
#2
Re: Real random number generator
-
May 2nd, 2007, 06:38 PM
#3
Re: Real random number generator
Please refer X9.31 PRNG which is a true Pseudo Random Number Generator which takes into consideration all entropies. One possible place to refer it would be the Openssl implementation.
Thanks.
C++ is divine.
-
May 2nd, 2007, 07:53 PM
#4
Re: Real random number generator
If all you need is a better pseudo-random number generator (you're correct that the built-in rand() function is not that good), then Google for Mersenne Twister and you will get literally thousands of hits. Here's one: "Mersenne Twister Random Number Generator" at http://www-personal.engin.umich.edu/...neTwister.html
Here's another: "Pseudo random number generators" at http://www.agner.org/random/
Both include source code and a discussion of results/performance.
If you need a "true" random number generator, then this implies that there is a source of true entropy. See the "True Random Number Generator" section in this Wikipedia article: "List of random number generators" at http://en.wikipedia.org/wiki/List_of...ber_generators
Mike
Last edited by MikeAThon; May 2nd, 2007 at 08:03 PM.
-
May 3rd, 2007, 01:56 AM
#5
Re: Real random number generator
Point is, only with software, you can only get pseudo-number generators. Computers are deterministic and so is the software. If you want true random numbers you must use a hardware device to generate them.
My question is: what kind of application do you have that requires random numbers?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|