Symmetric-Key Encryption: constructions Lecture 5 PRG from One-Way - - PowerPoint PPT Presentation

symmetric key encryption constructions
SMART_READER_LITE
LIVE PREVIEW

Symmetric-Key Encryption: constructions Lecture 5 PRG from One-Way - - PowerPoint PPT Presentation

Symmetric-Key Encryption: constructions Lecture 5 PRG from One-Way Permutations PRF , Block Cipher RECALL PRG One-bit stretch PRG, G k : {0,1} k {0,1} k+1 k k G R k 1 Increasing the stretch Can use part of the PRG output as a new


slide-1
SLIDE 1

Symmetric-Key Encryption: constructions

Lecture 5 PRG from One-Way Permutations
 PRF , Block Cipher

slide-2
SLIDE 2

PRG

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 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 RECALL

slide-3
SLIDE 3

PRG

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 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 RECALL coming up

slide-4
SLIDE 4

One-Way Function, Hardcore Predicate

slide-5
SLIDE 5

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if

slide-6
SLIDE 6

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable

slide-7
SLIDE 7

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible
slide-8
SLIDE 8

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible

x←{0,1}k f(x)

slide-9
SLIDE 9

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible

x←{0,1}k f(x’)=f(x)? f(x) x’ Yes/No

slide-10
SLIDE 10

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible

But x may not be completely hidden by f(x)

x←{0,1}k f(x’)=f(x)? f(x) x’ Yes/No

slide-11
SLIDE 11

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible

But x may not be completely hidden by f(x) B is a hardcore predicate of a OWF f if

x←{0,1}k f(x’)=f(x)? f(x) x’ Yes/No

slide-12
SLIDE 12

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible

But x may not be completely hidden by f(x) B is a hardcore predicate of a OWF f if B is polynomial time computable

x←{0,1}k f(x’)=f(x)? f(x) x’ Yes/No

slide-13
SLIDE 13

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible

But x may not be completely hidden by f(x) B is a hardcore predicate of a OWF f if B is polynomial time computable For all (non-uniform) PPT adversary, advantage

  • ver random prediction in the Hardcore-

predicate experiment is negligible

x←{0,1}k f(x’)=f(x)? f(x) x’ Yes/No

slide-14
SLIDE 14

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible

But x may not be completely hidden by f(x) B is a hardcore predicate of a OWF f if B is polynomial time computable For all (non-uniform) PPT adversary, advantage

  • ver random prediction in the Hardcore-

predicate experiment is negligible

x←{0,1}k f(x’)=f(x)? f(x) x’ Yes/No x←{0,1}k f(x)

slide-15
SLIDE 15

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible

But x may not be completely hidden by f(x) B is a hardcore predicate of a OWF f if B is polynomial time computable For all (non-uniform) PPT adversary, advantage

  • ver random prediction in the Hardcore-

predicate experiment is negligible

x←{0,1}k f(x’)=f(x)? f(x) x’ Yes/No x←{0,1}k b’ = B(x)? f(x) b’ Yes/No

slide-16
SLIDE 16

One-Way Function, Hardcore Predicate

fk: {0,1}k → {0,1}n(k) is a one-way function (OWF) if f is polynomial time computable For all (non-uniform) PPT adversary, probability

  • f success in the “OWF experiment” is negligible

But x may not be completely hidden by f(x) B is a hardcore predicate of a OWF f if B is polynomial time computable For all (non-uniform) PPT adversary, advantage

  • ver random prediction in the Hardcore-

predicate experiment is negligible B(x) remains “completely” hidden, given f(x)

x←{0,1}k f(x’)=f(x)? f(x) x’ Yes/No x←{0,1}k b’ = B(x)? f(x) b’ Yes/No

slide-17
SLIDE 17

One-Way Function Candidates

slide-18
SLIDE 18

One-Way Function Candidates

Integer factorization:

slide-19
SLIDE 19

One-Way Function Candidates

Integer factorization: fmult(x,y) = x⋅y

slide-20
SLIDE 20

