The picture is from 2017, so isn’t new, but it’s mentioned in a book I’ve just finished reading, about the use of mathematics in the real world: Humble Pi, by Matt Parker, the comedian who also revels in the title ‘Public Engagement in Mathematics Fellow’ at Queen Mary University of London. And very good the book is, too. “[It] shows us the bizarre ways maths trips us up, and what this reveals about its essential place in our world.”
Anyway, back to the hip corporate lobby of Cloudflare, which appears in the chapter on random numbers (and the unplanned surfacing of non-randomness). Parker outlines the needs and difficulties of a truly random system that can’t be predicted or computationally hacked.
And one possible solution is to digitally capture the ever-changing outlines of a series of lava lamps, which is the route taken in the San Francisco office (while apparently “their office in London has a chaotic pendulum bouncing about, and the Singapore set-up uses a far less visually exciting radioactive source”).
“LavaRand is a system that uses lava lamps as a secondary source of randomness for our production servers. A wall of lava lamps in the lobby of our San Francisco office provides an unpredictable input to a camera aimed at the wall. A video feed from the camera is fed into a cryptographically-secure pseudorandom number generator (CSPRNG), and that CSPRNG provides a stream of random values that can be used as an extra source of randomness by our production servers.”
“Since the flow of the ‘lava’ in a lava lamp is very unpredictable, ‘measuring’ the lamps by taking footage of them is a good way to obtain unpredictable randomness. Computers store images as very large numbers, so we can use them as the input to a CSPRNG just like any other number.”
Excellent. Note, however, that the company is not taking credit for the idea: its LavaRand system was inspired by a similar system first proposed and built by Silicon Graphics and patented in 1996 (the patent has since expired), Cloudflare flags.
So, slightly disappointingly, it is just a backup system. But still.
“Hopefully we’ll never need it. Hopefully, the primary sources of randomness used by our production servers will remain secure, and LavaRand will serve little purpose beyond adding some flair to our office. But if it turns out that we’re wrong, and that our randomness sources in production are actually flawed, then LavaRand will be our hedge, making it just a little bit harder to hack Cloudflare.”
Get your randoms here
In the same chapter, by the way, Matt Parker also mentions ANU QRNG, the quantum random number generating wing of The Australian National University, based in Canberra.
Its website provides online, live quantum random numbers to the public. These numbers, it says, are generated in real time in its lab using lasers to measure the vacuum fluctuations.
“This website offers true random numbers to anyone on the internet. The random numbers are generated in real-time in our lab by measuring the quantum fluctuations of the vacuum. The vacuum is described very differently in the quantum physics and classical physics. In classical physics, a vacuum is considered as a space that is empty of matter or photons. Quantum physics however says that that same space resembles a sea of virtual particles appearing and disappearing all the time. This is because the vacuum still possesses a zero-point energy.
Consequently, the electromagnetic field of the vacuum exhibits random fluctuations in phase and amplitude at all frequencies. By carefully measuring these fluctuations, we are able to generate ultra-high bandwidth random numbers.”
You can read more here.
A bit of fun for a Friday afternoon.
Image: Lava lamps in the Cloudflare lobby – The view from the camera