Re: [PATCH] (0/4) Entropy accounting fixes

From: Oliver Xymoron (
Date: Wed Aug 21 2002 - 07:47:38 EST

On Wed, Aug 21, 2002 at 10:44:10AM +0200, Rogier Wolff wrote:
> On Sat, Aug 17, 2002 at 08:08:36PM -0700, Linus Torvalds wrote:
> >
> > On Sat, 17 Aug 2002, Oliver Xymoron wrote:
> > >
> > > Let me clarify that 2-5 orders thing. The kernel trusts about 10 times
> > > as many samples as it should, and overestimates each samples' entropy
> > > by about a factor of 10 (on x86 with TSC) or 1.3 (using 1kHz jiffies).
> >
> > Lookin gat the code, your _new_ code just throws samples away _entirely_
> > just because some random event hasn't happened (the first thing I noticed
> > was the context switch testing, there may be others there that I just
> > didn't react to).
> Oliver,
> Let me state that with a proper mixing function you should always
> mix in possible entropy sources, even if they CAN be controlled
> from the outside.
> If you mistrust the source, feel free to add (almost) zero to the
> "proven entropy".
> Now, how about keeping both a conservative and a bit more liberal
> count of the entropy in the pool? Then we can have three device
> nodes, which provide random entropy. One should follow YOUR rules,
> and can only be used on desktop machines with humans typing and
> mousing at the console (that's your proposition for "random").
> The other is useful for random numbers for keys and such (that's
> our current "random"). The last is our old urandom.

My current version adds a sysctl that lets you assign between 0.01 and 1
bits to untrusted sources, defaulting to 0. Headless folks without
hardware RNGs can use it to get ample amounts of entropy from network
packets (together with patches that turn on SA_SAMPLE_RANDOM for
NICs). I believe this should be acceptable to all parties - I'll
resend sometime soon.

 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:22 EST