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. An improved design from Ferguson and Schneier, Fortuna, is described in their book, Practical Cryptography. Yarrow is incorporated in iOS and Mac OS X for their /dev/random devices. FreeBSD also used Yarrow for /dev/random, but phased it out in favor of Fortuna.
About the name
The name Yarrow reflects 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.
Principles
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 into their own real-world product fairly easily.