LavaRand

Field: Security · Also called: Lavarand, lava lamp security, lava lamp random number generator, lava lamp wall, wall of entropy

LavaRand is a method of generating random numbers from camera images of a chaotic physical system, originally a group of lava lamps: each image is digitized and cryptographically hashed, and the result seeds a cryptographically secure pseudorandom number generator (CSPRNG).

How it works

LavaRand is an entropy source. A camera photographs something whose motion cannot be predicted, such as the wax rising and falling in a lava lamp. The pixel values of each image depend on that motion, on changing light, and on noise in the camera’s image sensor, so no two images are alike and none can be reproduced in advance. The image is passed through a cryptographic hash function, which reduces it to a fixed-size string of random-looking bytes, and those bytes seed a CSPRNG that produces as many random numbers as needed.

Random numbers of this kind are what cryptography depends on: encryption keys, the random values in a salt, session tokens, and the nonces used in protocols such as TLS. If an attacker could predict them, the encryption built on them would fail.

Current use at Cloudflare

Cloudflare runs LavaRand from a wall of lava lamps in the lobby of its San Francisco office, sometimes called a “wall of entropy.” Because the wall is in a busy lobby, people walking by or stopping in front of the lamps partly block the camera’s view, and Cloudflare’s Learning Center notes that those obstructions become part of the randomness the camera captures.

Cloudflare’s wall of lava lamps, five shelves of multicolored lamps, with a man in a blue striped shirt standing in front of the lower rows.

The lava lamp wall in Cloudflare’s San Francisco lobby, photographed by Frank Rietta of Rietta Inc. on a visit described in Lava lamps providing randomness for security!. A visitor standing in the frame, like this one, becomes part of what the camera captures.

According to Cloudflare’s March 2024 description, the company also draws entropy from a wall of double pendulums in its London office and from translucent rainbow mobiles in its Austin office. In March 2025, it added “a ‘wall of entropy’ made of 50 wave machines in constant motion” in Lisbon.

Cloudflare describes its process this way: a camera periodically photographs each display, and the image is hashed into a fixed-size string of random bytes. Those bytes, combined with the previous seed and local system randomness, feed a key derivation function that seeds a CSPRNG. Cloudflare’s servers periodically query LavaRand to refresh their entropy pools, and Cloudflare contributes LavaRand output to drand, the public randomness beacon run by the League of Entropy.

Most of what that randomness protects is TLS traffic. Cloudflare’s 2024 description says its servers handle over 55 million HTTP requests per second, “the vast majority of which are secured via the TLS protocol,” notes that “cryptographic protocols like TLS require an underlying source of secure randomness,” and says LavaRand “has long played its part in the randomness that secures connections made through Cloudflare.” Seeding strong TLS at that scale is LavaRand’s main practical use: its output is one of the inputs to the server entropy pools those TLS connections draw on.

LavaRand supplements an operating system’s own random number generator. It does not replace it. Cloudflare’s 2017 technical description says LavaRand “provides an additional entropy source to our production machines,” as a hedge in case a machine’s default source of randomness were ever flawed, and its 2024 description calls the contribution “spice added to the entropy pool mix.”

History

  • 1996: Silicon Graphics filed U.S. Patent 5,732,138, Method for seeding a pseudo-random number generator with a cryptographic hash of a digitization of a chaotic system, naming Landon Curt Noll, Robert G. Mende, and Sanjeev Sisodiya as inventors. It was granted on March 24, 1998, and has since expired. The SGI system that used it was known as Lavarand.
  • 1997: A newsbrief in Cipher, the IEEE Technical Committee on Security and Privacy’s newsletter, carried Mark Frauenfelder’s description of the SGI system: “Six Lava Lites in different colors are set up in front of a digital camera, which takes a snapshot of them periodically,” with each image run through a one-way hash to seed the Blum Blum Shub pseudorandom generator.
  • 2000: Landon Curt Noll and Simon Cooper developed LavaRnd, a successor that uses lens-capped digital cameras in place of lava lamps and was placed in the public domain, according to the LavaRnd project.
  • 2017: Cloudflare published a technical description of LavaRand in production, crediting the system “first proposed and built by Silicon Graphics.”
  • 2021: Lava lamps providing randomness for security! (Rietta) describes a visit to Cloudflare’s lava lamp wall in San Francisco.
  • 2024 and 2025: Cloudflare described its additional entropy displays in London, Austin, and Lisbon.

Sources

See also

Go deeper

Articles