One-Way Function Candidates

Integer factorization: fmult(x,y) = x⋅y Input distribution: (x,y) random k-bit primes

slide-21
SLIDE 21

One-Way Function Candidates

Integer factorization: fmult(x,y) = x⋅y Input distribution: (x,y) random k-bit primes Fact: taking input domain to be the set of all k-bit integers, with input distribution being uniform over it, will also work (if k-bit primes distribution works)

slide-22
SLIDE 22

One-Way Function Candidates

Integer factorization: fmult(x,y) = x⋅y Input distribution: (x,y) random k-bit primes Fact: taking input domain to be the set of all k-bit integers, with input distribution being uniform over it, will also work (if k-bit primes distribution works) Important that we require |x|=|y|=k, not just |x⋅y|=2k (otherwise, 2 is a valid factor of x.y with 3/ 4 probability)

slide-23
SLIDE 23

One-Way Function Candidates

slide-24
SLIDE 24

One-Way Function Candidates

Solving Subset Sum:

slide-25
SLIDE 25

One-Way Function Candidates

Solving Subset Sum: fsubsum(x1...xk, S) = (x1...xk, Σi∈S xi )

slide-26
SLIDE 26

One-Way Function Candidates

Solving Subset Sum: fsubsum(x1...xk, S) = (x1...xk, Σi∈S xi ) Input distribution: xi k-bit integers, S⊆{1...k}. Uniform

slide-27
SLIDE 27

One-Way Function Candidates

Solving Subset Sum: fsubsum(x1...xk, S) = (x1...xk, Σi∈S xi ) Input distribution: xi k-bit integers, S⊆{1...k}. Uniform Inverting fsubsum known to be NP-complete, but assuming that it is a OWF is “stronger” than assuming P≠NP

slide-28
SLIDE 28

One-Way Function Candidates

Solving Subset Sum: fsubsum(x1...xk, S) = (x1...xk, Σi∈S xi ) Input distribution: xi k-bit integers, S⊆{1...k}. Uniform Inverting fsubsum known to be NP-complete, but assuming that it is a OWF is “stronger” than assuming P≠NP Note: (x1,…,xk) is “public” (given as part of the output to be inverted)

slide-29
SLIDE 29

One-Way Function Candidates

Solving Subset Sum: fsubsum(x1...xk, S) = (x1...xk, Σi∈S xi ) Input distribution: xi k-bit integers, S⊆{1...k}. Uniform Inverting fsubsum known to be NP-complete, but assuming that it is a OWF is “stronger” than assuming P≠NP Note: (x1,…,xk) is “public” (given as part of the output to be inverted) OWF Collection: A collection of subset sum problems, all with the same (x1,…,xk) (and independent S)

slide-30
SLIDE 30

One-Way Function Candidates

slide-31
SLIDE 31

Rabin OWF: fRabin(x; n) = (x2 mod n, n), where n = pq, and p, q are random k-bit primes, and x is uniform from {0...n}

One-Way Function Candidates

slide-32
SLIDE 32

Rabin OWF: fRabin(x; n) = (x2 mod n, n), where n = pq, and p, q are random k-bit primes, and x is uniform from {0...n} This OWF can be used as a OWF collection indexed by n
 (many functions for the same k, using different n)

One-Way Function Candidates

slide-33
SLIDE 33

Rabin OWF: fRabin(x; n) = (x2 mod n, n), where n = pq, and p, q are random k-bit primes, and x is uniform from {0...n} This OWF can be used as a OWF collection indexed by n
 (many functions for the same k, using different n) More: e.g, Discrete Logarithm (uses as index: a group & generator), RSA function (uses as index: n=pq & an exponent e).

One-Way Function Candidates

slide-34
SLIDE 34

Rabin OWF: fRabin(x; n) = (x2 mod n, n), where n = pq, and p, q are random k-bit primes, and x is uniform from {0...n} This OWF can be used as a OWF collection indexed by n
 (many functions for the same k, using different n) More: e.g, Discrete Logarithm (uses as index: a group & generator), RSA function (uses as index: n=pq & an exponent e). Later

