Is reading from /proc/sys/kernel/random/entropy_avail draining entropy?

4

When I'm doing watch cat /proc/sys/kernel/random/entropy_avail, the amount of entropy steadily decreases, until I get about 150-200. Initially I get over 2000. When I stop reading that value and wait a minute or two, and then read it again, I am at about 2000 again. Why is reading that value reducing the entropy?

Sibbo

Posted 2014-01-06T01:24:20.513

Reputation: 234

3

It was answered on Stackoverflow. Main point is that creating a process does consume entropy. cat is a process, thus running watch cat consumes entropy.

– VL-80 – 2014-01-06T01:36:39.967

OK. I did. Only because you asked. I feel like I just only retyped data from one place to another... Meanwhile I did learn this as well, because I did not know it before. – VL-80 – 2014-01-06T02:26:08.520

Relevant: http://unix.stackexchange.com/q/96847/22222

– terdon – 2014-01-06T10:35:25.380

Answers

5

Main point here is that creating a process will consume some amount of entropy.

As stated in comments in the blog post Entropy Broken entropy is needed at least for randomization of the address space layout.

cat is a process, thus running watch cat ... will be consuming entropy constantly. Obviously, when you kill watch your system is restoring entropy to the usual level.

VL-80

Posted 2014-01-06T01:24:20.513

Reputation: 3 867