Docsity

Pseudorandom Generators and Secure Encryption - Introduction to Cryptography - Lecture Notes, Study notes of Cryptography and System Security

Toggle sidebar
bg1
Recommended Reading.
•
Katz-Lindell 3.3, 3.4
1 Denition
Motivation:
The one-time pad is secure if the two parties use a random key
k
but the length of
the key shared is impractical. Instead, the two parties will share a single
short
seed
k
and use
it to generate a long key
k0
that looks random", i.e. it is
pseudorandom
.
What does it mean to look random?
The following are some properties we expect a pseu-
dorandom sequence to have:
•
Each bit is almost unbiased.
•
Fraction of 1's is
≈50%
.
•
Longest run of 1's is
O(log n)
.
•
Incompressible.
•. . .
Linear congruential generators
Let
s0
be the seed. Dene
si+1 =asi+b(mod m)
and output
(s0, s1, s2,· · · )
These classical linear congruential generators and variants (e.g. where only
parts of the
si
's are output or where
a, b, m
are part of the seed) have all been broken: there
exists a sophisticated algorithm which eciently predicts the next bit of the sequence after
seeing a short prex.
We want a strong enough denition to guarantee that the stream cipher is secure (i.e. has indistin-
guishable encryptions).
Denition 1
G:{0,1}∗→ {0,1}∗
is a
pseudorandom generator
if
•
(eciency)
G
can be computed in polynomial time (deterministically).
•
(expansion)
|G(x)|=`(|x|)
for some
expansion function
satisfying
`(n)> n
,
•
(pseudorandomness) For every non-uniform PPT
D
(
distinguisher
), there exists a negligible
function
ε(·)
s.t.
Pr [D(G(Un)) = 1] −Pr D(U`(n)) = 1
≤ε(n)∀n,
where the probabilities are taken over
Un
R
← {0,1}n
,
U`(n)
R
← {0,1}`(n)
, and the coin tosses of
D
.
1
pf3

Partial preview of the text

Download Pseudorandom Generators and Secure Encryption - Introduction to Cryptography - Lecture Notes and more Study notes Cryptography and System Security in PDF only on Docsity!

Recommended Reading.

  • Katz-Lindell 3.3, 3.

1 Denition

Motivation: The one-time pad is secure if the two parties use a random key k but the length of the key shared is impractical. Instead, the two parties will share a single short seed k and use it to generate a long key k′^ that looks random", i.e. it is pseudorandom.

What does it mean to look random? The following are some properties we expect a pseu- dorandom sequence to have:

  • Each bit is almost unbiased.
  • Fraction of 1's is ≈ 50%.
  • Longest run of 1's is O(log n).
  • Incompressible. -...

Linear congruential generators Let s 0 be the seed. Dene si+1 = asi + b (mod m) and output (s 0 , s 1 , s 2 , · · · ) These classical linear congruential generators and variants (e.g. where only parts of the si's are output or where a, b, m are part of the seed) have all been broken: there exists a sophisticated algorithm which eciently predicts the next bit of the sequence after seeing a short prex.

We want a strong enough denition to guarantee that the stream cipher is secure (i.e. has indistin- guishable encryptions).

Denition 1 G : { 0 , 1 }∗^ → { 0 , 1 }∗^ is a pseudorandom generator if

  • (eciency) G can be computed in polynomial time (deterministically).
  • (expansion) |G(x)| = (|x|) for some expansion function satisfying(n) > n,
  • (pseudorandomness) For every non-uniform PPT D (distinguisher), there exists a negligible function ε(·) s.t. ∣ ∣Pr [D(G(Un)) = 1] − Pr [D(U`(n)) = 1]∣∣ (^) ≤ ε(n) ∀n,

where the probabilities are taken over Un ← {R 0 , 1 }n, U(n) ← {^ R 0 , 1 }(n), and the coin tosses of D.

Input to G is called the seed.

This denition implies that all eciently testable statistical properties of truly random sequences are satised by pseudorandom sequences. For example:

Proposition 2 If G is a pseudorandom generator, then

Pr [fraction of 1 's in G(Un) is < 1 /3] ≤ neg(n).

More generally, the outcome of any ecient procedure/application that uses pseudo-random bits instead of random ones will not be aected. This is a quite remarkable feature!

2 PRGS =⇒ Encryption

Given a pseudorandom generator G, we can obtain an encryption scheme (GEnc, E, D):

  • The key k is the random seed for G.
  • We generate pseudorandom bits to encrypt like one-time-pad: Let k′^ = G(k) and dene Ek(m) = k′^ ⊕ m

Theorem 3 If G is a PRG, then (GEnc, E, D) has indistinguishable encryptions.

Proof: Intuition: by pseudorandomness, the above encryption scheme is indistinguishable from using a random one-time pad, which we know to be perfectly secure. Let A be any PPT algorithm, and let m 0 , m 1 ∈ P be any two messages. We want to show that the encryptions of m 0 and m 1 are computationally indistinguishable. We dene four distributions:

  • Real 0 ≡ EK (m 0 ) = G(K) ⊕ m 0 , where K ← Un.
  • Real 1 ≡ EK (m 1 ) = G(K) ⊕ m 1 , where K ← Un.
  • Ideal 0 ≡ K′^ ⊕ m 0 , where K′^ ← U`(n).