Operating system services

Linux

  • /dev/random: blocking. Based on timing of keyword, mouse, interruption and hard drive.
  • /dev/urandom: non blocking. PRNG using /dev/random.

OpenBSD

  • /dev/random: use hardware random number generator
  • /dev/srandom and /dev/urandom: entropy pool data is converted in to output data using MD5. srandom blocks if entropy pool is empty, whereas urandom is non blocking.
  • /dev/prandom: Simple pseudo-random generator (?)
  • /dev/arandom: As required, entropy pool data re-seeds an ARC4 generator, which then generates high-quality pseudo-random output data.

Manual page: RANDOM(4).

FreeBSD

Sources of randomness from the environment include inter-keyboard timings, inter-interrupt timings from some interrupts, and other events which are both (a) non-deterministic and (b) hard for an outside observer to measure. Randomness from these sources are added to an “entropy pool”, which is periodically mixed using the MD5 compression function in CBC mode.

  • /dev/random: blocking
  • /dev/urandom: not blocking

Manual page: RANDOM(4).