One-Way Function Candidates

slide-35
SLIDE 35

Hardcore Predicates

slide-36
SLIDE 36

Hardcore Predicates

For candidate OWFs, often hardcore predicates known

slide-37
SLIDE 37

Hardcore Predicates

For candidate OWFs, often hardcore predicates known e.g. if fRabin(x;n) is a OWF , then LSB(x) is a hardcore predicate for it

slide-38
SLIDE 38

Hardcore Predicates

For candidate OWFs, often hardcore predicates known e.g. if fRabin(x;n) is a OWF , then LSB(x) is a hardcore predicate for it Reduction: Given an algorithm for finding LSB(x) from fRabin(x;n) for random x, one can use it to invert fRabin

slide-39
SLIDE 39

Goldreich-Levin Predicate

slide-40
SLIDE 40

Goldreich-Levin Predicate

Given any OWF f, can slightly modify it to get a OWF gf such that

slide-41
SLIDE 41

Goldreich-Levin Predicate

Given any OWF f, can slightly modify it to get a OWF gf such that gf has a simple hardcore predicate

slide-42
SLIDE 42

Goldreich-Levin Predicate

Given any OWF f, can slightly modify it to get a OWF gf such that gf has a simple hardcore predicate gf is almost as efficient as f; is a permutation if f is one

slide-43
SLIDE 43

Goldreich-Levin Predicate

Given any OWF f, can slightly modify it to get a OWF gf such that gf has a simple hardcore predicate gf is almost as efficient as f; is a permutation if f is one gf(x,r) = (f(x), r), where |r|=|x|

slide-44
SLIDE 44

Goldreich-Levin Predicate

Given any OWF f, can slightly modify it to get a OWF gf such that gf has a simple hardcore predicate gf is almost as efficient as f; is a permutation if f is one gf(x,r) = (f(x), r), where |r|=|x| Input distribution: x as for f, and r independently random

slide-45
SLIDE 45

Goldreich-Levin Predicate

Given any OWF f, can slightly modify it to get a OWF gf such that gf has a simple hardcore predicate gf is almost as efficient as f; is a permutation if f is one gf(x,r) = (f(x), r), where |r|=|x| Input distribution: x as for f, and r independently random GL-predicate: B(x,r) = <x,r> (dot product of bit vectors)

slide-46
SLIDE 46

Goldreich-Levin Predicate

Given any OWF f, can slightly modify it to get a OWF gf such that gf has a simple hardcore predicate gf is almost as efficient as f; is a permutation if f is one gf(x,r) = (f(x), r), where |r|=|x| Input distribution: x as for f, and r independently random GL-predicate: B(x,r) = <x,r> (dot product of bit vectors) Can show that a predictor of B(x,r) with non-negligible advantage can be turned into an inversion algorithm for f

slide-47
SLIDE 47

Goldreich-Levin Predicate

Given any OWF f, can slightly modify it to get a OWF gf such that gf has a simple hardcore predicate gf is almost as efficient as f; is a permutation if f is one gf(x,r) = (f(x), r), where |r|=|x| Input distribution: x as for f, and r independently random GL-predicate: B(x,r) = <x,r> (dot product of bit vectors) Can show that a predictor of B(x,r) with non-negligible advantage can be turned into an inversion algorithm for f

Predictor for B(x,r) is a “noisy channel” through which x, encoded as (<x,0>,<x,1>...<x,2|x|-1>) (Walsh-Hadamard code), is transmitted. Can recover x by error-correction (local list decoding)

slide-48
SLIDE 48

PRG from One-Way Permutations

slide-49
SLIDE 49

PRG from One-Way Permutations

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

slide-50
SLIDE 50

PRG from One-Way Permutations

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

G

k k 1

Rk

slide-51
SLIDE 51

PRG from One-Way Permutations

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 G(x) = f(x)◦B(x)

G

k k 1

Rk

slide-52
SLIDE 52

PRG from One-Way Permutations

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 G(x) = f(x)◦B(x) Where f: {0,1}k → {0,1}k is a one-way permutation, and B a hardcore predicate for f

