lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9o1zhtq=bMetwEx7YEzoW79z36BQ=vTWEv4M_ocChm5eA@mail.gmail.com>
Date:   Wed, 4 May 2022 02:45:46 +0200
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     Dominik Brodowski <linux@...inikbrodowski.net>
Cc:     Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] random: mix hwgenerator randomness before sleeping

Hi Dominik,

On Tue, May 3, 2022 at 9:56 PM Dominik Brodowski
<linux@...inikbrodowski.net> wrote:
>
> Am Tue, May 03, 2022 at 09:51:41PM +0200 schrieb Jason A. Donenfeld:
> > The add_hwgenerator_randomness() function is called in a loop from a
> > kthread by the hwgenerator core. It's supposed to sleep when there's
> > nothing to do, and wake up periodically for more entropy. Right now it
> > receives entropy, sleeps, and then mixes it in. This commit reverses the
> > order, so that it always mixes in entropy sooner and sleeps after. This
> > way the entropy is more fresh.
>
> ... however, the hwgenerator may take quite some time to accumulate entropy
> after wakeup. So now we might have a delay between a wakeup ("we need more
> entropy!") and that entropy becoming available. Beforehand, the thread only
> went to sleep when there is no current need for "fresh" entropy.

Huh, interesting consideration. I didn't think about that. You wrote,
"hwgenerator may take quite some time to accumulate entropy" -- any
idea how long in the worst case? A second? A minute?

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