Tuesday, April 16, 2013

Collecting Rainy Entropy

Somebody in a rainier climate than central Texas should try this. (If they haven't already. I suspect this isn't a new idea, but as I am writing this I'm sitting in the communal tent of a base camp of Puebla's mountains, waiting for days of rain to end, and don't have Internet access to check...)

Most reliable entropy sources, in particular as input for the generation of "random" numbers used in computing and cryptography, are of physical nature and derived from some natural phenomena. Rain appears to me to be such a source. I would suspect that the exact location of where a rain drop (in a region sufficiently covered by clouds emitting rain, obviously) hits the surface of an object on earth is pretty random and unpredictable. If we sample a bunch of those rain drop events with sufficient precision, say by recording where they hit within a defined boundary (a square meter? ten?), that should be a decent source for filling up our entropy pools.

I can't think of a method to directly sample the location of where a single rain drop hits the earth with sufficient precision, though. But what occurred to me the other day is that indirectly, this could be accomplished by recording their sound when hitting a surface:

Say we take an umbrella (think restaurant outdoor-space-sized) and outfit it with a number of strategically placed microphones. Given sufficient sensitivity of the microphones and their appropriate spatial distribution, with sufficient digital sampling capabilities it should be possible to write a piece of software that derives randomness from the sound of a rain drop hitting the umbrella: Depending on where the drop hits, some microphones will record it with more intensity than others. If it's raining sufficiently hard, we have a whole bunch of these events creating noise in random locations on our umbrella that we can sample.

Sketch of a free-standing umbrella with microphones (indicated by X'es) sampling the noise created by rain drops hitting the surface of the umbrella.
Some spontaneous thoughts on things to keep in mind, without any claim of completeness:
  • The object that collects the noise events should probably be of symmetric shape, and not store water. (The rain should be free to run off the surface rather than creating puddles that may alter/harmonize sounds as they fill with water.)
  • Our collection device should be free-standing from other structures. If, for example, trees are intercepting rain drops that are originally headed for our collection surface, or concentrating rain so that it drops down from leafs in the same location a lot, we probably loose entropy?
  • The capturing devices (microphones) sampling the events should probably be arranged in some symmetrical or otherwise evenly spaced way. If they all hang out in the same spot, they won't help us distinguish between the location of different rain drops hitting our surface.
Too much coffee to late in the afternoon made me lay awake in my tent for a while one night, listening to the rain hitting the tarp above it and inspiring these thoughts. (That tarp structure obviously didn't survive the heavy winds that followed the days of rain and needed some upgrading. ;-))
Obviously, this all only works when it rains heavily enough. No rain, no entropy.

Instead of using microphones to sample the sound and infer the location of rain drops hitting a surface, I can think of sampling vibration instead, too. If our surface is flexible enough, like a tarp, spacing out vibration sensors should have a similar effect?

Which makes me wonder whether we can use the existing network of sensors to measure earth quakes across the world to derive entropy from those events, too?