G

k k 1

Rk

slide-53
SLIDE 53

PRG from One-Way Permutations

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 G(x) = f(x)◦B(x) Where f: {0,1}k → {0,1}k is a one-way permutation, and B a hardcore predicate for f

G

k k 1

Rk

bijection

slide-54
SLIDE 54

PRG from One-Way Permutations

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 G(x) = f(x)◦B(x) Where f: {0,1}k → {0,1}k is a one-way permutation, and B a hardcore predicate for f Claim: G is a PRG

G

k k 1

Rk

bijection

slide-55
SLIDE 55

PRG from One-Way Permutations

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 G(x) = f(x)◦B(x) Where f: {0,1}k → {0,1}k is a one-way permutation, and B a hardcore predicate for f Claim: G is a PRG For a random x, f(x) is also random, and hence all of f(x) is next-bit unpredictable. B is a hardcore predicate, so B(x) remains unpredictable after seeing f(x)

G

k k 1

Rk

bijection

slide-56
SLIDE 56

PRG from One-Way Permutations

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 G(x) = f(x)◦B(x) Where f: {0,1}k → {0,1}k is a one-way permutation, and B a hardcore predicate for f Claim: G is a PRG For a random x, f(x) is also random, and hence all of f(x) is next-bit unpredictable. B is a hardcore predicate, so B(x) remains unpredictable after seeing f(x) Important: holds only when the seed x is kept hidden, and is random

G

k k 1

Rk

bijection

slide-57
SLIDE 57

PRG from One-Way Permutations

One-bit stretch PRG, Gk: {0,1}k → {0,1}k+1 G(x) = f(x)◦B(x) Where f: {0,1}k → {0,1}k is a one-way permutation, and B a hardcore predicate for f Claim: G is a PRG For a random x, f(x) is also random, and hence all of f(x) is next-bit unpredictable. B is a hardcore predicate, so B(x) remains unpredictable after seeing f(x) Important: holds only when the seed x is kept hidden, and is random ... or pseudorandom

G

k k 1

Rk

bijection

slide-58
SLIDE 58

PRG from One-Way Permutations

G

k k 1

Rk

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

slide-59
SLIDE 59

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

slide-60
SLIDE 60

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

slide-61
SLIDE 61

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

slide-62
SLIDE 62

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

slide-63
SLIDE 63

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

slide-64
SLIDE 64

PRG Summary

slide-65
SLIDE 65

PRG Summary

OWF , OWP, Hardcore predicates

slide-66
SLIDE 66

PRG Summary

OWF , OWP, Hardcore predicates Output of a PRG on a random (hidden) seed is computationally indistinguishable from random

slide-67
SLIDE 67

PRG Summary

OWF , OWP, Hardcore predicates Output of a PRG on a random (hidden) seed is computationally indistinguishable from random A PRG can be constructed from a OWP and a hardcore predicate.

slide-68
SLIDE 68

PRG Summary

OWF , OWP, Hardcore predicates Output of a PRG on a random (hidden) seed is computationally indistinguishable from random A PRG can be constructed from a OWP and a hardcore predicate. Possible from OWF too, but more complicated. (And, many candidate OWFs are in fact permutations.)

slide-69
SLIDE 69

PRG Summary

OWF , OWP, Hardcore predicates Output of a PRG on a random (hidden) seed is computationally indistinguishable from random A PRG can be constructed from a OWP and a hardcore predicate. Possible from OWF too, but more complicated. (And, many candidate OWFs are in fact permutations.) Useful in SKE: Can use PRG to stretch a short key to a long (one-time) pad. Or use as a Stream Cipher.

slide-70
SLIDE 70

PRG Summary

OWF , OWP, Hardcore predicates Output of a PRG on a random (hidden) seed is computationally indistinguishable from random A PRG can be constructed from a OWP and a hardcore predicate. Possible from OWF too, but more complicated. (And, many candidate OWFs are in fact permutations.) Useful in SKE: Can use PRG to stretch a short key to a long (one-time) pad. Or use as a Stream Cipher. Next: Constructing a proper (multi-message) SKE scheme

