Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)"— Presentation transcript:

1

2 Pseudo-random generators

3

4 Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software) generators The third category is the one most often used in cryptography. It does not produce a truly random number but rather a pseudo random number.

5

6

7

8 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

9 Mersenne Twister

10 Linear congruential generator A linear congruential generator is determined by the following four integer values m the modulus m > 0 a the multiplier 0, 0 < a < m c the increment 0, 0 < c< m X 0 the starting value 0, 0 <X 0 < m The algorithm is X n + 1 = (aX n + c)mod m Where n>0

11 Lehmer random number generator

12 The basic algorithm is X i + 1 = (aX i + c) mod m, with 0 ≤ X i ≤ m X 0, a, and c are known as the seed, multiplier, and the increment respectively M is 2 p-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 X 0 = 19. The next integers in the sequence are 9, 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 http://www.seas.gwu.edu/~simhaweb/java/lectures/appendix/random.html

13 Lagged Fibonacci Generator

14 Naor-Reingold Pseudorandom Function

15

16

17

18

19


Download ppt "Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)"

Similar presentations


Ads by Google