Messages in this thread | | | Date | Mon, 16 Mar 1998 15:25:37 -0500 | From | "Theodore Y. Ts'o" <> | Subject | Re: kernel security questions |
| |
Date: Mon, 16 Mar 1998 14:31:05 -0500 (EST) From: Jon Lewis <jlewis@inorganic5.fdt.net>
> /dev/urandom and /dev/random use the same algorithm for generating > random numbers, and so their speed is the same. The big difference > between the two is that the random number generator keeps traccxcxcx
If you try to read signifigant amounts of data from both /dev/random and /dev/urandom, you'll find urandom to be orders of magnitude faster. Perhaps this is just because /dev/random runs out of random bytes and makes you wait for more to accumulate.
Sorry, my keyboard malfuctioned while I was sending this (and I had to wait to get a new Sun type 5 keyboard)....
Yes, the only difference is that /dev/random runs out of random bytes and it makes you wait for more to be accumulated. Note that on some systems, it can block for a long time waiting for new user-gneerated entry to be entered into the system. So you have to use care before using /dev/random. (Perhaps the best thing to do is to use it when you're generating sensitive keying information, and you tell the user to pound on the keyboard repeatedly until you print out "OK, enough".)
- Ted
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |