Submitting upstream from OpenBSD tree:
The random_device is an abstraction to the underlying OS PRNG. In OpenBSD's case, we know it has optimal entropy properties so specify what that is.
Differential D94571
[libcxx] random_device, for OpenBSD specify optimal entropy properties brad on Jan 12 2021, 5:36 PM. Authored by
Details
Submitting upstream from OpenBSD tree: The random_device is an abstraction to the underlying OS PRNG. In OpenBSD's case, we know it has optimal entropy properties so specify what that is.
Diff Detail Event Timeline
Comment Actions I thought OpenBSD and Linux might behave the same in that regard. It does look like OpenBSD has ioctl, but not RNDGETENTCNT: https://man.openbsd.org/ioctl.2. Can you confirm this? |
Couldn't we do a better job and use ioctl on Linuxes? See cppreference: https://en.cppreference.com/w/cpp/numeric/random/random_device/entropy