You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let me first link to this post I wrote a while ago around the OS interfaces to OsRng and error handling. A half year has passed, and I think we are in a pretty good shape now.
Only four things left:
We do not yet support the getrandom syscall on Solaris.
We are not using the syscall interface on Linux on all platforms yet. I think NR_GETRANDOM for powerpc is 359, instead of the 384 we use now, but I'm not sure. And for s390x it may be 349.
On old Linux versions, NetBSD and possibly others, first try reading from /dev/random with O_NONBLOCK so we know the system is properly seeded, and only then open /dev/urandom (the preferred random device). This prevents us reading from the OS RNG while it is not yet properly seeded, which may happen very early in the boot process on for example virtual machines, which /dev/urandom does not prevent.
Do we want to provide some future that reports when the OS RNG is ready? If I remember right, on Linux, Solaris and NetBSD /dev/random and getrandom can return an error if it is not yet seeded. It is then possible to poll on /dev/random and be notified when it becomes available.
The text was updated successfully, but these errors were encountered:
Let me first link to this post I wrote a while ago around the OS interfaces to
OsRng
and error handling. A half year has passed, and I think we are in a pretty good shape now.Only four things left:
getrandom
syscall on Solaris.NR_GETRANDOM
forpowerpc
is 359, instead of the 384 we use now, but I'm not sure. And fors390x
it may be 349./dev/random
withO_NONBLOCK
so we know the system is properly seeded, and only then open/dev/urandom
(the preferred random device). This prevents us reading from the OS RNG while it is not yet properly seeded, which may happen very early in the boot process on for example virtual machines, which/dev/urandom
does not prevent.future
that reports when the OS RNG is ready? If I remember right, on Linux, Solaris and NetBSD/dev/random
andgetrandom
can return an error if it is not yet seeded. It is then possible to poll on/dev/random
and be notified when it becomes available.The text was updated successfully, but these errors were encountered: