From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: Paul Dale <paul.dale@oracle.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
Jian J Wang <jian.j.wang@intel.com>,
edk2-devel-groups-io <devel@edk2.groups.io>,
"Lu, XiaoyuX" <xiaoyux.lu@intel.com>
Subject: Re: why does RAND_add() take "randomness" as a "double"?
Date: Fri, 24 May 2019 17:30:49 +0200 [thread overview]
Message-ID: <CAKv+Gu_VqNa-Kg0Wo0rCYf0CUCx0yTGKsCUXHBRyEvtMN+OYWA@mail.gmail.com> (raw)
In-Reply-To: <06ce80d4-02da-4323-af3b-0d0f8be3f6eb@default>
(remove openssl user list)
On Wed, 22 May 2019 at 03:48, Paul Dale <paul.dale@oracle.com> wrote:
>
> Double makes sense. Entropy is often estimated as a real value.
>
> E.g. we have the aforementioned coin flipper feeding data serially.
> Adding each bit sequentially means 0.125 bytes of entropy per call.
>
> Not the best example....
>
It looks like the people saying double is a good idea didn't actually
look at the code. The double argument is compared to a size_t cast to
double, and assigned that same value under some conditions.
I think the problem is that the double argument is part of the RAND
API, so they cannot easily change it.
next prev parent reply other threads:[~2019-05-24 15:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 14:15 why does RAND_add() take "randomness" as a "double"? Laszlo Ersek
2019-05-21 17:00 ` [edk2-devel] " Laszlo Ersek
2019-05-22 1:48 ` Paul Dale
2019-05-24 15:30 ` Ard Biesheuvel [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-05-21 12:34 Laszlo Ersek
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-list 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=CAKv+Gu_VqNa-Kg0Wo0rCYf0CUCx0yTGKsCUXHBRyEvtMN+OYWA@mail.gmail.com \
--to=devel@edk2.groups.io \
/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