Jump to content

Cloudflare Blog on Encryption & Randomness: Add some lava lamps

Thought that this was a neat technical article from Clouflare on how they are obtaining random values to feed their cryptographically secure pseudorandom number generators (CSPRNG).  Essentially, their San Francisco office has a camera pointed at a wall of lava lamps that it is constantly watching and will convert the image into a numeric value to feed into the CSPRNG to generate a secure encryption key, thus making it extremely difficult (try to never use the impossible term) to actually break their key.  In a separate article from August, they mention that their London office uses a similar technique but instead is focusing on three double pendulum setups while their Singapore office has a Geiger counter measuring the radioactive decay of a uranium pellet in a glass bell in the lobby.  

https://blog.cloudflare.com/lavarand-in-production-the-nitty-gritty-technical-details/

lava-lamps.thumb.jpg.c77e7d11ae8fddf1e19329798dea6e8e.jpg

 

Quote

While the probability is obviously very low that somebody will manage to predict or modify the output of the entropy sources on our production machines, it would be irresponsible of us to pretend that it is impossible. Similarly, while cryptographic attacks against state-of-the-art CSPRNGs are rare, they do occasionally happen. It’s important that we hedge against these possibilities by adding extra layers of defense.
That’s where LavaRand comes in.
In short, LavaRand is a system that provides an additional entropy source to our production machines. In the lobby of our San Francisco office, we have a wall of lava lamps (pictured above). A video feed of this wall is used to generate entropy that is made available to our production fleet

We're not the first ones to do this. Our LavaRand system was inspired by a similar system first proposed and built by Silicon Graphics and patented in 1996 (the patent has since expired).
The flow of the “lava” in a lava lamp is very unpredictable,6 and so the entropy in those lamps is incredibly high. Even if we conservatively assume that the camera has a resolution of 100x100 pixels (of course it’s actually much higher) and that an attacker can guess the value of any pixel of that image to within one bit of precision (e.g., they know that a particular pixel has a red value of either 123 or 124, but they aren’t sure which it is), then the total amount of entropy produced by the image is 100x100x3 = 30,000 bits (the x3 is because each pixel comprises three values - a red, a green, and a blue channel). This is orders of magnitude more entropy than we need.

Screen-Shot-2017-10-31-at-3_57.19-PM.png.1ae3eed56958a8a3ebfe15c3c54d74e4.png

The overall design of the LavaRand system is pictured above. The flow of entropy can be broken down into the following steps: 
The wall of lava lamps in the office lobby provides a source of true entropy. 
In the lobby, a camera is pointed at the wall. It obtains entropy from both the visual input from the lava lamps and also from random noise in the individual photoreceptors. 
In the office, there’s a server which connects to the camera. The server has its own entropy system, and the output of that entropy system is mixed with the entropy from the camera to produce a new entropy feed. 
In one of our production data centers, there’s a service which connects to the server in the office and consumes its entropy feed. That service combines this entropy feed with output from its own local entropy system to produce yet another entropy feed. This feed is made available for any production service to consume.

Here is the articel from August talking at a lot less technical level and also mentions the London and Singapore offices...

 

https://www.fastcodesign.com/90137157/the-hardest-working-office-design-in-america-encrypts-your-data-with-lava-lamps

 

As I said, this is actually a really neat implementation for achieving randomness in security and it is actually kind of functional as office art.

Link to comment
Share on other sites

Link to post
Share on other sites

That's very cool. As a user of Cloudflare user I have always wondered how they did their CSPRNG.

Link to comment
Share on other sites

Link to post
Share on other sites

This is pretty cool. I would be more interested in hearing about their radioactive seed generator though.

Current LTT F@H Rank: 90    Score: 2,503,680,659    Stats

Yes, I have 9 monitors.

My main PC (Hybrid Windows 10/Arch Linux):

OS: Arch Linux w/ XFCE DE (VFIO-Patched Kernel) as host OS, windows 10 as guest

CPU: Ryzen 9 3900X w/PBO on (6c 12t for host, 6c 12t for guest)

Cooler: Noctua NH-D15

Mobo: Asus X470-F Gaming

RAM: 32GB G-Skill Ripjaws V @ 3200MHz (12GB for host, 20GB for guest)

GPU: Guest: EVGA RTX 3070 FTW3 ULTRA Host: 2x Radeon HD 8470

PSU: EVGA G2 650W

SSDs: Guest: Samsung 850 evo 120 GB, Samsung 860 evo 1TB Host: Samsung 970 evo 500GB NVME

HDD: Guest: WD Caviar Blue 1 TB

Case: Fractal Design Define R5 Black w/ Tempered Glass Side Panel Upgrade

Other: White LED strip to illuminate the interior. Extra fractal intake fan for positive pressure.

 

unRAID server (Plex, Windows 10 VM, NAS, Duplicati, game servers):

