Lably
Skip to content

Yarrow algorithm

Random number generator

  • 6 min read
  • 4 chapters

Related on Lably

Through Open source, Modular arithmetic and Unique key

Yarrow was used in FreeBSD, but is now superseded by Fortuna. Yarrow was also incorporated in iOS and macOS for their /dev/random devices, but Apple has switched to Fortuna since 2020 Q1.

Name

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 modular arithmetic recursively to generate two bits of random information that have a non-uniform distribution.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication