[PATCH v1 1/2] random-bits: Factor out entropy generating function

Cristian Rodríguez crrodriguez@opensuse.org
Thu Mar 31 10:08:08 GMT 2022


On Thu, Mar 31, 2022 at 1:45 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> Can someone provide some context on this? I've actually looked into
> having some megafast userspace RNG component in the vDSO, and I'm not
> fundamentally opposed to the idea. I think there's interesting
> potential there and something worth considering. But what's the
> context of you asking for this now? Under what circumstances are you
> finding that calling getrandom(0) or similar is too high overhead or
> otherwise problematic?

I'm not sure in what scenario the syscall overhead is too big, Maybe
it is if called in a loop..but I guess the argument here is that
getrandom(0) may block  or that in a non-bleeding edge system it might
be too slow. (Im aware of the recent massive speedups)

I believe what is needed is a PRNG, no need to guarantee to be
cryptographically secure, that can be used without having to seed it
from userspace, mega fast, never blocks and can be used by the dynamic
linker for example. Now it will be awesome if it is all of that and
CSPRNG.


More information about the Libc-alpha mailing list