OS: unRAID 6.11.2

CPU: Ryzen R7 2700x @ Stock

Cooler: Noctua NH-U9S

Mobo: Asus Prime X470-Pro

RAM: 16GB G-Skill Ripjaws V + 16GB Hyperx Fury Black @ stock

GPU: EVGA GTX 1080 FTW2

PSU: EVGA G3 850W

SSD: Samsung 970 evo NVME 250GB, Samsung 860 evo SATA 1TB 

HDDs: 4x HGST Dekstar NAS 4TB @ 7200RPM (3 data, 1 parity)

Case: Sillverstone GD08B

Other: Added 3x Noctua NF-F12 intake, 2x Noctua NF-A8 exhaust, Inatek 5 port USB 3.0 expansion card with usb 3.0 front panel header

Details: 12GB ram, GTX 1080, USB card passed through to windows 10 VM. VM's OS drive is the SATA SSD. Rest of resources are for Plex, Duplicati, Spaghettidetective, Nextcloud, and game servers.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, sazrocks said:

This is pretty cool. I would be more interested in hearing about their radioactive seed generator though.

That one got my interest too.

Grammar and spelling is not indicative of intelligence/knowledge.  Not having the same opinion does not always mean lack of understanding.  

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, sazrocks said:

This is pretty cool. I would be more interested in hearing about their radioactive seed generator though.

 

17 minutes ago, mr moose said:

That one got my interest too.

The radioactive seed generator (at least to my understanding) basically is a Geiger counter measuring the decay of a pellet of Uranium and translating the rate of decay into a seed value to add into their CSPRNG.  Since the decay of any one atom of Uranium is random, the release it gives off would also be random.  They are basically taking what would be a school experiment (as the pellet used is the same as what would be used in this experiment) to explain radiation, half-life and decay and turning it into a part of their model.  

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, WMGroomAK said:

 

The radioactive seed generator (at least to my understanding) basically is a Geiger counter measuring the decay of a pellet of Uranium and translating the rate of decay into a seed value to add into their CSPRNG.  Since the decay of any one atom of Uranium is random, the release it gives off would also be random.  They are basically taking what would be a school experiment (as the pellet used is the same as what would be used in this experiment) to explain radiation, half-life and decay and turning it into a part of their model.  

Oh I know all that; I was just curious as to their exact setup.

Current LTT F@H Rank: 90    Score: 2,503,680,659    Stats

Yes, I have 9 monitors.

My main PC (Hybrid Windows 10/Arch Linux):

OS: Arch Linux w/ XFCE DE (VFIO-Patched Kernel) as host OS, windows 10 as guest

CPU: Ryzen 9 3900X w/PBO on (6c 12t for host, 6c 12t for guest)

Cooler: Noctua NH-D15

Mobo: Asus X470-F Gaming

RAM: 32GB G-Skill Ripjaws V @ 3200MHz (12GB for host, 20GB for guest)

GPU: Guest: EVGA RTX 3070 FTW3 ULTRA Host: 2x Radeon HD 8470

PSU: EVGA G2 650W

SSDs: Guest: Samsung 850 evo 120 GB, Samsung 860 evo 1TB Host: Samsung 970 evo 500GB NVME

HDD: Guest: WD Caviar Blue 1 TB

Case: Fractal Design Define R5 Black w/ Tempered Glass Side Panel Upgrade

Other: White LED strip to illuminate the interior. Extra fractal intake fan for positive pressure.

 

unRAID server (Plex, Windows 10 VM, NAS, Duplicati, game servers):

OS: unRAID 6.11.2

CPU: Ryzen R7 2700x @ Stock

Cooler: Noctua NH-U9S

Mobo: Asus Prime X470-Pro

RAM: 16GB G-Skill Ripjaws V + 16GB Hyperx Fury Black @ stock

GPU: EVGA GTX 1080 FTW2

PSU: EVGA G3 850W

SSD: Samsung 970 evo NVME 250GB, Samsung 860 evo SATA 1TB 

HDDs: 4x HGST Dekstar NAS 4TB @ 7200RPM (3 data, 1 parity)

Case: Sillverstone GD08B

Other: Added 3x Noctua NF-F12 intake, 2x Noctua NF-A8 exhaust, Inatek 5 port USB 3.0 expansion card with usb 3.0 front panel header

Details: 12GB ram, GTX 1080, USB card passed through to windows 10 VM. VM's OS drive is the SATA SSD. Rest of resources are for Plex, Duplicati, Spaghettidetective, Nextcloud, and game servers.

Link to comment
Share on other sites

Link to post
Share on other sites

No one else concerned about the about of power that uses? It must make a tonne of heat too.

 

there are 80 lamps in the picture, assuming that's the while wall now lava lamp bulbs I find on eBay are around 30w meaning that wall 2400 w which is the same as my cooker. 

 

 

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, vorticalbox said:

