tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: getrandom and getentropy

On Sat, May 09, 2020 at 10:56:51PM +0000, Taylor R Campbell wrote:
> Given that, I think it is reasonable to implement getentropy(...)  as
> an alias for getrandom(..., GRND_INSECURE) == read from /dev/urandom
> == sysctl kern.arandom (as nia@ just committed the other day), which
> is consistent with the somewhat nuanced interpretation of the
> semantics above, and to provide getrandom(...,0) as I originally
> suggested alongside it.

Given that getentropy as KERN_ARND is good enough for everyone, why not
stick #define getrandom(a,b,c) getentropy(a,b) In some header?

Home | Main Index | Thread Index | Old Index