Symmetric-Key Encryption: constructions Lecture 4 PRG, Stream - - PowerPoint PPT Presentation

symmetric key encryption constructions
SMART_READER_LITE
LIVE PREVIEW

Symmetric-Key Encryption: constructions Lecture 4 PRG, Stream - - PowerPoint PPT Presentation

Symmetric-Key Encryption: constructions Lecture 4 PRG, Stream Cipher Story So Far Story So Far We defined (passive) security of Symmetric Key Encryption (SKE) Story So Far We defined (passive) security of Symmetric Key Encryption (SKE)


slide-1
SLIDE 1

Symmetric-Key Encryption: constructions

Lecture 4 PRG, Stream Cipher

slide-2
SLIDE 2

Story So Far

slide-3
SLIDE 3

Story So Far

We defined (passive) security of Symmetric Key Encryption (SKE)

slide-4
SLIDE 4

Story So Far

We defined (passive) security of Symmetric Key Encryption (SKE) SIM-CPA = IND-CPA + approximate correctness

slide-5
SLIDE 5

Story So Far

We defined (passive) security of Symmetric Key Encryption (SKE) SIM-CPA = IND-CPA + approximate correctness Exploits the restriction to PPT entities

slide-6
SLIDE 6

Story So Far

We defined (passive) security of Symmetric Key Encryption (SKE) SIM-CPA = IND-CPA + approximate correctness Exploits the restriction to PPT entities Allows negligible advantage to the adversary

slide-7
SLIDE 7

Story So Far

We defined (passive) security of Symmetric Key Encryption (SKE) SIM-CPA = IND-CPA + approximate correctness Exploits the restriction to PPT entities Allows negligible advantage to the adversary Today: Constructing SKE from Pseudorandomness

slide-8
SLIDE 8

Story So Far

We defined (passive) security of Symmetric Key Encryption (SKE) SIM-CPA = IND-CPA + approximate correctness Exploits the restriction to PPT entities Allows negligible advantage to the adversary Today: Constructing SKE from Pseudorandomness Next time: Pseudorandomness ← One-Way Permutations

slide-9
SLIDE 9

Constructing SKE schemes

slide-10
SLIDE 10

Constructing SKE schemes

Basic idea: “stretchable” pseudo-random one-time pads (kept compressed in the key)

slide-11
SLIDE 11

Constructing SKE schemes

Basic idea: “stretchable” pseudo-random one-time pads (kept compressed in the key) (Will also need a mechanism to ensure that the same piece

  • f the one-time pad is not used more than once)
slide-12
SLIDE 12

Constructing SKE schemes

Basic idea: “stretchable” pseudo-random one-time pads (kept compressed in the key) (Will also need a mechanism to ensure that the same piece

  • f the one-time pad is not used more than once)

Approach used in practice today: complex functions which are conjectured to have the requisite pseudo-randomness properties (stream-ciphers, block-ciphers)

slide-13
SLIDE 13

Constructing SKE schemes

Basic idea: “stretchable” pseudo-random one-time pads (kept compressed in the key) (Will also need a mechanism to ensure that the same piece

  • f the one-time pad is not used more than once)

Approach used in practice today: complex functions which are conjectured to have the requisite pseudo-randomness properties (stream-ciphers, block-ciphers) Theoretical Constructions: Security relies on certain computational hardness assumptions related to simple functions

slide-14
SLIDE 14

Pseudorandomness Generator (PRG)

slide-15
SLIDE 15

Expand a short random seed to a “random-looking” string

Pseudorandomness Generator (PRG)

slide-16
SLIDE 16

Expand a short random seed to a “random-looking” string First, PRG with fixed stretch: Gk: {0,1}k → {0,1}n(k), n(k) > k

Pseudorandomness Generator (PRG)

slide-17
SLIDE 17

Expand a short random seed to a “random-looking” string First, PRG with fixed stretch: Gk: {0,1}k → {0,1}n(k), n(k) > k How does one define random-looking?

Pseudorandomness Generator (PRG)

slide-18
SLIDE 18

Expand a short random seed to a “random-looking” string First, PRG with fixed stretch: Gk: {0,1}k → {0,1}n(k), n(k) > k How does one define random-looking? Next-Bit Unpredictability: PPT adversary can’ t predict ith bit

  • f a sample from its first (i-1) bits (for every i ∈ {0,1,...,n-1})

Pseudorandomness Generator (PRG)

slide-19
SLIDE 19

Expand a short random seed to a “random-looking” string First, PRG with fixed stretch: Gk: {0,1}k → {0,1}n(k), n(k) > k How does one define random-looking? Next-Bit Unpredictability: PPT adversary can’ t predict ith bit

  • f a sample from its first (i-1) bits (for every i ∈ {0,1,...,n-1})

A “more correct” definition:

Pseudorandomness Generator (PRG)

slide-20
SLIDE 20

Expand a short random seed to a “random-looking” string First, PRG with fixed stretch: Gk: {0,1}k → {0,1}n(k), n(k) > k How does one define random-looking? Next-Bit Unpredictability: PPT adversary can’ t predict ith bit

  • f a sample from its first (i-1) bits (for every i ∈ {0,1,...,n-1})

A “more correct” definition: PPT adversary can’ t distinguish between a sample from {Gk(x)}x←{0,1}k and one from {0,1}n(k)

Pseudorandomness Generator (PRG)

slide-21
SLIDE 21

Expand a short random seed to a “random-looking” string First, PRG with fixed stretch: Gk: {0,1}k → {0,1}n(k), n(k) > k How does one define random-looking? Next-Bit Unpredictability: PPT adversary can’ t predict ith bit

  • f a sample from its first (i-1) bits (for every i ∈ {0,1,...,n-1})

A “more correct” definition: PPT adversary can’ t distinguish between a sample from {Gk(x)}x←{0,1}k and one from {0,1}n(k) Turns out they are equivalent!

Pseudorandomness Generator (PRG)

slide-22
SLIDE 22

Expand a short random seed to a “random-looking” string First, PRG with fixed stretch: Gk: {0,1}k → {0,1}n(k), n(k) > k How does one define random-looking? Next-Bit Unpredictability: PPT adversary can’ t predict ith bit

  • f a sample from its first (i-1) bits (for every i ∈ {0,1,...,n-1})

A “more correct” definition: PPT adversary can’ t distinguish between a sample from {Gk(x)}x←{0,1}k and one from {0,1}n(k) Turns out they are equivalent!

Pseudorandomness Generator (PRG)

| Pry←PRG[A(y)=0] - Pry←rand[A(y)=0] | is negligible for all PPT A

slide-23
SLIDE 23

Computational Indistinguishability

slide-24
SLIDE 24

Computational Indistinguishability

Distribution ensemble: A sequence of distributions (typically on a growing sample-space) indexed by k. Denoted {Xk}

slide-25
SLIDE 25

Computational Indistinguishability

Distribution ensemble: A sequence of distributions (typically on a growing sample-space) indexed by k. Denoted {Xk} E.g., ciphertext distributions, indexed by security parameter

slide-26
SLIDE 26

Computational Indistinguishability

Distribution ensemble: A sequence of distributions (typically on a growing sample-space) indexed by k. Denoted {Xk} E.g., ciphertext distributions, indexed by security parameter Two distribution ensembles {Xk} and {X’k} are said to be computationally indistinguishable if

slide-27
SLIDE 27

Computational Indistinguishability

Distribution ensemble: A sequence of distributions (typically on a growing sample-space) indexed by k. Denoted {Xk} E.g., ciphertext distributions, indexed by security parameter Two distribution ensembles {Xk} and {X’k} are said to be computationally indistinguishable if ∀ (non-uniform) PPT distinguisher D, ∃ negligible ν(k) such that

slide-28
SLIDE 28

Computational Indistinguishability

Distribution ensemble: A sequence of distributions (typically on a growing sample-space) indexed by k. Denoted {Xk} E.g., ciphertext distributions, indexed by security parameter Two distribution ensembles {Xk} and {X’k} are said to be computationally indistinguishable if ∀ (non-uniform) PPT distinguisher D, ∃ negligible ν(k) such that | Prx←Xk[D(x)=1] - Prx←X’k[D(x)=1] | ≤ ν(k)

slide-29
SLIDE 29

Computational Indistinguishability

