Cloudflare handles over five trillion web page requests every day,
most of which are encrypted to protect your data. But did you know that this encryption depends on
lava lamps? I'm talking regular lava lamps,
like you can get on Amazon, what? Does the lava have some kind of super secret
processing capability that's soon to put AMD and Intel out of business?
Obviously not, but the lava is a great source
of natural entropy, which is a measure of disorder,
if you think back to high school physics. The reason natural entropy is important
is that it provides natural randomness, which can be used to encrypt data.
You see, the lava inside a lava lamp, which is actually just wax,
flows in naturally random unpredictable patterns
once the lamp is heated, just like how you can't predict exactly how steam
rises from a boiling pot, for example. A camera at Cloudflare's headquarters
is pointed at a wall of approximately 100 lava lamps
and takes a photo ever so often to capture the exact pattern the lava lamps are showing.
Those photos are then sent to a computer that gives each pixel a numerical value
depending on its appearance, creating a random numerical string
that becomes what we call a cryptographic seed.
This seed number is fed into a mathematical function
that creates another seed, which then gets fed into a number generator whose outputs
can be used for cryptographic keys, used to encrypt and decrypt traffic,
making it difficult for attackers to see what you're looking at.
These keys are also used to confirm that the communication actually came
from the website you're connected to, preventing your data from flowing to an attacker
that's pretending to be a legitimate service,
but actually isn't a legitimate service. Besides lava lamps, some of Cloudflare's offices
use swinging pendulums or rainbow mobiles
that get blown around by the air conditioning. Even if someone were to walk in front of these installations
and the camera captures their photo, that's actually completely fine,
as that just adds a different kind of randomness to the image.
Cloudflare even has an installation in Singapore where the natural decay of a chunk of uranium
is the randomness source. But why all this rigmarole? It turns out computers are much worse
than Mother Nature at generating true randomness.
While there are lots of easily accessible random number generators out there,
many of them are pseudo random rather than truly random.
But what's the difference? Well, pseudo random number generators
produce numbers by using an algorithm, meaning that they're predictable if you know the seed,
as the same seed will produce the same output every time.
Unless that seed is truly random, there's no actual true randomness in the process,
meaning that you could guess a cryptographic key if you know the seed.
And on many pseudo random number generators, that may not be that hard to do
if the seed is something fairly easy to guess, like the date or the time as are commonly used.
And this might be fine if you're just trying to decide on a random number for something like a D20 role
in your D&D game. But for trying to keep internet traffic secure,
a truly random hard to guess seed from a natural entropy source is essential.
But if you're in need of a random number generator in your own home for whatever reason,
we recommend lava lamps over radioactive materials
in the long term, they're less bad for you. Thanks for watching guys.
If you liked this video, check out our other video on a Cloudflare mishap
that took a good chunk of internet offline.
Those guys.