All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Marques <pmarques@grupopie.com>
To: linux-os@analogic.com
Cc: "Patrick J. LoPresti" <patl@curl.com>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: /dev/random vs. /dev/urandom
Date: Mon, 10 Jan 2005 13:03:37 +0000	[thread overview]
Message-ID: <41E27D29.2040001@grupopie.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0501100735210.19253@chaos.analogic.com>

linux-os wrote:
> [...]
> One is free to use any number of samples. The short number of samples
> was DELIBERATELY used to exacerbate the problem although a number
> or nay-sayers jumped on this in an attempt to prove that I don't
> know what I'm talking about.

It seems to me that you actually don't.

Since this is a *uniform* distribution in the range [0..2^N[, than any 
of those N bits must also show a uniform distribution, or the 
distribution of the sum of the bits wouldn't be uniform. (isn't this 
obvious?)

It would be different of course, if this was not a uniform distribution, 
or the range was not a power of 2...

Of course, I agree that throwing away 5 bits in every byte of perfect 
entropy that the kernel worked so hard to gather is just wrong, but the 
randomness of the result is not the reason why.

> In the first place, the problem was to display the error of using
> an ANDing operation to truncate a random number. In the limit,
> one could AND with 0 and show that all randomness has been removed.

Not really.. you just get a perfect random uniform distribution if the 
range [0..0] :)

-- 
Paulo Marques - www.grupopie.com

"A journey of a thousand miles begins with a single step."
Lao-tzu, The Way of Lao-tzu


  reply	other threads:[~2005-01-10 13:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-07 19:05 /dev/random vs. /dev/urandom Ron Peterson
2005-01-07 19:16 ` Paulo Marques
2005-01-07 19:24 ` Chris Friesen
2005-01-07 19:26 ` Florian Weimer
2005-01-07 19:27 ` linux-os
2005-01-07 19:40 ` Robert Love
2005-01-07 20:50   ` Ron Peterson
2005-01-07 21:39 ` Andries Brouwer
2005-01-07 22:39   ` linux-os
2005-01-07 17:55     ` Michal Schmidt
2005-01-07 23:29     ` Andries Brouwer
2005-01-08 17:34     ` Patrick J. LoPresti
2005-01-10 12:41       ` linux-os
2005-01-10 13:03         ` Paulo Marques [this message]
2005-01-10 14:39           ` Felipe Alfaro Solana
2005-01-10 15:13         ` Patrick J. LoPresti
2005-01-10 19:24         ` David Schwartz
2005-01-11 14:38         ` Andrea Arcangeli

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=41E27D29.2040001@grupopie.com \
    --to=pmarques@grupopie.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=patl@curl.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.