Common · Knowledge
Fortuna (PRNG)
Cryptographically secure pseudorandom number generator
Fortuna is a cryptographically secure pseudorandom number generator (CS-PRNG) devised by Bruce Schneier and Niels Ferguson and published in 2003. It is named after Fortuna, the Roman goddess of chance. FreeBSD uses Fortuna for /dev/random and /dev/urandom is symbolically linked to it since FreeBSD 11.
Read more
Apple OSes have switched to Fortuna since 2020 Q1. Fortuna is a family of secure PRNGs; its design leaves some choices open to implementors. It is composed of the following pieces: The generator is based on any good block cipher. Practical Cryptography suggests AES, Serpent or Twofish. The basic idea is to run the cipher in counter mode, encrypting successive values of an incrementing counter. With a 128-bit block cipher, this would produce statistically identifiable deviations from randomness; for instance, generating 2 genuinely random 128-bit blocks would produce on average about one pair of identical blocks, but there are no repeated blocks at all among the first 2 produced by a 128-bit cipher in counter mode. Therefore, the key is changed periodically: no more than 1 MiB of data (2 128-bit blocks) is generated without a key change.
Text: Wikipédia, CC BY-SA 4.0. ·