Warren MacEvoy
Warren MacEvoy

Reputation: 989

Adding to entropy estimate in linux as unprivileged process

In linux, any process can write random data to /dev/random to improve the entropy of reading from /dev/random or /dev/urandom, but this does not increase the entropy estimate, and so requesting data from /dev/random is usually very slow without some acceleration (/dev/urandom which is non-blocking, but that is not my question).

Are there any steps, like random seeks on a file, that an unprivileged process can use to increase the entropy estimate?

Assume there is an alternative strong random source to use.

Upvotes: 1

Views: 182

Answers (1)

CL.
CL.

Reputation: 180210

If you have some strong random source, the administrator should already have arranged for it to be dumped into /dev/random by a sufficiently privileged process.

Unprivileged processes are not allowed to affect the entropy estimate directly. However, the kernel derives a small amount from the timing of interrupts, so your process could do something that will cause the hardware to raise interrupts. Random seeks are not very random if the file happens to be cached; a more direct way to affect interrupts is to run some timer with a random expiration time.

Upvotes: 0

Related Questions