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
This commit introduces the VirtIO entropy device (also know as virtio-rng in
QEMU and the Linux kernel) to resolve the blocking issue of arc4random_buf()
[1] caused by insufficient entropy of /dev/random.
According to the man page (`man 7 random`):
The kernel random-number generator relies on entropy gathered from device
drivers and other sources of environmental noise to seed a cryptographically
secure pseudorandom number generator (CSPRNG).
Interface Pool: /dev/random
Pool: Blocking pool
Blocking behavior: If entropy too low, blocks until there is enough entropy
Behavior when pool is not yet ready: Blocks until enough entropy gathered
Quaoted from https://en.wikipedia.org/wiki//dev/random
With Linux kernel 3.16 and newer, the kernel itself mixes data from hardware
random number generators into /dev/random on a sliding scale based on the
definable entropy estimation quality of the HWRNG. This means that no userspace
daemon, such as rngd from rng-tools, is needed to do that job. With Linux
kernel 3.17+, the VirtIO RNG was modified to have a default quality defined
above 0, and as such, is currently the only HWRNG mixed into /dev/random by
default.
[1] https://elixir.bootlin.com/glibc/glibc-2.36/source/stdlib/arc4random.cClose#68.
0 commit comments