Docsity

Cryptographically Strong Pseudorandom Sequence Generation using Blum-Blum-Shub Algorithm, Slides of Cryptography and System Security

Partial preview of the text

Download Cryptographically Strong Pseudorandom Sequence Generation using Blum-Blum-Shub Algorithm and more Slides Cryptography and System Security in PDF only on Docsity!

Outline PRSG

CPSC 467b: Cryptography and Computer Security

Lecture 21

Michael J. Fischer

Department of Computer Science Yale University

April 7, 2010

Outline PRSG

(^1) Pseudorandom Sequence Generation Concepts of Pseudorandomness BBS Pseudorandom Sequence Generator

Pseudorandom sequence generators revisited

Cryptographically strong pseudorandom sequence generators were introduced in Lecture 6 in connection with stream ciphers. We now show how to build one that is provably secure. It uses the quadratic residuosity assumption (Lecture 13) on which the Goldwasser-Micali probabilistic cryptosystem is based.

Desired properties of a PRSG

A pseudorandom sequence generator (PRSG) maps a “short” random seed to a “long” pseudorandom bit string. We want a PRSG to be cryptographically strong, that is, it must be difficult to correctly predict any generated bit, even knowing all of the other bits of the output sequence. In particular, it must also be difficult to find the seed given the output sequence, since otherwise, the whole sequence is easily generated. Thus, a PRSG is a one-way function and more. Note: While a hash function might generate hash values of the form yy and still be strongly collision-free, such a function could not be a PRSG since it would be possible to predict the second half of the output knowing the first half.

Incremental generators

In practice, the output length is usually variable. We can request as many output bits from the generator as we like (within limits), and it will deliver them. In this case, “long” refers to the maximum number of bits that can be delivered while still maintaining security. Also, in practice, the bits are generally delivered a few at a time rather than all at once, so we don’t need to announce in advance how many bits we want but can go back as needed to get more.

Notation for PRSG’s

In a little more detail, a pseudorandom sequence generator G is a function from a domain of seeds S to a domain of strings X. We will generally assume that all of the seeds in S have the same length n and that X is the set of all binary strings of length =(n), where (·) is a polynomial and n (n). `(·) is called the expansion factor of G.

Randomness based on probability theory

We take a different tack. We assume that the seeds are chosen truly at random from S according to the uniform distribution. Let S be a uniformly distributed random variable over S. Then X ∈ X is a derived random variable defined by X = G (S). For x ∈ X , P[X = x] = |{s ∈ S | G (s) = x}| |S|

Thus, P[X = x] is the probability of obtaining x as the output of the PRSG for a randomly chosen seed.

Randomness amplifier

We think of G (·) as a randomness amplifier. We start with a short truly random seed and obtain a long string that “looks like” a random string, even though we know it’s not uniformly distributed. In fact, the distribution G (S) is very much non-uniform. Because |S| ≤ 2 n, |X | = 2, and n , most strings in X are not in the range of G and hence have probability 0. For the uniform distribution U over X , all strings have the same non-zero probability 1/ 2 . U is what we usually mean by a truly random variable on-bit strings.

Some implications of computational indistinguishability

Before going further, let me describe some functions G for which G (S) is readily distinguished from U. Suppose every string x = G (s) has the form b 1 b 1 b 2 b 2 b 3 b 3.. ., for example 0011111100001100110000.... Algorithm A(x) outputs “G” if x is of the special form above, and it outputs “U”otherwise. A will always guess correctly for inputs from G (S), and its error probability on strings from U is only

2 /^2 2^

2 `/^2

Judges

Formally, a judge is a probabilistic algorithm J that takes an `-bit string as input and produces a single bit b as output. Thus, it defines a random function from X to { 0 , 1 }. This means that for every input x, the output is 1 with some probability px , and the output is 0 with probability 1 − px. If the input string is a random variable X , then the probability that the output is 1 is the weighted sum of px over all possible inputs x, where the weight is the probability P[X = x] of input x occurring. Thus, the output value is itself a random variable J(X ), where

P[J(X ) = 1] =

x∈X

P[X = x] · px.

BBS Pseudorandom Sequence Generator

A cryptographically strong PRSG

We present a cryptographically strong pseudorandom sequence generator due to Blum, Blum, and Shub (BBS). BBS is defined by a Blum integer n = pq and an integer . It maps strings in Z∗ n to strings in { 0 , 1 }. Given a seed s 0 ∈ Z∗ n, we define a sequence s 1 , s 2 , s 3 ,... , s, where si = s^2 i− 1 mod n for i = 1,... ,. The -bit output sequence BBS(s 0 ) is b 1 , b 2 , b 3 ,... , b , where bi = lsb(si ) is the least significant bit of si.

Facts about Blum integers - Jacobi symbol

Fact

Let n be a Blum integer and a ∈ QRn. Then

( (^) a n

( (^) −a n

Proof. This follows from the fact that if a is a quadratic residue modulo a Blum prime, then −a is a quadratic non-residue. Hence, ( a p

−a p

and

a q

−a q

, so

( (^) a n

a p

a q

−a p

−a q

−a n

Facts about Blum integers - lsb

The second fact simply says that the low-order bits of x mod n and (−x) mod n always differ when n is odd. Let lsb(x) = (x mod 2) be the least significant bit of integer x. Fact Let n be odd. Then lsb(x mod n) ⊕ lsb((−x) mod n) = 1.