slide-71
SLIDE 71

Beyond One-Time

slide-72
SLIDE 72

Beyond One-Time

Need to make sure same part of the one-time pad is never reused

slide-73
SLIDE 73

Beyond One-Time

Need to make sure same part of the one-time pad is never reused Sender and receiver will need to maintain state and stay in sync (indicating how much of the pad has already been used)

slide-74
SLIDE 74

Beyond One-Time

Need to make sure same part of the one-time pad is never reused Sender and receiver will need to maintain state and stay in sync (indicating how much of the pad has already been used) Or only sender maintains the index, but sends it to the

  • receiver. Then receiver will need to run the stream-

cipher to get to that index.

slide-75
SLIDE 75

Beyond One-Time

Need to make sure same part of the one-time pad is never reused Sender and receiver will need to maintain state and stay in sync (indicating how much of the pad has already been used) Or only sender maintains the index, but sends it to the

  • receiver. Then receiver will need to run the stream-

cipher to get to that index. A PRG with direct access to any part of the output stream?

slide-76
SLIDE 76

Beyond One-Time

Need to make sure same part of the one-time pad is never reused Sender and receiver will need to maintain state and stay in sync (indicating how much of the pad has already been used) Or only sender maintains the index, but sends it to the

  • receiver. Then receiver will need to run the stream-

cipher to get to that index. A PRG with direct access to any part of the output stream? Pseudo Random Function (PRF)

slide-77
SLIDE 77

Pseudorandom Function (PRF)

slide-78
SLIDE 78

Pseudorandom Function (PRF)

A compact representation of an exponentially long (pseudorandom) string

slide-79
SLIDE 79

Pseudorandom Function (PRF)

A compact representation of an exponentially long (pseudorandom) string Allows “random-access” (instead of just sequential access)

slide-80
SLIDE 80

Pseudorandom Function (PRF)

A compact representation of an exponentially long (pseudorandom) string Allows “random-access” (instead of just sequential access) A function F(s;i) outputs the ith block of the pseudorandom string corresponding to seed s

slide-81
SLIDE 81

Pseudorandom Function (PRF)

A compact representation of an exponentially long (pseudorandom) string Allows “random-access” (instead of just sequential access) A function F(s;i) outputs the ith block of the pseudorandom string corresponding to seed s Exponentially many blocks (i.e., large domain for i)

slide-82
SLIDE 82

Pseudorandom Function (PRF)

A compact representation of an exponentially long (pseudorandom) string Allows “random-access” (instead of just sequential access) A function F(s;i) outputs the ith block of the pseudorandom string corresponding to seed s Exponentially many blocks (i.e., large domain for i) Pseudorandom Function

slide-83
SLIDE 83

Pseudorandom Function (PRF)

A compact representation of an exponentially long (pseudorandom) string Allows “random-access” (instead of just sequential access) A function F(s;i) outputs the ith block of the pseudorandom string corresponding to seed s Exponentially many blocks (i.e., large domain for i) Pseudorandom Function Need to define pseudorandomness for a function (not a string)

slide-84
SLIDE 84

Pseudorandom Function (PRF)

slide-85
SLIDE 85

Pseudorandom Function (PRF)

F: {0,1}k×{0,1}m(k) →{0,1}n(k) is a PRF if all PPT adversaries have negligible advantage in the PRF experiment

slide-86
SLIDE 86

Fs R

MUX

Pseudorandom Function (PRF)

F: {0,1}k×{0,1}m(k) →{0,1}n(k) is a PRF if all PPT adversaries have negligible advantage in the PRF experiment Adversary given oracle access to either F with a random seed, or a random function R: {0,1}m(k) →{0,1}n(k). Needs to guess which.

slide-87
SLIDE 87

Fs R

MUX

Pseudorandom Function (PRF)

