Random Numbers
Many uses of random numbers in cryptography
nonce in authentication protocols to prevent replay
session keys
public key generation
keystream for a one-time pad
In all cases its critical that these values be
statistically random, uniform distribution, independent
unpredictability of future values from previous values
True random numbers provide this
Care needed with generated random numbers
The Use of Random Numbers
Generation of keys for the RSA public-key encryption
algorithm.
Generation of a stream key for symmetric stream cipher.
Generation of a symmetric key for use as a temporary
session key or in creating a digital envelope.
In a number of key distribution scenarios, such as
Kerberos, random numbers are used for handshaking to
prevent replay attacks.
Session key generation, whether done by a key
distribution center or by one of the principals.
Pseudorandom Number Generators
(PRNGs)
Often use deterministic algorithmic techniques to
create “random numbers”
although are not truly random
can pass many tests of “randomness”
Known as “pseudorandom numbers”
created by “Pseudorandom Number Generators
(PRNGs)”
Random & Pseudorandom Number
Generators
PRNG Requirements
Randomness
uniformity, scalability, consistency
Unpredictability
forward & backward unpredictability
use same tests to check
Characteristics of the seed
secure
if known adversary can determine output
so must be random or pseudorandom number
Linear Congruent Generator
Common iterative technique using:
Xn+1 = (aXn + c) mod m
If m, a, c, and X0are integers, then this technique
will produce a sequence of integers with each
integer in the range. 0<= Xn < m
Blum Blum Shub Generator
Based on public key algorithms
Use least significant bit from iterative equation:
xi = xi-12 mod n
where n=p.q, and primes p,q=3 mod 4
Unpredictable, passes next-bit test
Security rests on difficulty of factoring N
Is unpredictable given any run of bits
Slow, since very large numbers must be used
Too slow for cipher use, good for key generation
Blum Blum Shub Generator
PRNGs Using Block Ciphers
For cryptographic applications, can use a block
cipher to generate random numbers
Often for creating session keys from master key
CTR
Xi = EK[Vi]
OFB
Xi = EK[Xi-1]
ANSI X9.17 PRG
True Natural Random Noise
Best source is natural randomness in real world
Find a regular but random event and monitor
Do generally need special h/w to do this
eg. radiation counters, radio noise, audio noise, thermal
noise in diodes, leaky capacitors, mercury discharge tubes
etc
Starting to see such h/w in new CPU's