0% found this document useful (0 votes)
20 views10 pages

22-Pseudorandom Number Generators-01-03-2025

The document discusses pseudo random bit generation techniques, focusing on Linear Congruential Generators (LCGs) and the Blum Blum Shub (BBS) generator. LCGs use a specific iterative equation with parameters to generate random sequences, while BBS is a cryptographically secure method that relies on prime numbers. The document also highlights the importance of testing the effectiveness of these generators and the potential vulnerabilities in LCGs if parameters are known.

Uploaded by

vvdsaivarshini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views10 pages

22-Pseudorandom Number Generators-01-03-2025

The document discusses pseudo random bit generation techniques, focusing on Linear Congruential Generators (LCGs) and the Blum Blum Shub (BBS) generator. LCGs use a specific iterative equation with parameters to generate random sequences, while BBS is a cryptographically secure method that relies on prime numbers. The document also highlights the importance of testing the effectiveness of these generators and the potential vulnerabilities in LCGs if parameters are known.

Uploaded by

vvdsaivarshini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Pseudo Random Bit Generation

Linear Congruential Generators


• Linear congruential generators are widely used algorithm proposed by Lehmer.

• It is known as linear congruential method.

• The algorithm is parameterized with four numbers as follows :

• m = The modulus (m > 0)

• a = The multiplier (0 < a < m)

• c = The increment (0 ≤ c < m)

• X0 = The seed value (0 ≤ X0 < m)


• The sequence of random numbers {Xn} is obtained using the iterative equation,

• Xn+1 = (aXn + c) mod m

• Given : The value of a, c, m and X0

• To compute the Pseudo Random Sequence and Period

• Eg – 1 : a = 7, c = 0, m = 32, X0 = 1

• Eg – 2 : a = 5, c = 0, m = 32, X0 = 1
• Park proposes three tests to be used in evaluating the random number generator :

• T1 : The function should be a full-period generating function. That is, the function
should generate all the numbers from 0 through m - 1 before repeating.

• T2 : The generated sequence should appear random.

• T3 : The function should implement efficiently with 32-bit arithmetic.

• For T1, m should be a prime number and c = 0 and certain values of a, the period of
generating function is m-1

• For T3, convenient prime value of m is 231 – 1

• The generating function becomes Xn+1 = (aXn) mod (231 - 1)


• Of the more 2 billion possible choices of a, only a = 75 = 16807 is successful with all three tests.

• These numbers are selected for use in IBM 360 family of computers.

• Cryptanalysis

• If an attacker knows the logic of Linear Congruential algorithm,

• If any one of the value is known then all other parameters can be computed.

• If an attacker is to determine values for X0, X1, X2 and X3

• X1 = (aX0 + c) mod m

• X2 = (aX1 + c) mod m

• X3 = (aX2 + c) mod m
Blum Blum Shub Generator

• Popular approach to generate secure pseudo random numbers

• Named after the inventor BLUM

• Procedure :

• Choose two prime numbers p and q

• p and q should have a remainder of 3 when divided by 4

• p congruent modulo to q congruent modulo to remainder modulus 4

• p mod 4 = 3 and q mod 4 = 3


• Two prime numbers p and q

• p = 7 and q = 11

• 7 mod 4 = 3 and 11 mod 4 = 3

• Let n = p x q ( n = 7 x 11 = 77)

• Choose a random number s, s should be relatively prime to n

• BBS generator produces a sequence of bits Bi based on the following algorithm


• BBS is referred as Cryptographically Secure Pseudo Random Bit Generator (CSPRBG).
• S-1 : p = 7 and q = 19
• S – 2 : n = p x q, n = 7 x 19, n = 133
• S – 3 : S = 100
• S – 4 : X0 = S2 mod n 1002 mod 133 = 25.
• S – 5 : Xi = (Xi-1)2 mod n
• For i = 1, X1 = 93
• For i = 2, X2 = 4
• For i = 3, X3 = 16
• For i = 4, X4 = 123
• For i = 5, X5 = 100
• For i = 6, X6 = 25
• {X0,X1,X2,X3,X4,X5,X6} = {25,93,4,16,123,100,25}
• 25 Binary equivalent is 11001, Z = 1
• 93 = 1011101, 4 = 100, 16 = 10000, 123 = 11110111, 100 = 1100100 Select LSB from all sequences
• z = 110010

You might also like