[Cryptography] Generate Random Data From Sound Card

Theodore Tso tytso at mit.edu
Thu Mar 5 09:53:22 EST 2026


On Thu, Mar 05, 2026 at 02:14:52AM +0000, Peter Gutmann via cryptography wrote:
> Jon Callas <jon at callas.org> writes:
> 
> >Same principle as the camera with a lens cap on. 
> 
> 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.

The better camera do capture the output of the senor when the shutter
close to try to reduce noise from high ISO shots --- but the fact that
this *does* work means that it's not true quantuum noise.  If there
are characteristics sensor quirks that are there between successive
sensor grabs, then you can't really use this as unpredictable
randomness for cryptographic purposes.  Fortunately there is *some*
quantuum noise, but that's not why dark-frame substraction works.

Put another way, if you take two successive sensor captures with lens
cap on, there will be a component which is the same across the two
captures (which is the bit that is helpful for dark-frame
subtraction), and bits that differ between successive sensor grabs.

All of this is why there's a lot of verification and experimentation
which is needed before assuming that everything that you get is
something that can be relied upon for random number generation.

	 	    	       	   	      - Ted


More information about the cryptography mailing list