How Do Lava Lamps Secure the Internet?

Lava Lamps (image by Midjourney)
Automatically translated from French by an LLM — read the original

Note: this 5-minute presentation was written for a science oral exam. During the presentation, don’t say the titles and emphasize words in bold.

Table of Contents

Introduction

Lava lamps are often described as hypnotic and they have a very interesting mechanism that mixes notions of thermodynamics and chemistry. But did you know that they also help encrypt a significant portion of web traffic? More precisely, a wall of one hundred lava lamps ensures a secure connection for users on nearly a quarter of the publicly accessible websites.

That’s what we are going to explore, starting by describing how a lava lamp works, then explaining why it is part of so-called chaotic physical systems and finally how it is useful in computer security.

What is a Lava Lamp?

The lava lamp contains mineral oil and colored wax bubbles that are immiscible with the oil. Under this biphasic mixture is an incandescent lamp responsible for heating and lighting the contents of the lamp.

When the lamp is off, at room temperature, the wax bubbles are denser than the oil and thus are located at the bottom of the lamp.

The thermal capacity of wax is about 1800 J/kg, compared to about 2100 J/kg for mineral oil. The wax heats faster than the oil. Additionally, the volumetric expansion coefficient of the wax (in K-1) is greater than that of the oil, meaning that for the same temperature increase, the wax bubbles will expand more than the oil.

Thus, when the lamp is turned on, the wax quickly becomes less dense than the oil, and the bubbles begin to rise in the lamp due to Archimedean buoyancy. Moreover, the viscosity of the wax decreases with temperature, which facilitates its movement.

Once at the top of the container, which is cooler because it’s farther from the incandescent lamp, the temperature of the bubbles decreases, making the wax bubbles denser than the oil again, more viscous, and they fall back to the bottom of the lamp. This is the convection phenomenon in thermodynamics.

The same mechanism repeats in a loop as long as the incandescent lamp is on and continues to heat.

Why are lava lamps considered chaotic physical systems?

Now that you know a bit more about lava lamps, why are they used to secure the Internet?

Well, these lava lamps are interesting for their randomness.

The movement of wax bubbles within the lamp is incredibly complex and unpredictable, and it’s a perfect example of what is called “deterministic chaos.” It is deterministic because the movement is governed by the laws of physics, but it is chaotic because even a slight variation in initial conditions can lead to radically different results.

This sensitivity to initial conditions makes it practically impossible to precisely predict how the wax bubbles will move.

These different initial conditions may be due to tiny air currents in the room, variations in voltage and current powering the lamp, minute temperature changes in the wax or liquid, etc.

What is their use in computer security?

This is where computer security comes into play, as in practice, it is very difficult for a computer to generate random numbers. Computers are deterministic machines: they follow a precise set of instructions to perform a given task.

This means that most “random” numbers generated by a computer are actually pseudo-random: they are generated by a deterministic algorithm and can therefore be predicted if the computer’s generation conditions are known.

Yet in computer security, we need to generate perfectly random numbers. When you browse the Fnac website, for example, once authenticated, you receive an identifier, called a cookie, which allows you to stay logged in. To ensure that no one can hijack your session, for instance by guessing your ID, it must be unique and unpredictable, meaning generated in a perfectly random manner.

And this is why lava lamps are very useful. By filming a lava lamp and applying an image processing algorithm, it is possible to generate numbers. For each pixel returned by the camera, we get three “Red-Green-Blue” values ranging from 0 to 255 depending on their color. Thus, with enumeration, we find that there are 16M (255^3) possibilities for a pixel, so about 4 trillion different images with a 24-megapixel sensor like those on many smartphones, making the image unpredictable. On this sequence of pixels, of numbers, a hash function is then applied to shorten it and generate a new number, called a hash, the final random number.

A company called Cloudflare uses this technique to generate random numbers and owns a wall of 100 lava lamps that are filmed with a camera.

Cloudflare is a company that handles more than 20% of the world’s web traffic.

Conclusion

In conclusion, lava lamps are very interesting from a chemical and physical standpoint. They involve notions of fluid mechanics, particularly the convection phenomenon, as well as density and miscibility concepts in chemistry.

The fact that their unpredictability helps solve a random number generation problem, integrating them into the operation of a large portion of global web traffic, adds a fascinating and unsuspected dimension for most people to these lava lamps.

Frequently Asked Questions

What liquid is in the lava lamp?

→ mineral oil, and more recently the composition is kept secret by most manufacturers

Why is the wax slightly denser than mineral oil?

→ carbon tetrachloride (very dense) was added until 1970. After that, the composition became “secret.”

How long to reach equilibrium?

→ It typically takes 45 to 60 minutes for the wax to heat enough to form droplets that move freely

What initial conditions of the computer are used to generate random numbers?

→ for example, the current date, the computer’s memory information, etc.

Examples of chaotic physical systems?

→ the double pendulum (a pendulum attached to another)

What’s the difference between specific heat and mass thermal capacity?

→ two very similar notions, specific heat is defined in J/g or J/mol and mass thermal capacity in J/kg.

Why does the wax become less viscous when the temperature increases?

→ viscosity is the resistance of a fluid to flow, and as the temperature increases, molecules are more agitated and tend to move apart from each other, decreasing viscosity.

Sources