F: {0,1}k×{0,1}m(k) →{0,1}n(k) is a PRF if all PPT adversaries have negligible advantage in the PRF experiment Adversary given oracle access to either F with a random seed, or a random function R: {0,1}m(k) →{0,1}n(k). Needs to guess which.

b b←{0,1}

slide-88
SLIDE 88

Fs R

MUX

Pseudorandom Function (PRF)

F: {0,1}k×{0,1}m(k) →{0,1}n(k) is a PRF if all PPT adversaries have negligible advantage in the PRF experiment Adversary given oracle access to either F with a random seed, or a random function R: {0,1}m(k) →{0,1}n(k). Needs to guess which.

b’ Yes/No b b←{0,1} b’=b?

slide-89
SLIDE 89

Fs R

MUX

Pseudorandom Function (PRF)

F: {0,1}k×{0,1}m(k) →{0,1}n(k) is a PRF if all PPT adversaries have negligible advantage in the PRF experiment Adversary given oracle access to either F with a random seed, or a random function R: {0,1}m(k) →{0,1}n(k). Needs to guess which. Note: Only 2k seeds for F

b’ Yes/No b b←{0,1} b’=b?

slide-90
SLIDE 90

Fs R

MUX

Pseudorandom Function (PRF)

F: {0,1}k×{0,1}m(k) →{0,1}n(k) is a PRF if all PPT adversaries have negligible advantage in the PRF experiment Adversary given oracle access to either F with a random seed, or a random function R: {0,1}m(k) →{0,1}n(k). Needs to guess which. Note: Only 2k seeds for F But 2^(n2m) functions R

b’ Yes/No b b←{0,1} b’=b?

slide-91
SLIDE 91

Fs R

MUX

Pseudorandom Function (PRF)

F: {0,1}k×{0,1}m(k) →{0,1}n(k) is a PRF if all PPT adversaries have negligible advantage in the PRF experiment Adversary given oracle access to either F with a random seed, or a random function R: {0,1}m(k) →{0,1}n(k). Needs to guess which. Note: Only 2k seeds for F But 2^(n2m) functions R PRF stretches k bits to n2m bits

b’ Yes/No b b←{0,1} b’=b?

slide-92
SLIDE 92

Pseudorandom Function (PRF)

slide-93
SLIDE 93

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

slide-94
SLIDE 94

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

G

K K0 K1

slide-95
SLIDE 95

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

G

K K0 K1

G is a length- doubling PRG

slide-96
SLIDE 96

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

G G G

K K0 K1

G is a length- doubling PRG

slide-97
SLIDE 97

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

K00 K01 K10 K11

G G G

K K0 K1

G is a length- doubling PRG

slide-98
SLIDE 98

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

K00 K01 K10 K11

G G G

K000 K001

G

K010 K011

G

K100 K101

G

K110 K111

G

K K0 K1

G is a length- doubling PRG

slide-99
SLIDE 99

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

K00 K01 K10 K11

G G G

K000 K001

G

K010 K011

G

K100 K101

G

K110 K111

... G

K K0 K1

G is a length- doubling PRG

slide-100
SLIDE 100

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

K00 K01 K10 K11

G G G

K000 K001

G

K010 K011

G

K100 K101

G

K110 K111

... G

K K0 K1

G is a length- doubling PRG

slide-101
SLIDE 101

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

K00 K01 K10 K11

G G G

K000 K001

G

K010 K011

G

K100 K101

G

K110 K111

r

... G

K K0 K1

G is a length- doubling PRG

slide-102
SLIDE 102

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

K00 K01 K10 K11

G G G

K000 K001

G

K010 K011

G

K100 K101

G

K110 K111

r

... G

K K0 K1

G is a length- doubling PRG

slide-103
SLIDE 103

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

K00 K01 K10 K11

G G G

K000 K001

G

K010 K011

G

K100 K101

G

K110 K111

r Kr

... G

K K0 K1

G is a length- doubling PRG

slide-104
SLIDE 104

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

slide-105
SLIDE 105

Pseudorandom Function (PRF)

Not blazing fast A PRF can be constructed from any PRG

slide-106
SLIDE 106

