From: Oliver Xymoron <oxymoron@waste.org>
To: linux-kernel@vger.kernel.org
Cc: Andreas Dilger <adilger@clusterfs.com>
Subject: Re: Problem with random.c and PPC
Date: Sat, 17 Aug 2002 11:56:40 -0500 [thread overview]
Message-ID: <20020817165640.GB21829@waste.org> (raw)
In-Reply-To: <20020817090950.GN9642@clusterfs.com>
On Sat, Aug 17, 2002 at 03:09:50AM -0600, Andreas Dilger wrote:
> >
> > Not sure this is an ideal fix. We might instead have an entropy
> > low-water mark (say 1/2 pool size), below which /dev/urandom will not
> > deplete the pool. This way when we have ample entropy, both devices
> > will behave like TRNGs, with /dev/urandom falling back to PRNG when a
> > shortage is threatened.
>
> Well, I can think of a few mechanisms that would work better than a
> simple on/off method that you are proposing. The current code will
> basically "fill" the urandom pool each time it is depleted, and then
> when the entropy is gone it will just go on dumping out data. You
> could make urandom only get more entropy each N times through its pool,
> or make N a function of the "fullness" of the available entropy. Then
> if a system has lots of entropy sources urandom is TRNG, but if not
> it will gracefully degrade from TRNG to PRNG without wiping out all
> the entropy in the process.
>
> As an alternative, instead of taking poolsize bytes of entropy each
> N uses, you could take some small amount of entropy to mix into the
> pool slowly.
Actually, that gives us exactly the scenario catastrophic reseeding
intends to avoid. Presume for a moment that the internal state of the
PRNG is somehow known to an attacker - the PRNG has been broken. If we
take eight bits out of the entropy pool, mix them in, then generate a
new random number, an attacker needs to only test 256 possible pool
states before he knows the entire state again. If he keeps up this
state extension attack, /dev/urandom will never return to an unknown
state. If, on the other hand, /dev/urandom waits until there are, say,
64 entropy bits to mix in, it can make a leap to a state that the
attacker will have a very hard time guessing and the PRNG has
recovered.
We merely need to avoid starvation of /dev/random, and I think a
straightforward low watermark approach will do that nicely. Starving
/dev/urandom is no worse than feeding it a trickle.
--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."
next prev parent reply other threads:[~2002-08-17 16:52 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-16 10:00 Jon Burgess
2002-08-16 19:52 ` Oliver Xymoron
2002-08-16 17:51 ` henrique
2002-08-16 21:21 ` Ruth Ivimey-Cook
2002-08-17 0:47 ` Oliver Xymoron
2002-08-17 0:45 ` Oliver Xymoron
2002-08-17 6:05 ` Andreas Dilger
2002-08-17 7:23 ` Oliver Xymoron
2002-08-17 9:09 ` Andreas Dilger
2002-08-17 16:56 ` Oliver Xymoron [this message]
2002-08-19 9:29 ` Marco Colombo
2002-08-19 14:02 ` Oliver Xymoron
2002-08-19 15:11 ` Marco Colombo
2002-08-19 15:29 ` Oliver Xymoron
2002-08-19 16:20 ` Marco Colombo
2002-08-19 16:33 ` Oliver Xymoron
2002-08-19 20:23 ` Marco Colombo
2002-08-22 3:16 ` David Wagner
2002-08-16 20:52 ` Chris Friesen
2002-08-17 0:29 ` Oliver Xymoron
2002-08-22 3:19 ` David Wagner
2002-08-22 15:40 ` Chris Friesen
2002-08-22 17:25 ` Remco Post
-- strict thread matches above, loose matches on Subject: below --
2002-08-15 16:10 henrique
2002-08-15 15:14 henrique
2002-08-15 18:25 ` Andreas Dilger
2002-08-15 19:03 ` Tom Rini
2002-08-15 19:59 ` Andreas Dilger
2002-08-15 21:04 ` Tom Rini
2002-08-16 1:50 ` H. Peter Anvin
2002-08-16 16:33 ` Oliver Xymoron
2002-08-16 16:28 ` Oliver Xymoron
[not found] ` <20020816170126.GD26993@opus.bloom.county>
2002-08-16 17:15 ` Oliver Xymoron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020817165640.GB21829@waste.org \
--to=oxymoron@waste.org \
--cc=adilger@clusterfs.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®