Re: /dev/random not generating random data
From: Unruh (unruh-spam_at_physics.ubc.ca)
Date: 05/24/05
- Next message: JEDIDIAH: "Re: See The Rabid, Psychotic Linux Advocate in It's Own Element!! (Linux Sucks!!)"
- Previous message: Robert H. Wiley: "Command Line Attachments UUENCODE/MIME64?"
- In reply to: Mihai Osian: "Re: /dev/random not generating random data"
- Next in thread: Sybren Stuvel: "Re: /dev/random not generating random data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 May 2005 16:23:06 GMT
Mihai Osian <zzz@zzz.com> writes:
> Before looking further you should decide if the random() function from
>stdlib is not good enough for whatever purpose you have. Look for
The random function is crytographically a joke. It is good formonte-Carlo
simulations or other simulations in which what you want is some flat
distribution of outcomes which jump around, but for cryptographic purposes
it should not be used. Ie, with very few outputs you can determine the
initial seed and predict all future outputs.It has the advantage for
simulations of giving the same output for the same seed, and thus you can
rerun a simulation exactly.
/dev/urandom however is a cryptographically strong random number generator
It is continually reseeded with physically random sources.
There is no known way of predicting future output, no matter how long a
stream of output you have. It is however much slower than random() so if
you are carrying out a simulation with 10^10 runs, urandom is NOT the thing
to use.
>example at the small program below - you will see that it produces a
>flat distribution within 1-2%. For my usage (statistical computations)
>is good enough. For cryptography it is a different story.
> Just to give you another direction to look - some motherboards (even
>CPUs) have a hardware random number generator which uses thermal noise.
>Read this: http://www.ibiblio.org/peanut/Kernel-2.6.10/hw_random.txt . I
>have zero experience with this stuff, so I can't tell you more.
Yes, that is another route. I do not know if /dev/random and /dev/urandom
writers are planning on including such generators in their list of physical
sources. Again they will be slow, and the software using them
will have to be carefully constructed to remove the biases present in any
physical source of randomness.
- Next message: JEDIDIAH: "Re: See The Rabid, Psychotic Linux Advocate in It's Own Element!! (Linux Sucks!!)"
- Previous message: Robert H. Wiley: "Command Line Attachments UUENCODE/MIME64?"
- In reply to: Mihai Osian: "Re: /dev/random not generating random data"
- Next in thread: Sybren Stuvel: "Re: /dev/random not generating random data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|