2

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?

migrated from tor.stackexchange.com Jun 1 '15 at 13:04

This question came from our site for researchers, developers, and users of Tor.

3

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.

0

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.

https://stackoverflow.com/questions/3690273/did-i-understand-dev-urandom

Your Answer

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