3 ms·
> urandom by definition doesn't block. That's precisely why getrandom(2) is preferred on newer kernels, and the following hacky workaround from the article is
by CiPHPerCoder 10y ago
> urandom by definition doesn't block.
That's precisely why getrandom(2) is preferred on newer kernels, and the following hacky workaround from the article is given on older kernels:
For software that runs during the Linux boot, poll /dev/random until it's available.
This means /dev/urandom has been seeded and you can safely read from /dev/urandom for
all your cryptographic purposes. Don't read from /dev/random.