[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: [LI] /dev/random & /dev/urandom - d..uh what is it?????
On Wed, Jan 19, 2000 at 09:26:56AM +0700, Pankaj Mathur wrote:
> just now came across two things called /dev/random & /dev/urandom. Out of
> curiosity I did cat for both of them and my screen was filled with all
> garbled stuff. What are these anyway and what possible use it has on an OS?
If you have install your kernel sources, go through the comments in
/usr/src/linux/drivers/char/random.c. The comments are *very* comprehensive.
Quoting relevant parts...
<quote>
* This routine gathers environmental noise from device drivers, etc.,
* and returns good random numbers, suitable for cryptographic use.
* Besides the obvious cryptographic uses, these numbers are also good
* for seeding TCP sequence numbers, and other places where it is
* desirable to have numbers which are not only random, but hard to
* predict by an attacker.
<snip>
* The two other interfaces are two character devices /dev/random and
* /dev/urandom. /dev/random is suitable for use when very high
* quality randomness is desired (for example, for key generation or
* one-time pads), as it will only return a maximum of the number of
* bits of randomness (as estimated by the random number generator)
* contained in the entropy pool.
*
* The /dev/urandom device does not have this limit, and will return
* as many bytes as are requested. As more and more random bytes are
* requested without giving time for the entropy pool to recharge,
* this will result in random numbers that are merely cryptographically
* strong. For many applications, however, this is acceptable.
</quote>
--vml,
Model Engg. College,
Cochin
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.