Pseudorandom Function (PRF)

Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions A PRF can be constructed from any PRG

slide-107
SLIDE 107

Pseudorandom Function (PRF)

Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions A PRF can be constructed from any PRG

slide-108
SLIDE 108

Pseudorandom Function (PRF)

Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher A PRF can be constructed from any PRG

slide-109
SLIDE 109

Pseudorandom Function (PRF)

Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher

BC

K r A PRF can be constructed from any PRG

slide-110
SLIDE 110

Pseudorandom Function (PRF)

Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher Extra features/requirements:

BC

K r A PRF can be constructed from any PRG

slide-111
SLIDE 111

Pseudorandom Function (PRF)

Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher Extra features/requirements: Permutation: input block (r) to output block

BC

K r A PRF can be constructed from any PRG

slide-112
SLIDE 112

Pseudorandom Function (PRF)

Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher Extra features/requirements: Permutation: input block (r) to output block Key can be used as an inversion trapdoor

BC

K r A PRF can be constructed from any PRG

slide-113
SLIDE 113

Pseudorandom Function (PRF)

Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher Extra features/requirements: Permutation: input block (r) to output block Key can be used as an inversion trapdoor Pseudorandomness even with access to inversion

BC

K r A PRF can be constructed from any PRG

slide-114
SLIDE 114

CPA-secure SKE with a Block Cipher

slide-115
SLIDE 115

CPA-secure SKE with a Block Cipher

Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC

slide-116
SLIDE 116

CPA-secure SKE with a Block Cipher

Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC For each encryption, Alice will pick a fresh pseudorandom pad, by picking a fresh value r and setting pad=BCK(r)

slide-117
SLIDE 117

CPA-secure SKE with a Block Cipher

Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC For each encryption, Alice will pick a fresh pseudorandom pad, by picking a fresh value r and setting pad=BCK(r)

BC ⊕

K

m (block)

Enc r

slide-118
SLIDE 118

CPA-secure SKE with a Block Cipher

Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC For each encryption, Alice will pick a fresh pseudorandom pad, by picking a fresh value r and setting pad=BCK(r) Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob

BC ⊕

K

m (block)

Enc r

slide-119
SLIDE 119

CPA-secure SKE with a Block Cipher

Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC For each encryption, Alice will pick a fresh pseudorandom pad, by picking a fresh value r and setting pad=BCK(r) Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob

BC ⊕

K

m (block)

Enc r

slide-120
SLIDE 120

CPA-secure SKE with a Block Cipher

Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC For each encryption, Alice will pick a fresh pseudorandom pad, by picking a fresh value r and setting pad=BCK(r) Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob

BC ⊕

K

m (block)

Enc r

BC ⊕

K Dec

m

slide-121
SLIDE 121

CPA-secure SKE with a Block Cipher

Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC For each encryption, Alice will pick a fresh pseudorandom pad, by picking a fresh value r and setting pad=BCK(r) Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob Even if Eve sees r, PRF security guarantees that BCK(r) is pseudorandom. (In fact, Eve could have picked r, as long as we ensure no r is reused.)

BC ⊕

K

m (block)

Enc r

BC ⊕

K Dec

m

slide-122
SLIDE 122

CPA-secure SKE with a Block Cipher

Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC For each encryption, Alice will pick a fresh pseudorandom pad, by picking a fresh value r and setting pad=BCK(r) Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob Even if Eve sees r, PRF security guarantees that BCK(r) is pseudorandom. (In fact, Eve could have picked r, as long as we ensure no r is reused.) How to pick a fresh r?

BC ⊕

K

m (block)

Enc r

BC ⊕

K Dec

m

slide-123
SLIDE 123

CPA-secure SKE with a Block Cipher

Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC For each encryption, Alice will pick a fresh pseudorandom pad, by picking a fresh value r and setting pad=BCK(r) Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob Even if Eve sees r, PRF security guarantees that BCK(r) is pseudorandom. (In fact, Eve could have picked r, as long as we ensure no r is reused.) How to pick a fresh r? Pick at random!

BC ⊕

K

m (block)

Enc r

BC ⊕

