A headless server can suffer from a lack of entropy, which is a problem given that encryption needs random numbers. In the absence of a hardware random number generator (RNG) the numbers must be generated by software.

And a busy Tor server can consume a lot of those numbers.

Which software RNG is the "best" (i.e. least deterministic) at providing the random numbers needed for secure cryptography on Linux?


If you have some entropy to work with, then use /dev/urandom. Either the kernel has it, or you can inject it in /dev/urandom (e.g. with "cat file > /dev/urandom").

If you do not have such entropy, then you lose.

Note that being headless is not the major issue, since even without a keyboard and mouse, the machine still has disks and network, and get a lot of entropy-bearing hardware events from these. If the machine got "enough" entropy at any point in its life since the OS was installed, then, by the magic of cryptography, it still has it, and /dev/urandom is how you access it. The one remaining issue is when you begin to clone virtual machines.

/dev/urandom is always preferable over /dev/random.

| improve this answer | |

This is a Linux question not really a Tor question but the standard for secure Linux environments is /dev/urandom. The difference between /dev/urandom and /dev/random is discussed in this article. On modern machines, this choice is less consequential than decades ago.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy