*** Welcome to piglix ***

Yarrow algorithm


The Yarrow algorithm is a family of cryptographic pseudorandom number generators (PRNG) devised by John Kelsey, Bruce Schneier and Niels Ferguson. The Yarrow algorithm is explicitly unpatented, royalty-free and open source; no license is required to use it. Yarrow is incorporated in iOS and Mac OS X for their /dev/random devices, as did FreeBSD in the past.

An improved design from Ferguson and Schneier, Fortuna, is described in their book, Practical Cryptography, and FreeBSD has now moved to using this.

The name Yarrow alludes to the use of the yarrow plant in the random generating process of I Ching divination. Since the Xia dynasty (c. 2070 to c. 1600 BCE), Chinese have used yarrow stalks for divination. Fortunetellers divide a set of 50 yarrow stalks into piles and use modulo arithmetic recursively to generate two bits of random information that have a non-uniform distribution.

One of the most important principles of Yarrow is to make a PRNG that is better at resisting real-world attack. The former widely used designs such as ANSI X9.17, RASREF 2.0 PRNG, have loopholes that provide attackers opportunities under some circumstances. Some of them are not intentionally designed to face real-world attacks. Another principle of Yarrow is that system designers with little knowledge about how the PRNG works can incorporate it into their own real-world product fairly easily.

The design of Yarrow consists of four major components including an entropy accumulator, reseed mechanism, generation mechanism and reseed control.


...
Wikipedia

...