New entropy source proposal.

Pawel Jakub Dawidek pjd at
Mon Mar 7 13:03:33 GMT 2005


I've been playing a bit with "use sound card as an entropy source" idea.
This simple program does what I wanted:

The program is very simple, it should be run with two arguments:

	% sndtest /dev/dspW 1048576 >

This command will generate 1MB of random data.

With my sound card:

pcm0: <Intel ICH3 (82801CA)> port 0xe100-0xe13f,0xe000-0xe0ff irq 11 at device 31.5 on pci0
pcm0: <Cirrus Logic CS4299 AC97 Codec>

It produce very good entropy. I tried those tests to prove its quality:
- FIPS 140-2 tests
- 'ent' tests:
- Famous 'diehard' tests

The full output from diehard tests is here:

The idea of using sound card as entropy source was taken from RFC 1750.

If people like the idea and someone more skilled than me in this subject
can review this stuff, we can start to put it into kernel
"random infrastructure". It could also be implemented as userland daemon
which writes collected entropy to /dev/random maybe...

Pawel Jakub Dawidek             
pjd at                 
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-security mailing list