K Dec

m

slide-124
SLIDE 124

CPA-secure SKE with a Block Cipher

slide-125
SLIDE 125

How to encrypt a long message (multiple blocks)?

CPA-secure SKE with a Block Cipher

slide-126
SLIDE 126

How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long)

CPA-secure SKE with a Block Cipher

slide-127
SLIDE 127

How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length)

CPA-secure SKE with a Block Cipher

slide-128
SLIDE 128

How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length)

CPA-secure SKE with a Block Cipher

FK FK FK

r

...

r

slide-129
SLIDE 129

How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length)

CPA-secure SKE with a Block Cipher

FK FK FK

r

...

r sequential

slide-130
SLIDE 130

How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length)

CPA-secure SKE with a Block Cipher

FK

r,1

FK FK

r,2 r,t

...

r

FK FK FK

r

...

r sequential

slide-131
SLIDE 131

How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length)

CPA-secure SKE with a Block Cipher

FK

r,1

FK FK

r,2 r,t

...

r

FK FK FK

r

...

r input length slightly decreased, based on an a priori limit on t sequential

slide-132
SLIDE 132

How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length)

CPA-secure SKE with a Block Cipher

FK

r,1

FK FK

r,2 r,t

...

r

Output is indistinguishable from t random blocks (even if input to FK known/chosen) FK FK FK

r

...

r input length slightly decreased, based on an a priori limit on t sequential

slide-133
SLIDE 133

CPA-secure SKE with a Block Cipher

slide-134
SLIDE 134

Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead.

CPA-secure SKE with a Block Cipher

slide-135
SLIDE 135

Output Feedback (OFB) mode: Extend the pseudorandom output using the first construction in the previous slide Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead.

CPA-secure SKE with a Block Cipher

slide-136
SLIDE 136

r

Output Feedback (OFB) mode: Extend the pseudorandom output using the first construction in the previous slide Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead.

CPA-secure SKE with a Block Cipher

slide-137
SLIDE 137

m1 ⊕ m2 ⊕ mt ⊕ c1 c2 ct r

Output Feedback (OFB) mode: Extend the pseudorandom output using the first construction in the previous slide Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead.

CPA-secure SKE with a Block Cipher

slide-138
SLIDE 138

m1 ⊕ m2 ⊕ mt ⊕ c1 c2 ct r

Output Feedback (OFB) mode: Extend the pseudorandom output using the first construction in the previous slide Counter (CTR) Mode: Similar idea as in the second construction. No a priori limit on number of blocks in a message. Security from low likelihood of (r+1,...,r+t) running into (r’+1,...,r’+t’) FK

r+1

FK FK

r+2 r+t

...

Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead.

CPA-secure SKE with a Block Cipher

slide-139
SLIDE 139

m1 ⊕ m2 ⊕ mt ⊕ c1 c2 ct r

Output Feedback (OFB) mode: Extend the pseudorandom output using the first construction in the previous slide Counter (CTR) Mode: Similar idea as in the second construction. No a priori limit on number of blocks in a message. Security from low likelihood of (r+1,...,r+t) running into (r’+1,...,r’+t’) FK

r+1

FK FK

r+2 r+t

...

Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead.

CPA-secure SKE with a Block Cipher

Not a PRF (Why?)

slide-140
SLIDE 140

m1 ⊕ m2 ⊕ mt ⊕ c1 c2 ct r

Output Feedback (OFB) mode: Extend the pseudorandom output using the first construction in the previous slide Counter (CTR) Mode: Similar idea as in the second construction. No a priori limit on number of blocks in a message. Security from low likelihood of (r+1,...,r+t) running into (r’+1,...,r’+t’) Cipher Block Chaining (CBC) mode: Sequential encryption. Decryption uses FK-1. Ciphertext an integral number of blocks.

m1 m2 mt r

FK FK FK ⊕ ⊕ ⊕

c1 c2 ct

...

FK

r+1

FK FK

r+2 r+t

...

Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead.

CPA-secure SKE with a Block Cipher

Not a PRF (Why?)