For a class on cryptography, I am trying to drain the entropy pool in Linux (e.g. make /proc/sys/kernel/random/entropy_avail
go to 0 and block a command reading from /dev/random
) but I can't make it happen. I'm supposed to get reads from /dev/random
to block. If I execute these two commands:
watch -n 0.5 cat /proc/sys/kernel/random/entropy_avail
to watch entropy and then:
od -d /dev/random
to dump the random pool, the value from the watch
command hovers between 3700 and 3900, and gains and loses only a little while I run this command. I let both commands run for about three minutes with no discernible substantial change in the size of entropy_avail
. I didn't do much on the computer during that time. From googling around I find that perhaps a hardware random number generator could be so good that the entropy won't drop but if I do:
cat /sys/devices/virtual/misc/hw_random/rng_available
I see nothing, I just get a blank line. So I have a few questions:
- What's replenishing my entropy so well, and how can I find the specific source of randomness?
- Is there any way to temporarily disable sources of randomness so I can force this blocking to happen?