public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: linux@horizon.com
Cc: jlcooke@certainkey.com, linux-kernel@vger.kernel.org, tytso@mit.edu
Subject: Re: Fortuna
Date: Sat, 16 Apr 2005 12:22:35 -0700	[thread overview]
Message-ID: <20050416192235.GC21897@waste.org> (raw)
In-Reply-To: <20050416171622.12751.qmail@science.horizon.com>

On Sat, Apr 16, 2005 at 05:16:22PM -0000, linux@horizon.com wrote:
> > "How does the entropy estimator measure entropy of the event?" becomes a
> > crucial concern here.  What if, by your leading example, there is 1/2 bit
> > of entropy in each event?  Will the estimator even account for 1/2 bits?
> > Or will it see each event as 3 bits of entropy?  How much of a margin
> > of error can we tolerate?
> 
> H'm... the old code *used* to handle fractional bits, but the new code
> seems to round down to the nearest bit.  May have to get fixed to
> handle low-rate inputs.

I don't believe that was ever true, though it can fairly trivially be added.
JLC, please note that entropy estimation is much more conservative now
than it was a month ago.

> As for margin of error, any persistent entropy overestimate is Bad.
> a 6-fold overestimate is disastrous.
> 
> What we can do is refuse to drain the main pool below, say, 128 bits of
> entropy.  Then we're safe against any *occasional* overestimates
> as long as they don't add up to 128 bits.

I've been moving in that direction already, most of the infrastructure
is already in place.

> > /dev/random will output once it has at least 160 bits of entropy
> > (iirc), 1/2 bit turning into 3 bits would mean that 160bits of output
> > it effectively only 27 bits worth of true entropy (again, assuming the
> > catastrophic reseeder and output function don't waste entropy).
> > 
> > It's a lot of "ifs" for my taste.
> 
> /dev/random will output once it has as many bits of entropy as you're
> asking for.  If you do a 20-byte read, it'll output once it has 160
> bits.  If you do a 1-byte read, it'll output once it has 8 bits.

That's not quite right. It needs 8 bits in the relevant output pool.
Failing that, it needs 64 bits in the input pool to reseed the output
pool. In the case of /dev/urandom, it needs 128 bits in the input
pool, it always leaves enough for /dev/random to reseed.

-- 
Mathematics is the supreme nostalgia of our time.

  reply	other threads:[~2005-04-16 19:22 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14 14:15 Fortuna linux
2005-04-14 13:33 ` Fortuna Theodore Ts'o
2005-04-15  1:34   ` Fortuna linux
2005-04-15 14:42     ` Fortuna Theodore Ts'o
2005-04-15 15:38       ` Fortuna linux
2005-04-15 18:23         ` Fortuna Theodore Ts'o
2005-04-15 16:22       ` Fortuna Jean-Luc Cooke
2005-04-15 16:50         ` Fortuna linux
2005-04-15 17:04           ` Fortuna Jean-Luc Cooke
2005-04-16 10:05             ` Fortuna linux
2005-04-16 15:46               ` Fortuna Jean-Luc Cooke
2005-04-16 17:16                 ` Fortuna linux
2005-04-16 19:22                   ` Matt Mackall [this message]
2005-04-16 19:00               ` Fortuna Matt Mackall
2005-04-17  0:19               ` Fortuna David Wagner
2005-04-16  1:28           ` Fortuna David Wagner
2005-04-15 19:34         ` Fortuna Matt Mackall
2005-04-16  1:25   ` Fortuna David Wagner
2005-04-19 19:27   ` Fortuna Patrick J. LoPresti
2005-04-14 14:52 ` Fortuna Jean-Luc Cooke
2005-04-15  0:52   ` Fortuna linux
2005-04-16  1:19   ` Fortuna David Wagner
2005-04-16  1:08 ` Fortuna David Wagner
2005-04-18 19:13   ` Fortuna Matt Mackall
2005-04-18 21:40     ` Fortuna David Wagner
2005-04-19  4:01       ` Fortuna Theodore Ts'o
2005-04-19  4:31         ` Fortuna David Wagner
2005-04-20  7:06           ` Fortuna Theodore Ts'o
  -- strict thread matches above, loose matches on Subject: below --
2005-04-17  9:21 Fortuna linux
2005-04-16 11:44 Fortuna linux
2005-04-16 11:10 Fortuna linux
2005-04-16 15:06 ` Fortuna Jean-Luc Cooke
2005-04-16 16:30   ` Fortuna linux
2005-04-17  0:37   ` Fortuna David Wagner
2005-04-16 23:40 ` Fortuna David Wagner
2005-04-17  0:36 ` Fortuna David Wagner
2005-04-13 23:43 Fortuna Jean-Luc Cooke
2005-04-14  0:09 ` Fortuna Matt Mackall
2005-04-14  0:26   ` Fortuna Jean-Luc Cooke
2005-04-14  0:44     ` Fortuna Matt Mackall
2005-04-16  1:02       ` Fortuna David Wagner

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=20050416192235.GC21897@waste.org \
    --to=mpm@selenic.com \
    --cc=jlcooke@certainkey.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=tytso@mit.edu \
    /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