random numbers are commonly used in random number generation type of program.
random numbers are commonly used in random number generation type of program.
random numbers are commonly used in which type of program?
random number generation
generated random numbers are sometimes subjected to statistical tests before use to ensure that the underlying source is still working, and then post-processed to improve their statistical properties. an example would be the trng9803 hardware random number generator, which uses an entropy measurement as a hardware test, and then post-processes the random sequence with a shift register stream cipher. it is generally hard to use statistical tests to validate the generated random numbers. wang and nicol proposed a distance-based statistical testing technique that is used to identify the weaknesses of several random generators. li and wang proposed a method of testing random numbers based on laser chaotic entropy sources using brownian motion properties.
random number generation
for example, if a user wants to use an encryption algorithm, it is best that they select a random number as the key. the selection must have high entropy (i.e., unpredictability) to any attacker, thus increasing attack difficulty. with keys having low entropy (i.e., relatively easily guessable by attackers), security is likely to be compromised. to illustrate, imagine if a simple 32 bit linear congruential pseudo-random number generator of the type supplied with most programming languages (e.g., as the 'rand' or 'rnd' function) is used as a source of keys. there will only be some four billion possible values produced before the generator repeats itself. a suitably motivated adversary could simply test them all; this is practical as of 2010, using readily available computers. even if a linear congruential rng is used with 1000-bit parameters, it is a simple exercise in linear algebra to recover the modulus m, and the constants a and b, where x' = ax +b (mod m), given only five consecutive values. even if a better random number generator is used, it might be insecure (e.g., the seed might be guessable), producing predictable keys and reducing security to nil. (a vulnerability of this sort was famously discovered in an early release of netscape navigator, forcing the authors to quickly find a source of "more random" random numbers.) for these applications, truly random numbers are ideal, and very high quality pseudo-random numbers are necessary if truly random numbers, such as coming from a hardware random number generator, are unavailable.
applications of randomness