Ref: https://www.kernel.org/doc/html/latest/admin-guide/hw_random.html
At some point (don't ask me why, or how), I seem to have convinced myself that using /dev/hwrng for VirtIO RNG in VM hardware configurations was preferred for performance and other reasons.
And from reading the above and some other sources, it does appear that the host CPU's actual hardware RNG can provide the most randomness versus the other options, under the right circumstances. But the tradeoff is that it's potentially blocking if the CPU can't keep up with the requests for randomness.
To that end, it seems /dev/urandom (the default) is recommended because it is (1) non-blocking, (2) draws from multiple entropy sources (it effectively cannot run out and block other processes); and (3) works well enough for all but the most highly-demanding/cryptographically security-sensitive applications.
Questions:
At some point (don't ask me why, or how), I seem to have convinced myself that using /dev/hwrng for VirtIO RNG in VM hardware configurations was preferred for performance and other reasons.
And from reading the above and some other sources, it does appear that the host CPU's actual hardware RNG can provide the most randomness versus the other options, under the right circumstances. But the tradeoff is that it's potentially blocking if the CPU can't keep up with the requests for randomness.
To that end, it seems /dev/urandom (the default) is recommended because it is (1) non-blocking, (2) draws from multiple entropy sources (it effectively cannot run out and block other processes); and (3) works well enough for all but the most highly-demanding/cryptographically security-sensitive applications.
Questions:
- In the self-hosting/home server/hobbyist space, is it indeed the recommendation to stick with /dev/urandom?
- Does the hardware matter (say, an 8th-gen Intel CPU vs. a 12th-gen Intel CPU)?
- If /dev/urandom is the general recommendation for the self-hosting/home server/hobbyist (or even small business) space, are there any specific workloads where it makes more sense to use /dev/hwrng?