No one else concerned about the about of power that uses? It must make a tonne of heat too.

 

there are 80 lamps in the picture, assuming that's the while wall now lava lamp bulbs I find on eBay are around 30w meaning that wall 2400 w which is the same as my cooker. 

 

 

That's an insignificant amount of their power bill if you think about what servers they probably have... 

I spent $2500 on building my PC and all i do with it is play no games atm & watch anime at 1080p(finally) watch YT and write essays...  nothing, it just sits there collecting dust...

Builds:

The Toaster Project! Northern Bee!

 

The original LAN PC build log! (Old, dead and replaced by The Toaster Project & 5.0)

Spoiler

"Here is some advice that might have gotten lost somewhere along the way in your life. 

 

#1. Treat others as you would like to be treated.

#2. It's best to keep your mouth shut; and appear to be stupid, rather than open it and remove all doubt.

#3. There is nothing "wrong" with being wrong. Learning from a mistake can be more valuable than not making one in the first place.

 

Follow these simple rules in life, and I promise you, things magically get easier. " - MageTank 31-10-2016

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, vorticalbox said:

No one else concerned about the about of power that uses? It must make a tonne of heat too.

 

there are 80 lamps in the picture, assuming that's the while wall now lava lamp bulbs I find on eBay are around 30w meaning that wall 2400 w which is the same as my cooker. 

 

 

we are talking about a small number in the server hosting world. a rack can take 25,000W of power or more so this a drop in the bucket. 

Good luck, Have fun, Build PC, and have a last gen console for use once a year. I should answer most of the time between 9 to 3 PST

NightHawk 3.0: R7 5700x @, B550A vision D, H105, 2x32gb Oloy 3600, Sapphire RX 6700XT  Nitro+, Corsair RM750X, 500 gb 850 evo, 2tb rocket and 5tb Toshiba x300, 2x 6TB WD Black W10 all in a 750D airflow.
GF PC: (nighthawk 2.0): R7 2700x, B450m vision D, 4x8gb Geli 2933, Strix GTX970, CX650M RGB, Obsidian 350D

Skunkworks: R5 3500U, 16gb, 500gb Adata XPG 6000 lite, Vega 8. HP probook G455R G6 Ubuntu 20. LTS

Condor (MC server): 6600K, z170m plus, 16gb corsair vengeance LPX, samsung 750 evo, EVGA BR 450.

Spirt  (NAS) ASUS Z9PR-D12, 2x E5 2620V2, 8x4gb, 24 3tb HDD. F80 800gb cache, trueNAS, 2x12disk raid Z3 stripped

PSU Tier List      Motherboard Tier List     SSD Tier List     How to get PC parts cheap    HP probook 445R G6 review

 

"Stupidity is like trying to find a limit of a constant. You are never truly smart in something, just less stupid."

Camera Gear: X-S10, 16-80 F4, 60D, 24-105 F4, 50mm F1.4, Helios44-m, 2 Cos-11D lavs

Link to comment
Share on other sites

Link to post
Share on other sites

https://xkcd.com/221/

 

Not sure why people are going to these lengths to ensure randomness, pretty sure we figured it out ages ago. Bonus, its only 1 line of code!

 

Sorry someone had to link the relevant XKCD, pretty sure its a law

Primary:

Intel i5 4670K (3.8 GHz) | ASRock Extreme 4 Z87 | 16GB Crucial Ballistix Tactical LP 2x8GB | Gigabyte GTX980ti | Mushkin Enhanced Chronos 240GB | Corsair RM 850W | Nanoxia Deep Silence 1| Ducky Shine 3 | Corsair m95 | 2x Monoprice 1440p IPS Displays | Altec Lansing VS2321 | Sennheiser HD558 | Antlion ModMic

HTPC:

Intel NUC i5 D54250WYK | 4GB Kingston 1600MHz DDR3L | 256GB Crucial M4 mSATA SSD | Logitech K400

NAS:

Thecus n4800 | WD White Label 8tb x4 in raid 5

Phones:

Oneplux 6t (Mint), Nexus 5x 8.1.0 (wifi only), Nexus 4 (wifi only)

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, vorticalbox said:

No one else concerned about the about of power that uses? It must make a tonne of heat too.

 

there are 80 lamps in the picture, assuming that's the while wall now lava lamp bulbs I find on eBay are around 30w meaning that wall 2400 w which is the same as my cooker. 

 

 

As as other people have said it is insignificant for them, as well as the fact that filament bulbs are so good at turning electrical energy into thermal energy that they don't need to have the heating of the building as high.

 

That purchase must have been rather awkward: 

employee: " Boss we need to buy 300 lava lamps and hang them up by the entrance"

Cryptographically Uneducated boss: " Are you out of your mind? what for?!"

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×