Inspiration
Inspired by Cloudflare’s use of 100 lava lamps and a camera to generate SSL encryption keys, which takes advantage of the lamps’ unpredictable, random movements, this concept seeks to use bubble columns instead. Since bubble columns are even more chaotic and unpredictable, they are a superior source of randomness. To enhance the visual appeal, themed elements like miniature planets, rockets, and aliens can be placed within the bubble columns to align with the Code Galaxy brand.
https://www.cloudflare.com/learning/ssl/lava-lamp-encryption/
How It Works
Materials and Build
- Bubble Columns: custom-made bubble columns connected to low-power pumps. These pumps disperse air evenly through airstones, creating random bubble movements.
- Lighting: RGB LED rings at the base of each column, providing vibrant, galaxy-themed lighting.
- Themed Additions: Objects such as planets, rockets, and aliens added inside the columns to strengthen the galaxy theme.
- Cost Efficiency: While pre-made bubble columns can be expensive, constructing them from basic materials (acrylic tubes, pumps, LEDs, and air stones) is cost-effective.
- Raspberry PI: The use of a raspberry pi to calculate encryption entropy from camera feed, and also control the physical feature.
Modular Design
- The bubble columns could be made modular, meaning different sections can be disassembled or rearranged based on the space available. This would make the installation flexible, allowing it to be adapted for different events or spaces without compromising stability or safety.
Tech Behind It
- Camera & Control System: An HD camera connected to a Raspberry Pi monitors the movements of the bubbles and objects. This randomness is captured and converted into entropy, which can be used to generate encryption keys.
- Automated Operation: The Raspberry Pi controls the pumps, LEDs, and camera, allowing for two modes:
- Power-Efficient Mode: The system activates only when a new encryption key needs to be generated.
- Always-On Mode: The columns are constantly bubbling and lit, serving as an ambient, interactive display.
Software Behind It
The core of this system is an algorithm designed to generate random entropy from an image captured by an HD camera. The camera will focus on the bubble column, and the random movement of the bubbles will provide the entropy for cryptographic purposes. To ensure the data remains truly random, the algorithm must identify the bubble column in the image and crop out any static background. This prevents non-random, static elements from being included, which would dilute the randomness of the entropy.
Key Steps in the Algorithm
- Image Capture: A high-definition (HD) camera continuously captures frames of the bubble column.
- Bubble Column Detection: The algorithm uses image segmentation techniques to isolate the bubble column, removing the static background. This ensures that only the random movement of bubbles contributes to the entropy.
- Random Data Extraction: Once the bubble column is isolated, pixel data from the image is analysed to extract randomness. The unpredictable motion of bubbles generates pixel variations, which form the basis of the random data.
Formula for Randomness
A simple method to quantify the randomness of the image data involves calculating the Shannon Entropy of the pixel values. Shannon Entropy is a measure of uncertainty or randomness in a dataset, and it can be used to determine how random the pixel variations are within the bubble column.
The Shannon Entropy $ H $ of an image can be calculated as:
H(X)=− \sum\limits_{i=1}^{n} p(x_i)log_2p(x_i)
Where:
- $ H(X) $ is the entropy of the image (or part of the image) representing the bubble column.
- $ p(\underset{i}{x}) $ is the probability of pixel value $ x_i $ occurring in the image.
- $ n $ is the total number of distinct pixel values (typically 256 in an 8-bit grayscale image).
Process
- Divide the Image: The bubble column image is divided into smaller regions (or analysed pixel-by-pixel).
- Compute Probability: The algorithm computes the probability of each pixel value occurring in the isolated bubble region.
- Calculate Entropy: Shannon Entropy is then calculated to measure the randomness of the image data. The higher the entropy, the more random the pixel values, and therefore, the more secure the entropy used for cryptographic purposes.
This entropy can be fed into a random number generator (RNG) or used directly for cryptographic key generation.
Potential Uses
Marketing Stunt:
- This visually stunning installation can be the centre piece for live events, promotional videos, and campaigns, highlighting Code Galaxy’s innovative and playful approach to cyber security.
- User Engagement: The system could be featured on Code Galaxy's website as a live stream, where users can view the encryption in real-time, reinforcing transparency and brand engagement.
Background for Podcast/Streams:
- The ambient lighting and dynamic bubbles can serve as an attractive, sci-fi themed background for podcasts, streams, or video interviews.
- Colourful Photography/Branding Assets: The columns could also be used for promotional photoshoots, creating beautiful, abstract visuals in line with the Code Galaxy brand.
Practical Cyber Security Tool:
- Beyond the aesthetics, this setup provides a functional source of entropy for generating secure encryption keys. The unpredictable movement of the bubbles, captured by the camera, forms the basis for creating truly random numbers.
Safety Considerations
Ensuring the bubble columns are safe for people and equipment is critical. This involves using durable materials, securing the structure properly, and incorporating fail-safes to avoid hazards.
Structural Stability
To keep the installation stable and prevent movement, the following approach can be employed:
Heavy Base and Acrow Props for Securing:
- Each bubble column will be attached to a heavy base, bolted down to provide stability.
- In addition to this, the columns will be secured from the top using modified acrow props. These adjustable steel props are typically used in construction to support ceilings and can be adapted to secure the installation without needing to drill into floors, walls, or ceilings.
- By using acrow props, the structure can be fastened securely between the floor and the ceiling, ensuring stability even in environments where equipment or people may bump into it.
- Mobility: The acrow props can be easily adjusted, allowing the whole system to be moved if necessary without permanently altering the space. The heavy base will be equipped with lockable castors, making the unit easy to relocate.
Durable Materials:
- The bubble columns will be constructed from impact-resistant acrylic, which is lighter and stronger than glass. This reduces the risk of breakage while still being clear for aesthetic purposes.
- A metal framework around the base and sides of the installation can provide additional support and serve as an extra layer of protection.
Safety Features
Pressurisation and Containment:
- Since air will be pumped through the columns to generate bubbles, it’s essential to prevent any potential pressurisation issues. Without proper ventilation, this could cause dangerous pressure build-ups.
- A fine mesh cover will be placed at the top of each column. This will allow air to escape while preventing any splashing or leaks. The mesh will act as a splash guard to contain the liquid and protect the surrounding area.
Non-Conductive Liquid:
- Instead of water, the system could use a non-conductive liquid such as baby oil. Baby oil has several advantages:
- It is more viscous, allowing bubbles to form and last longer, which enhances the visual effect.
- It reduces the risk of leaks since it’s less likely to escape through small cracks compared to water.
- Being non-conductive, it adds an extra level of safety when electronic components (e.g., pumps, LEDs) are nearby.
- The downside is that baby oil is denser, so any objects inside the column (e.g., planets, rockets, aliens) will need to be weighted down to remain suspended in the liquid properly.
- Instead of water, the system could use a non-conductive liquid such as baby oil. Baby oil has several advantages:
Electrical Safety:
- All electronics, such as the pumps and LED lights, will be housed in waterproof enclosures to prevent short circuits or malfunctions in case of any leaks.
- Wiring and electrical components will be kept away from high-traffic areas, reducing the risk of accidents.
Scientific Basis
Randomness: Like lava lamps, the chaotic, unpredictable movement of bubbles creates a truly random system. The inclusion of additional objects (planets, rockets, aliens) increases variability and enhances the randomness.
Entropy Source: This randomness can be harnessed through an HD camera and translated into a form of entropy suitable for encryption, making it a unique, secure method for generating encryption keys.
The randomness of bubble columns stems from the inherent chaotic nature of hydrodynamics—the behaviour of fluids in motion. When air is pumped into a liquid, such as water or oil, it creates bubbles that rise due to buoyancy. Monitoring the hydrodynamics of this process reveals several factors that contribute to unpredictable, random movement:
Bubble Formation and Size Variation
- When air passes through an airstone or similar device, it doesn't produce perfectly identical bubbles. The bubbles differ in size, influenced by slight variations in air pressure, liquid viscosity, and surface tension. These differences cause bubbles to ascend at uneven speeds, introducing randomness.
- Additionally, the moment when bubbles break free from the airstone is not uniform. Microscopic changes in the surface of the airstone and liquid turbulence result in bubbles being released at irregular intervals.
Turbulence in the Liquid
- The rising bubbles disturb the liquid, creating turbulence. This turbulence leads to unpredictable fluid movements around the bubbles, which in turn affects how they move through the liquid. Even small disturbances in the liquid’s flow can cause significant changes in the path and speed of bubbles, further enhancing the system’s randomness.
- As the bubbles rise, they collide with each other and the walls of the column. These collisions are chaotic, with some bubbles merging into larger bubbles, splitting into smaller ones, or bouncing in unexpected directions.
Complex Interactions Between Bubbles and Objects
- If objects (e.g., planets, rockets, or aliens) are added inside the column, the fluid flow around these objects adds another layer of unpredictability. The objects disturb the fluid dynamics by changing how the bubbles move and interact, causing variations in bubble speed, direction, and even how they cluster.
- The shape and placement of objects within the bubble column influence the flow of liquid and bubbles. Bubbles might get caught in eddies, split by sharp edges, or pushed along curved surfaces, all contributing to a highly variable system.
Viscosity of the Liquid
- The viscosity of the liquid plays a crucial role in bubble behaviour. In more viscous liquids like baby oil, bubbles rise more slowly and interact differently with the surrounding fluid. The slower ascent and longer-lasting bubbles mean the fluid dynamics are influenced over a longer period, leading to even greater variation in the bubble paths and velocities.
- Since viscosity can change with temperature and pressure, the bubble dynamics are further influenced by environmental conditions, adding to the system's randomness.
Irregular Airflow
- The air pumped into the system is itself not perfectly constant. Even small fluctuations in air pressure or the efficiency of the pump can alter how much air is introduced into the column at any given moment. These fluctuations result in irregular bubble formation patterns and speeds, enhancing the chaotic nature of the system.
Complex Fluid-Bubble Interactions
- The interaction between the rising bubbles and the liquid’s surface introduces further randomness. Surface tension causes bubbles to deform as they rise, and when they reach the top, some may pop while others may combine. The exact moment and manner in which this happens is influenced by random variations in liquid properties (e.g., impurities, temperature) and cannot be precisely predicted.
Monitoring the Hydrodynamics for Randomness
- By using a camera to monitor these chaotic bubble movements, the system captures the full complexity of the hydrodynamic process. The bubbles' varying size, speed, direction, and interactions are all recorded, creating a dataset of unpredictable behaviour.
- The camera records the position of each bubble frame by frame, and since no two bubbles rise or interact in exactly the same way, this movement generates high-entropy data—a critical factor for creating secure encryption keys.
The randomness of bubble columns arises from the unpredictable nature of fluid dynamics—turbulence, variable bubble size, chaotic interactions, and irregular airflow all combine to create a highly random, non-repeating system. By monitoring the hydrodynamics of this process, a rich source of entropy is created, suitable for generating secure encryption keys or other applications requiring true randomness.