Two distribution ensembles {Xk} and {X’k} are said to be computationally indistinguishable if ∀ (non-uniform) PPT distinguisher D, ∃ negligible ν(k) such that | Prx←Xk[D(x)=1] - Prx←X’k[D(x)=1] | ≤ ν(k)

slide-30
SLIDE 30

Computational Indistinguishability

Two distribution ensembles {Xk} and {X’k} are said to be computationally indistinguishable if ∀ (non-uniform) PPT distinguisher D, ∃ negligible ν(k) such that | Prx←Xk[D(x)=1] - Prx←X’k[D(x)=1] | ≤ ν(k) Xk ≈X’k

slide-31
SLIDE 31

Computational Indistinguishability

Two distribution ensembles {Xk} and {X’k} are said to be computationally indistinguishable if ∀ (non-uniform) PPT distinguisher D, ∃ negligible ν(k) such that | Prx←Xk[D(x)=1] - Prx←X’k[D(x)=1] | ≤ ν(k) cf.: Two distribution ensembles {Xk} and {X’k} are said to be statistically indistinguishable if ∀ functions T, ∃ negligible ν(k) s.t. | Prx←Xk[T(x)=1] - Prx←X’k[T(x)=1] | ≤ ν(k) Xk ≈X’k

slide-32
SLIDE 32

Computational Indistinguishability

Two distribution ensembles {Xk} and {X’k} are said to be computationally indistinguishable if ∀ (non-uniform) PPT distinguisher D, ∃ negligible ν(k) such that | Prx←Xk[D(x)=1] - Prx←X’k[D(x)=1] | ≤ ν(k) cf.: Two distribution ensembles {Xk} and {X’k} are said to be statistically indistinguishable if ∀ functions T, ∃ negligible ν(k) s.t. | Prx←Xk[T(x)=1] - Prx←X’k[T(x)=1] | ≤ ν(k) Can rewrite as, ∃ negligible ν(k) s.t. Δ(Xk,X’k) ≤ ν(k) where Δ(Xk,X’k) := max T | Prx←Xk[T(x)=1] - Prx←X’k[T(x)=1] | Xk ≈X’k

slide-33
SLIDE 33

Computational Indistinguishability

Two distribution ensembles {Xk} and {X’k} are said to be computationally indistinguishable if ∀ (non-uniform) PPT distinguisher D, ∃ negligible ν(k) such that | Prx←Xk[D(x)=1] - Prx←X’k[D(x)=1] | ≤ ν(k) cf.: Two distribution ensembles {Xk} and {X’k} are said to be statistically indistinguishable if ∀ functions T, ∃ negligible ν(k) s.t. | Prx←Xk[T(x)=1] - Prx←X’k[T(x)=1] | ≤ ν(k) Can rewrite as, ∃ negligible ν(k) s.t. Δ(Xk,X’k) ≤ ν(k) where Δ(Xk,X’k) := max T | Prx←Xk[T(x)=1] - Prx←X’k[T(x)=1] | If Xk, X’k are short (say a single bit), Xk ≈ X’k iff Xk, X’k are statistically indistinguishable (Exercise) Xk ≈X’k

slide-34
SLIDE 34

Pseudorandomness Generator (PRG)

slide-35
SLIDE 35

Pseudorandomness Generator (PRG)

Takes a short seed and (deterministically) outputs a long string

slide-36
SLIDE 36

Pseudorandomness Generator (PRG)

Takes a short seed and (deterministically) outputs a long string Gk: {0,1}k→{0,1}n(k) where n(k) > k

slide-37
SLIDE 37

Pseudorandomness Generator (PRG)

Takes a short seed and (deterministically) outputs a long string Gk: {0,1}k→{0,1}n(k) where n(k) > k Security definition: Output distribution induced by random input seed should be “pseudorandom”

slide-38
SLIDE 38

Pseudorandomness Generator (PRG)

Takes a short seed and (deterministically) outputs a long string Gk: {0,1}k→{0,1}n(k) where n(k) > k Security definition: Output distribution induced by random input seed should be “pseudorandom” i.e., Computationally indistinguishable from uniformly random

slide-39
SLIDE 39

Pseudorandomness Generator (PRG)

