Unit 4 Random Number Generators
Unit 4 Random Number Generators
Unit 4 Random Number Generators
Pseudorandom Number
Generators
Random Numbers
• A number of network security algorithms and
protocols based on cryptography make use of random
binary numbers:
• Key distribution and reciprocal authentication schemes
• Session key generation
• Generation of keys for the RSA public-key encryption
algorithm
• Generation of a bit stream for symmetric stream
encryption
Randomness
There are two distinct
requirements for a
sequence of random
numbers:
Unpredictability
Randomness
• The generation of a sequence of allegedly
random numbers being random in some well-
defined statistical sense has been a concern
Independence
• No one subsequence in the sequence can be inferred
from the others
Unpredictability
• The requirement is not just that the sequence of
numbers be statistically random, but that the
successive members of the sequence are
unpredictable
• With “true” random sequences each number is
statistically independent of other numbers in the
sequence and therefore unpredictable
• True random numbers have their limitations, such as
inefficiency, so it is more common to implement
algorithms that generate sequences of numbers that
appear to be random
• Care must be taken that an opponent not be able to
predict future elements of the sequence on the basis of
earlier elements
Pseudorandom Numbers
• Cryptographic applications typically make use
of algorithmic techniques for random number
generation
• Forward unpredictability
• If the seed is unknown, the next output bit in the sequence should be
unpredictable in spite of any knowledge of previous bits in the
sequence
• Backward unpredictability
• It should not be feasible to determine the seed from knowledge of
any generated values. No correlation between a seed and any value
generated from that seed should be evident; each element of the
sequence should appear to be the outcome of an independent
random event whose probability is 1/2
• Two approaches that use a block cipher to build a PNRG have gained
widespread acceptance:
• CTR mode (Counter )
Counter mode turns a block cipher into a stream cipher. It generates the
next keystream block by encrypting successive values of a "counter". The
counter can be any function which produces a sequence which is
guaranteed not to repeat for a long time, although an actual increment-by-
one counter is the simplest and most popular.
• Recommended in NIST SP 800-90, ANSI standard X.82, and RFC 4086
• OFB mode(Output Feedback)
The Output Feedback (OFB) mode makes a block cipher into a
synchronous stream cipher. It generates keystream blocks, which are
then XORed with the plaintext blocks to get the ciphertext.
• Recommended in X9.82 and RFC 4086
Table 7.2