pseudo-random generators random number generating there are three types of generators table look-up...

19

Upload: isaac-cox

Post on 02-Jan-2016

241 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Page 2: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)

Pseudo-random generators

Page 3: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Page 4: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)

Random Number Generating

There are three types of generatorstable look-up generatorshardware generatorsalgorithmic (software) generatorsThe third category is the one most often used in cryptography. It does not produce a truly random number but rather a pseudo random number.

Page 5: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Page 6: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Page 7: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Page 8: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)

Is a given PRNG good enough?•The German Federal Office for Information Security (BSI) has established four criteria for quality of random number generators:• K1 A sequence of random numbers with a low probability of containing identical

consecutive elements.• K2 A sequence of numbers which is indistinguishable from 'true random' numbers

according to specified statistical tests..• K3 It should be impossible for any attacker to calculate, or otherwise guess, from any

given sub-sequence, any previous or future values in the sequence.• K4 It should be impossible for an attacker to calculate, or guess from an inner state of

the generator, any previous numbers in the sequence or any previous inner generator states.

•To be suitable for cryptography any PRNG should meet K3 and K4 standards

Page 9: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)

Mersenne Twister

Page 10: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)

Linear congruential generator

A linear congruential generator is determined by the following four integer values m the modulus m > 0a the multiplier 0 , 0 < a < mc the increment 0, 0 < c< mX0 the starting value 0, 0 <X0 < m

The algorithm is

Xn + 1 = (aXn + c)mod m Where n>0

Page 11: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)

Lehmer random number generator

Page 12: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)

Lehmer random number generator

The basic algorithm is

Xi + 1 = (aXi + c) mod m , with 0 ≤ Xi ≤ m

X0, a, and c are known as the seed, multiplier, and the increment respectivelyM is 2p-1 where p is the CPU bits (32 bit, 64 bit, etc.)If we pick small numbers to make the math easy like this

For example, consider m = 31, a = 7, c = 0 and begin with X0 = 19. The next integers in the sequence are9, 1, 7, 18, 2, 14, 5, 4, 28, 10, 8, 25, 20, 16

If the multiplier and seed are chosen properly, a Lehmer generator is statistically indistinguishable from drawing from with replacement.

You can see a code implementation of this PRNG at http://www.seas.gwu.edu/~simhaweb/java/lectures/appendix/random.html

Page 13: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)

Lagged Fibonacci Generator

Page 14: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)

Naor-Reingold Pseudorandom Function

Page 15: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Page 16: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Page 17: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Page 18: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Page 19: Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)