— random data source
urandom device produces high quality
pseudo-random output data without ever blocking, even immediately after
booting. Entropy data is collected from system activity (such as disk,
network, and clock device interrupts), and then used to key a stream cipher
to generate the output.
urandom device is intended to be used
in scripts. In C programs, use the
arc4random(3) family of functions instead, which can be
called in almost all coding environments, including
pledge(2), and which avoids accessing a device every time.
Never use /dev/random. On OpenBSD, it does the same as /dev/urandom, but on many other systems, it misbehaves. For example, it may block, directly return entropy instead of using a stream cipher, or only return data from hardware random generators.
arc4random(3), amdpm(4), glxsb(4), pchb(4), arc4random(9)
random device first appeared in Linux in
devices have been available since OpenBSD 2.0.
No randomness testing suite provided.