[Cryptography] Generate Random Data From Sound Card
Byrl Raze Buckbriar
sub0 at octade.net
Tue Mar 3 18:54:49 EST 2026
Try one command to convert the sound card into a TRNG.
It should work with the audio muted.
arecord -D plughw -f S32_LE -t wav -c2 -r 44100 \
| xxd -p -c 0 | fold -w 8 | cut -c 5-6 | tr -d '\n' \
| fold -w 63 | head -n 320 | tail -n 20
This harvests the low-order noise bits and discards the silent bits.
The remainder is electronic noise from the sound card.
The user may need to specify the sound card with:
```-D plughw:A,B```
where A is the card number and B is the device number obtained via 'arecord -l'.
What would be a good, bash-based mechanism for identifying and testing the local sound cards and devices to find the ones that provide quality entropy, or to determine there is no usable entropy source (for warning the user).
--
= OCTADE = alt.rhubarb = misc.misc = sci.crypt =
= https://soc.octade.net/octade =
More information about the cryptography
mailing list