Takes a short seed and (deterministically) outputs a long string Gk: {0,1}k→{0,1}n(k) where n(k) > k Security definition: Output distribution induced by random input seed should be “pseudorandom” i.e., Computationally indistinguishable from uniformly random {Gk(x)}x←{0,1}k ≈ Un(k)

slide-40
SLIDE 40

Pseudorandomness Generator (PRG)

Takes a short seed and (deterministically) outputs a long string Gk: {0,1}k→{0,1}n(k) where n(k) > k Security definition: Output distribution induced by random input seed should be “pseudorandom” i.e., Computationally indistinguishable from uniformly random {Gk(x)}x←{0,1}k ≈ Un(k) Note: {Gk(x)}x←{0,1}k cannot be statistically indistinguishable from Un(k) unless n(k) ≤ k (Exercise)

slide-41
SLIDE 41

Pseudorandomness Generator (PRG)

Takes a short seed and (deterministically) outputs a long string Gk: {0,1}k→{0,1}n(k) where n(k) > k Security definition: Output distribution induced by random input seed should be “pseudorandom” i.e., Computationally indistinguishable from uniformly random {Gk(x)}x←{0,1}k ≈ Un(k) Note: {Gk(x)}x←{0,1}k cannot be statistically indistinguishable from Un(k) unless n(k) ≤ k (Exercise) i.e., no PRG against unbounded adversaries

slide-42
SLIDE 42

PRG from One-Way Permutations

slide-43
SLIDE 43

PRG from One-Way Permutations

G

k k 1

Rk

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1

slide-44
SLIDE 44

PRG from One-Way Permutations

G

k k 1

Rk

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 will build later

slide-45
SLIDE 45

PRG from One-Way Permutations

Increasing the stretch

G

k k 1

Rk

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 will build later

slide-46
SLIDE 46

PRG from One-Way Permutations

Increasing the stretch Can use part of the PRG output as a new seed
 
 


G

k k 1

Rk

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 will build later

slide-47
SLIDE 47

PRG from One-Way Permutations

Increasing the stretch Can use part of the PRG output as a new seed
 
 


G

k k 1

Rk

G G G G ... G

Rk

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 will build later

slide-48
SLIDE 48

PRG from One-Way Permutations

Increasing the stretch Can use part of the PRG output as a new seed
 
 
 If the intermediate seeds are never output, can keep stretching on demand (for any “polynomial length”)

G

k k 1

Rk

G G G G ... G

Rk

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 will build later

slide-49
SLIDE 49

PRG from One-Way Permutations

Increasing the stretch Can use part of the PRG output as a new seed
 
 
 If the intermediate seeds are never output, can keep stretching on demand (for any “polynomial length”) A stream cipher

G

k k 1

Rk

G G G G ... G

Rk

SC

K One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 will build later

slide-50
SLIDE 50

One-time CPA-secure SKE with a Stream-Cipher

slide-51
SLIDE 51

One-time CPA-secure SKE with a Stream-Cipher

One-time Encryption with a stream-cipher:

slide-52
SLIDE 52

One-time CPA-secure SKE with a Stream-Cipher

One-time Encryption with a stream-cipher: Generate a one-time pad from a short seed

slide-53
SLIDE 53

One-time CPA-secure SKE with a Stream-Cipher

One-time Encryption with a stream-cipher: Generate a one-time pad from a short seed Can share just the seed as the key

slide-54
SLIDE 54

One-time CPA-secure SKE with a Stream-Cipher

One-time Encryption with a stream-cipher: Generate a one-time pad from a short seed Can share just the seed as the key Mask message with the pseudorandom pad

slide-55
SLIDE 55

One-time CPA-secure SKE with a Stream-Cipher

One-time Encryption with a stream-cipher: Generate a one-time pad from a short seed Can share just the seed as the key Mask message with the pseudorandom pad

SC ⊕

K

m

Enc

slide-56
SLIDE 56

One-time CPA-secure SKE with a Stream-Cipher

One-time Encryption with a stream-cipher: Generate a one-time pad from a short seed Can share just the seed as the key Mask message with the pseudorandom pad Decryption is symmetric: plaintext & ciphertext interchanged

SC ⊕

K

m

Enc

slide-57
SLIDE 57

One-time CPA-secure SKE with a Stream-Cipher

