Random Numbers

No encryption routine is capable of being better than the key it uses, and since keys depend on the availability of truly random data, we include here a brief discussion of obtaining random data. An in-depth discussion of this topic can be found in RFC 1750 (available at http://www.faqs.org/rfcs/rfc1750.html).

The main source of randomness, or entropy, on a Unix system is /dev/random. This is a software device that outputs a more or less constant stream of binary data, based on a pseudo-random number generation (PNRG) algorithm. Because pseudo-random data is predictable if the starting number is known, the PNRG algorithm is supplemented by a buffer of random data collected over time from various system values, such as network events or the timings of various routines that are run by the system kernel. If this buffer of real-world data runs out, the /dev/random device enters blocking mode, and output is suspended until more entropy is gathered from the system to mix into the pseudo-random stream.

On Linux-compatible systems there is also a /dev/urandom device, which does not enter blocking mode if the system entropy buffer is emptied. Instead, /dev/urandom continues with the pseudo-random data from the PRNG algorithm alone until more system entropy is captured. While this keeps programs that need a lot of random data from hanging up in cases where not much is happening on the system, it can potentially weaken cryptographic algorithms, which rely on true randomness for the successful obfuscation of information. While /dev/urandom will certainly meet the requirements of most other routines that need random data, only /dev/random should be used for cryptographic and security-related purposes.

If you suspect that /dev/random may not be random enough, or you are using a system that does not have a good source of entropy, there are various free and paid services available at http://www.random.org, for example: dice-rolling algorithms, lottery quick picks, and others.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.94.159