Fortuna (PRNG)

Fortuna (PRNG)

Fortuna is a cryptographically secure pseudorandom number generator (PRNG) devised by Bruce Schneier and Niels Ferguson. It is named after Fortuna, the Roman goddess of chance.

More precisely, Fortuna is a "family" of secure PRNGs; its designleaves some choices open to implementors. It is composed of the following pieces:
* The generator itself, which once seeded will produce an indefinite quantity of pseudo-random data.
* The entropy accumulator, which collects genuinely random data from various sources and uses it to reseed the generator when enough new randomness has arrived.
* The seed file, which stores enough state to enable the computer to start generating random numbers as soon as it has booted.

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. On its own, this would produce statistically identifiable deviations from randomness; for instance, generating 265 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 2128 produced by a 128-bit cipher in counter mode. Therefore, the key is changed periodically: no more than 1 MiB of data is generated without a key change. The key is also changed after every data request (however small), so that a key compromise doesn't endanger old RNG outputs.

The entropy accumulator is designed to be resistant against "injection" attacks, without needing sophisticated (and inevitably unreliable) estimators of entropy. There are several "pools" of entropy; each entropy source distributes its alleged entropy evenly over the pools; and (here is the key idea) on the "n"th reseeding of the generator, pool "k" is used only if 2"k" divides "n". Thus, the "k"th pool is used only 1/2"k" of the time. Higher-numbered pools, in other words, (1) contribute to reseedings less frequently but (2) collect a larger amount of entropy between reseedings. Reseeding is performed by hashing the specified entropy pools into the block cipher's key using two iterations of SHA-256.

Unless an attacker is able to control "all" the sources of alleged entropy flowing into the system (in which case no algorithm can save it from compromise), there will be some "k" for which the "k"th pool collects enough entropy between reseedings that a reseeding with that pool ensures security. And that pool will be used at an interval proportional to the amount of entropy in question. Therefore, the system will always recover from an injection attack, and the time it takes to do so is at most a constant factor greater than the theoretical time it could take if we were able to identify which sources of entropy were corrupt and which not.

This conclusion depends on there being enough pools. Fortuna uses 32 pools, and restricts reseeding to happen at most 10 times per second. Running out of pools would then take about 13 years, which Ferguson and Schneier deem long enough for practical purposes. More paranoid implementors, or ones requiring the generation of random data at a colossal rate and correspondingly frequent reseeding, could use a larger number of pools.

Fortuna differs from the earlier Yarrow algorithm family of Schneier, Kelsey and Ferguson mostly in its handling of the entropy accumulator. Yarrow required each source of entropy to be accompanied by a mechanism for estimating the actual entropy supplied, and used only two pools; and its suggested embodiment (called "Yarrow-160") used SHA-1 rather than iterated SHA-256.

References

* Niels Ferguson and Bruce Schneier, "Practical Cryptography", published by Wiley in 2003. ISBN 0-471-22357-3.

External links

Implementations

* The [http://sourceforge.net/projects/clipperzlib Javascript Crypto Library] includes a Javascript implementation of Fortuna PRNG, open source, AGPL licensed.
* http://jlcooke.ca/random "Homepage for a patch adding an implementation of Fortuna to the Linux kernel; seems to still do some Yarrow-style entropy estimation"
* http://www.citadelsoftware.ca/fortuna/fortuna.htm "Fortuna implementation in C++ (with source code)"


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Fortuna (disambiguation) — Fortuna ( Latin and Spanish: fortune ) can mean:*Fortuna, the Roman goddess of luck (from the Greek Tyche)Geographical *19 Fortuna, an asteroid *Fortuna, California, a town located on the north coast of California *Fortuna, North Dakota, a town… …   Wikipedia

  • PRNG — Générateur de nombres pseudo aléatoires Un générateur de nombres pseudo aléatoires, pseudorandom number generator (PRNG) en anglais, est un algorithme qui génère une séquence de nombres présentant certaines propriétés du hasard. Par exemple, les… …   Wikipédia en Français

  • Криптографически стойкий генератор псевдослучайных чисел — (англ. Cryptographically secure pseudorandom number generator, CSPRNG)  это генератор псевдослучайных чисел с определенными свойствами, позволяющими использовать его в криптографии. Многие прикладные задачи криптографии требуют случайных… …   Википедия

  • Pseudorandom number generator — A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG),[1] is an algorithm for generating a sequence of numbers that approximates the properties of random numbers. The sequence is not truly random in… …   Wikipedia

  • Generador de números pseudo-aleatorios criptográficamente seguro — Un Generador de números pseudo aleatorios criptográficamente seguro (CSPRNG, del inglés «Cryptographically Secure PseudoRandom Number Generator») es un Generador de números pseudo aleatorios (PRNG) con características que lo hacen adecuado para… …   Wikipedia Español

  • Hardware random number generator — This SSL Accelerator computer card uses a hardware random number generator to generate cryptographic keys to encrypt data sent over computer networks. In computing, a hardware random number generator is an apparatus that generates random numbers… …   Wikipedia

  • Cryptographically secure pseudorandom number generator — A cryptographically secure pseudo random number generator (CSPRNG) is a pseudo random number generator (PRNG) with properties that make it suitable for use in cryptography. Many aspects of cryptography require random numbers, for example: Key… …   Wikipedia

  • Topics in cryptography — This article is intended to be an analytic glossary , or alternatively, an organized collection of annotated pointers.Classical ciphers*Autokey cipher *Permutation cipher*Polyalphabetic substitution **Vigenère cipher*Polygraphic substitution… …   Wikipedia

  • Code pseudo-aléatoire — Générateur de nombres pseudo aléatoires Un générateur de nombres pseudo aléatoires, pseudorandom number generator (PRNG) en anglais, est un algorithme qui génère une séquence de nombres présentant certaines propriétés du hasard. Par exemple, les… …   Wikipédia en Français

  • Fonction pseudo-aléatoire — Générateur de nombres pseudo aléatoires Un générateur de nombres pseudo aléatoires, pseudorandom number generator (PRNG) en anglais, est un algorithme qui génère une séquence de nombres présentant certaines propriétés du hasard. Par exemple, les… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”