[Cryptography] Generate Random Data From Sound Card

Byrl Raze Buckbriar sub0 at octade.net
Sat Mar 7 06:44:29 EST 2026


On Fri, 6 Mar 2026 04:44:56 +0000
Peter Gutmann <pgut001 at cs.auckland.ac.nz> wrote:

> >>> Cameras (proper ones, not cellphones) already take advantage of this
> >>> in dark- frame subtraction, with long exposures or high ISO shots
> >>> they take images with the shutter closed to capture sensor noise and
> >>> then subtract that from the actual image.  
> >
> >What do you mean by "proper" camera?  
> 
> Ones that have actual shutters.  Doing dark-frame subtraction without a
> shutter to close to make the frame dark is pretty tricky.
> 
> Peter.

I have tested this on some computer webcams a long time ago and although they operate on different principles there was some random noise. I vaguely recall settling on the notion that several random frames should be chosen and added or mixed together then compressed and hashed to give a little bit of random data. I did not try to mathematically analyze the data but I'm pretty sure 2 or 3 frames can yield a sha256 hash of decent unpredictable data. I wouldn't call it true random because I don't know the principles of the camera sensor and circuitry but I would call it truly unpredictable whitened output. The large compression ratio might render the difference merely philosophical from the attacker point of view.

In one test I affixed thin paper over the lens and aimed several bright lights toward it. The diffusion of the light through the paper causes some small bit of chaotic arrangement of light on the sensor which was obvious from one frame to the next. But measuring how much is a few notches above my budget and pay grade, so I just say it seemed significant enough to squeeze out some entropy.

I'm confident that a miniature disco ball and some colored strobe lights would up the game a notch. I actually had such a contraption and I gave it away in my last spring cleaning possessions purge.

Visualize that: cryptographers and cypherpunks stacking strobes and disco balls around cameras then doing some spooky dance action at a distance. Someone might show up wearing goat horns and a toga.

-- 
= OCTADE = alt.rhubarb = misc.misc = sci.crypt =
= https://soc.octade.net/octade =


More information about the cryptography mailing list