[Cryptography] Generate Random Data From Sound Card

Theodore Tso tytso at mit.edu
Sat Mar 7 08:24:06 EST 2026


On Fri, Mar 06, 2026 at 08:39:07PM -0800, Kent Borg wrote:
> On 3/6/26 2:39 PM, Theodore Tso wrote:
> > Well, most of the time I just use the Linux kernel's RNG, but when I'm
> > generating a long-term private key, I'll augment /dev/urandom with the
> > output from ChoasKey
> 
> Augment…
> 
> I hope that means xor, or cat ChoasKey into /dev/urandom.

Linux has a hardware random generator infrastructure, which ChaosKey
driver hooks into.  This periodically feeds entropy into the
/dev/random pool automatically.

So I can just plug in the ChaosKey and the right thing (should)
happen.  I can also do something like cat /dev/hwrng | od -x, and
manually verify the output is (a) happening, (b) looks sane, and then
do something like "dd if=/dev/hwrng of=/dev/urandom bs=4k count=1".

And of course, if you want to take a picture of your feline having the
zoomies, and cat it into /dev/urandom, it won't hurt, and it's
unlikely that Kash Patel has a camera in your living room spying on
you.  (Of course not; they just tap into ChatGPT.  :-)

   	     	      		    		    - Ted


More information about the cryptography mailing list