|RANDOM(4)||Device Drivers Manual||RANDOM(4)|
— random data source device
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,
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.
random device first appeared in Linux in
devices have been available since OpenBSD 2.0.
No randomness testing suite provided.
|November 10, 2017||OpenBSD-6.4|