Entropy Sourced Random Number Generation

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search

PRNG (pseudo random number generator) is any algorithm that utilizes mathmatical formula to produce sequences of random numbers. The PRNG-generated sequence is not truly random, because it is completely determined by an initial value, called the PRNG's seed. Although sequences that are closer to truly random can be generated using hardware random number generators, pseudorandom number generators are important in practice as they are simple and fast which makes them practical and easy to reproduce.

In computing, entropy is the randomness collected by an operating system or application for use in cryptography or other uses that require random data. This randomness is often collected from hardware sources such as human made mouse movements or variance in fan noise and temperature, or specially provided randomness generators. A lack of entropy can have a negative impact on performance and security.

Entropy provides a measure of the average amount of information needed to represent an event drawn from a probability distribution for a random variable. The entropy of a random variable is the average level of "information", "surprise", or "uncertainty" inherent in the variable's possible outcomes. The concept of information entropy was introduced by Claude Shannon in his 1948 paper "A Mathematical Theory of Communication". Entropy in information theory is directly analogous to the entropy in statistical thermodynamics. Entropy has relevance to other areas of mathematics such as combinatorics. The definition can be derived from a set of axioms establishing that entropy should be a measure of how "surprising" the average outcome of a variable is. For a continuous random variable, differential entropy is analogous to entropy.

A number of possible entropy sources (such as mouse movements) are not always available to the various types of computing systems such as headless servers. Sometimes alternatives such as the rdrand command, which is a feature of many modern CPUs to generate random numbers. Utilizing alternative entropy sources supplements the computer's ability to collect enough entropy on its own, and can help to initialize the server's PRNG more quickly. An increasing number of Linux distributions contain software that uses the getrandom() system call. This call, and services such as SSH that depend on it, wait after system startup until the server's PRNG is initialized, which in some cases can lead to long delays. Thanks to rdrand and /dev/hwrng, the necessary entropy is available in no time, so that services requiring random numbers can be started right away.