[Cryptography] Generate Random Data From Sound Card

Theodore Tso tytso at mit.edu
Fri Mar 6 17:39:36 EST 2026


On Fri, Mar 06, 2026 at 11:16:59AM -0500, Patrick Chkoreff wrote:
> I do have a set of 16-sided dice, but I haven't used them for serious
> purposes.  If I really needed to generate 1024 bits, I would be lazy and use
> this (with the hexdump only for readability):
> 
> head -c 128 /dev/urandom | hexdump
> 
> In other words, I would just rely entirely on Theodore Tso's code.  Go Ted.

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, which is an Open Hardware / Open Software
solution which was created by some friends of mine about ten years
ago:

https://chuangtzu.ftp.acc.umu.se/pub/debian-meetings/2016/debconf16/Chaoskey_A_Hardware_Random_Number_Generator_for_Everyone.webm

https://altusmetrum.org/ChaosKey/

Is it overkill?  Probably.  But it's fun, and it's way less work, and
way more poirtable, than pointing a camera at a Lava Lamp.  On the
other hand, if the part of the goal is to get a gullible investor to
part with their money, they seem to love things like Lava Lamps.  :-)

							- Ted


More information about the cryptography mailing list