One-time Encryption with a stream-cipher: Generate a one-time pad from a short seed Can share just the seed as the key Mask message with the pseudorandom pad Decryption is symmetric: plaintext & ciphertext interchanged SC can spit out bits on demand, so the message can arrive bit by bit, and the length of the message doesn’ t have to be a priori fixed

SC ⊕

K

m

Enc

slide-58
SLIDE 58

One-time CPA-secure SKE with a Stream-Cipher

One-time Encryption with a stream-cipher: Generate a one-time pad from a short seed Can share just the seed as the key Mask message with the pseudorandom pad Decryption is symmetric: plaintext & ciphertext interchanged SC can spit out bits on demand, so the message can arrive bit by bit, and the length of the message doesn’ t have to be a priori fixed Security: indistinguishability from using a truly random pad

SC ⊕

K

m

Enc

slide-59
SLIDE 59

One-time CPA-secure SKE with a Stream-Cipher

One-time Encryption with a stream-cipher: Generate a one-time pad from a short seed Can share just the seed as the key Mask message with the pseudorandom pad Decryption is symmetric: plaintext & ciphertext interchanged SC can spit out bits on demand, so the message can arrive bit by bit, and the length of the message doesn’ t have to be a priori fixed Security: indistinguishability from using a truly random pad

SC ⊕

K

m

Enc

(stream)

slide-60
SLIDE 60

One-time CPA-secure SKE with a Stream-Cipher

SC ⊕

K

m

Enc

(stream)

slide-61
SLIDE 61

One-time CPA-secure SKE with a Stream-Cipher

In IDEAL experiment, consider simulator that
 uses a truly random string as the ciphertext

SC ⊕

K

m

Enc

(stream)

slide-62
SLIDE 62

One-time CPA-secure SKE with a Stream-Cipher

In IDEAL experiment, consider simulator that
 uses a truly random string as the ciphertext To show REAL ≈ IDEAL

SC ⊕

K

m

Enc

(stream)

slide-63
SLIDE 63

One-time CPA-secure SKE with a Stream-Cipher

In IDEAL experiment, consider simulator that
 uses a truly random string as the ciphertext To show REAL ≈ IDEAL Consider an intermediate world, HYBRID:

SC ⊕

K

m

Enc

(stream)

slide-64
SLIDE 64

One-time CPA-secure SKE with a Stream-Cipher

In IDEAL experiment, consider simulator that
 uses a truly random string as the ciphertext To show REAL ≈ IDEAL Consider an intermediate world, HYBRID: Like REAL, but Enc/Dec use a (long) truly random pad, 
 instead of the output from the stream-cipher

SC ⊕

K

m

Enc

(stream)

slide-65
SLIDE 65

One-time CPA-secure SKE with a Stream-Cipher

In IDEAL experiment, consider simulator that
 uses a truly random string as the ciphertext To show REAL ≈ IDEAL Consider an intermediate world, HYBRID: Like REAL, but Enc/Dec use a (long) truly random pad, 
 instead of the output from the stream-cipher HYBRID = IDEAL (recall perfect security of one-time pad)

SC ⊕

K

m

Enc

(stream)

slide-66
SLIDE 66

One-time CPA-secure SKE with a Stream-Cipher

In IDEAL experiment, consider simulator that
 uses a truly random string as the ciphertext To show REAL ≈ IDEAL Consider an intermediate world, HYBRID: Like REAL, but Enc/Dec use a (long) truly random pad, 
 instead of the output from the stream-cipher HYBRID = IDEAL (recall perfect security of one-time pad) Claim: REAL ≈ HYBRID

SC ⊕

K

m

Enc

(stream)

slide-67
SLIDE 67

One-time CPA-secure SKE with a Stream-Cipher

In IDEAL experiment, consider simulator that
 uses a truly random string as the ciphertext To show REAL ≈ IDEAL Consider an intermediate world, HYBRID: Like REAL, but Enc/Dec use a (long) truly random pad, 
 instead of the output from the stream-cipher HYBRID = IDEAL (recall perfect security of one-time pad) Claim: REAL ≈ HYBRID Consider the experiments as a system that accepts the pad from outside (R’ = SC(K) for a random K, or truly random R) and outputs the environment’ s output. This system is PPT, and so can’ t distinguish pseudorandom from random.

SC ⊕

K

m

Enc

(stream)