Reading entropy_avail file appears to consume entropy [closed]

北慕城南 提交于 2019-12-06 21:47:47

问题


The question have been asked in here http://www.gossamer-threads.com/lists/linux/kernel/1210167 but I don't see an answer.

AFAIK /proc/sys/kernel/random/entropy_avail should return the size of available entropy but should not consume it. At least I don't see any reason for that.

However, I have been noticing the same thing as OP for at least a year and now I executed in quick succession

% cat /proc/sys/kernel/random/entropy_avail 
3918
% cat /proc/sys/kernel/random/entropy_avail
3447
% cat /proc/sys/kernel/random/entropy_avail
2878
% cat /proc/sys/kernel/random/entropy_avail
2377
% cat /proc/sys/kernel/random/entropy_avail
1789
% cat /proc/sys/kernel/random/entropy_avail
1184
% cat /proc/sys/kernel/random/entropy_avail
577
% cat /proc/sys/kernel/random/entropy_avail
161
% cat /proc/sys/kernel/random/entropy_avail
133
% cat /proc/sys/kernel/random/entropy_avail
171

a while later I did the same with the same result, so I'm pretty sure the depletion of entropy is caused by the cat command.

Can anyone explain why this happens?


回答1:


Found an answer in here http://blog.flameeyes.eu/2011/03/entropy-broken

Starting a process consumes entropy



来源:https://stackoverflow.com/questions/13170334/reading-entropy-avail-file-appears-to-consume-entropy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!