21 ms·
> /dev/random found on other BSDs is equivalent to Linux's /dev/urandom. This isn't quite true. The BSDs random (and urandom) block until initially seeded, un
by loeg 8y ago
> /dev/random found on other BSDs is equivalent to Linux's /dev/urandom.
This isn't quite true. The BSDs random (and urandom) block until initially seeded, unlike Linux's urandom. Then they don't block. (Like the getrandom/getentropy behavior.)
> The current recommended practice is to call getrandom() system call (and arc4random() on BSDs) when it's available, instead of reading from raw /dev/random or /dev/urandom. It blocks when the CSPRNG is initialized, but otherwise it always outputs something.
+1 (I'd phrase that as "blocks until the CSPRNG is initialized," which for non-embedded systems will always be before userland programs can even run, and for embedded should not take long after system start either).
- segfaultbuserr 8y agoThanks for the correction, fixed. It was a bit difficult for me to paraphrase it...