4 ms·
My guess is that the AHA moment happened when he ran this: "watch -n x.xx cat /proc/sys/kernel/random/entropy_avail" Which itself appears to deplete entropy: h
by deelowe 14y ago
My guess is that the AHA moment happened when he ran this: "watch -n x.xx cat /proc/sys/kernel/random/entropy_avail"
Which itself appears to deplete entropy: http://strugglers.net/~andy/blog/2010/06/06/adventures-in-entropy-part-1/ http://strugglers.net/~andy/blog/2010/06/06/adventures-in-en...
As others have said, there's good evidence that nothing in android touches /dev/random these days.
- tytso 14y agoThe reason why this drains entropy is because when you start a new process (for example "cat" in this case), the kernel passes 16 bytes of randomness at exec time for the benefit of userspace. This allows for fast stack randomization, without the overhead of explicitly opening and reading from /dev/urandom. Due to the internal kernel interface which gets used, this draws from the /dev/random pool, thus decreasing entropy_avail, although it is not a blocking call. There has been some discussions that the userspace randomization should use a CRNG, or perhaps draw from the urandom pool instead.