Re: /dev/one - why not /dev/repeat?

Marcin Dalecki (dalecki@cs.net.pl)
Sun, 27 Dec 1998 00:59:40 +0100


Durandal@t-online.de wrote:
>
> > From: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
> > Date: Fri, 25 Dec 1998 21:40:51 -0400
> > Subject: Re: /dev/one - why not /dev/repeat?
>
> > As I said before, there is _nothing_ in /dev/random that the application
> > itself can't do, so this is at the very least a waste of a system call. Not
> > exactly efficient.
> You would loose the entropy pool feature; at least you wouldn't have
> access to good random sources such as interrupts.

This is wrong sice interrupts usually leave traces in the memory of
the system too. Otherwise the system wouldn't do much at all.
The entierly user space based method for generating
a random number generator seed in user space used for example by the X11
servers
for startup of the authentification system used there is MD5 over
/dev/mem.

Just do a cross correlation between /dev/mem and /dev/random to see why
this
is true.

One can think about many other methods to trigger hardware activity
directly
by the library used to generate a random number too. Just like for
exmaple
creating a temp file, deleting it or whatever to gather the time used
for this.

For most of the times this should be sufficient.
/dev/random and in esp. /dev/urandom is just plain security paranoia
and kernel bloat IMHO. /dev/urandom is using the values gathered by
/dev/random
as a seed and is mungling them with MD5 to provide a non blocking source
of pseudo random numbers. At least this part could remain compleatly in
the application/shared lib.

There are a lot of useless ioctrl impemented by it too, which just
appear
to be non documented non standard and mailny usefull for debugging like
many
leftovers from developement of /dev/random. Sames goes BTW. for the
console/terminal
code. It's just the coding style of the guy who did it...

I just wonder why there are no "magic" numbers there.

> > They are available on every Unixy system I know. If not, you can cobble
> > something up using the shell (a while loop + echo). Or you do have some
> > compiler at hand, so you can write a C (or whatever) proggie, using
> > random(3) as needed.
> I don't know where one would need random to implement a /dev/repeat.
> If you are refering to /dev/random, random(3) doesn't give you random
> numbers that are nearly the same quality as the /dev/random version
> (that's why they call it pseudo-random).

Ehm. random(3) doesn't give you any trully random numbers at all.
It's just that even from the standard's point of view the algorithms
used in it are strictly predicatble (and simple). random(3) is just
something usable
by for example games or therelike nothing serious indeed.

Regards

Marcin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/