It’s really quite different. I got rid of all but the block-once-at-boot behavior of /dev/random.
If you know you are targeting a new kernel, using /dev/random is reasonable. Better yet: use getrandom()/getentropy().
If you know you are targeting a new kernel, using /dev/random is reasonable. Better yet: use getrandom()/getentropy().
arc4random_buf(3) etc. also uses getentropy(2).
Not by itself, no.
> Should hardware RNGs on ME or PSP enabled CPUs be inherently be trusted?
Don't really have any choice. You can't defend against them.
No.
It's bad enough keeping up with the cruft dreamed up by POSIX; why add BSD functions that nobody uses outside of the BSD microcosm.
Glibc is monolithic; functions that nothing in your system uses are still sitting there in the .so image.
#if !HAVE_ARC4RANDOM
uint32_t arc4random_uniform(uint32_t upper_bound)
{
// ...
}
#endif
to their code? :)