Symmetric-Key Encryption: constructions Lecture 5 PRF , Block - - PowerPoint PPT Presentation

symmetric key encryption constructions
SMART_READER_LITE
LIVE PREVIEW

Symmetric-Key Encryption: constructions Lecture 5 PRF , Block - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Symmetric-Key Encryption: constructions

Lecture 5 PRF , Block Cipher

slide-2
SLIDE 2

PRG from One-Way Permutations

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

R

G G G G ... G

R

SC

K RECALL

slide-3
SLIDE 3

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)

RECALL

slide-4
SLIDE 4

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

SC ⊕

K

m

Enc

(stream)

RECALL

slide-5
SLIDE 5

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)

RECALL

slide-6
SLIDE 6

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)

RECALL

slide-7
SLIDE 7

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)

RECALL

slide-8
SLIDE 8

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)

RECALL

slide-9
SLIDE 9

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)

RECALL

slide-10
SLIDE 10

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)

RECALL

slide-11
SLIDE 11

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)

RECALL

slide-12
SLIDE 12

Beyond One-Time?

slide-13
SLIDE 13

Beyond One-Time?

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

slide-14
SLIDE 14

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-15
SLIDE 15

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-16
SLIDE 16

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-17
SLIDE 17

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-18
SLIDE 18

Pseudorandom Function (PRF)

slide-19
SLIDE 19

Pseudorandom Function (PRF)

A compact representation of an exponentially long (pseudorandom) string

slide-20
SLIDE 20

Pseudorandom Function (PRF)

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

slide-21
SLIDE 21

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-22
SLIDE 22

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-23
SLIDE 23

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-24
SLIDE 24

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-25
SLIDE 25

Pseudorandom Function (PRF)

slide-26
SLIDE 26

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-27
SLIDE 27

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-28
SLIDE 28

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-29
SLIDE 29

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-30
SLIDE 30

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-31
SLIDE 31

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-32
SLIDE 32

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-33
SLIDE 33

Pseudorandom Function (PRF)

slide-34
SLIDE 34

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

slide-35
SLIDE 35

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

G

K K0 K1

slide-36
SLIDE 36

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

G

K K0 K1

G is a length- doubling PRG

slide-37
SLIDE 37

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

G G G

K K0 K1

G is a length- doubling PRG

slide-38
SLIDE 38

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-39
SLIDE 39

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-40
SLIDE 40

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-41
SLIDE 41

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-42
SLIDE 42

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-43
SLIDE 43

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-44
SLIDE 44

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-45
SLIDE 45

Pseudorandom Function (PRF)

A PRF can be constructed from any PRG

slide-46
SLIDE 46

Pseudorandom Function (PRF)

Not blazing fast A PRF can be constructed from any PRG

slide-47
SLIDE 47

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-48
SLIDE 48

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-49
SLIDE 49

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-50
SLIDE 50

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-51
SLIDE 51

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-52
SLIDE 52

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-53
SLIDE 53

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-54
SLIDE 54

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-55
SLIDE 55

CPA-secure SKE with a Block Cipher

slide-56
SLIDE 56

CPA-secure SKE with a Block Cipher

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

slide-57
SLIDE 57

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-58
SLIDE 58

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-59
SLIDE 59

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-60
SLIDE 60

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-61
SLIDE 61

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-62
SLIDE 62

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-63
SLIDE 63

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-64
SLIDE 64

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-65
SLIDE 65

CPA-secure SKE with a Block Cipher

slide-66
SLIDE 66

How to encrypt a long message (multiple blocks)?

CPA-secure SKE with a Block Cipher

slide-67
SLIDE 67

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-68
SLIDE 68

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-69
SLIDE 69

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-70
SLIDE 70

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-71
SLIDE 71

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-72
SLIDE 72

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-73
SLIDE 73

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-74
SLIDE 74

CPA-secure SKE with a Block Cipher

slide-75
SLIDE 75

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-76
SLIDE 76

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-77
SLIDE 77

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-78
SLIDE 78

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-79
SLIDE 79

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-80
SLIDE 80

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-81
SLIDE 81

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?)

slide-82
SLIDE 82

Active Adversary

slide-83
SLIDE 83

Active Adversary

An active adversary can inject messages into the channel

slide-84
SLIDE 84

Active Adversary

An active adversary can inject messages into the channel Eve can send ciphertexts to Bob and get them decrypted

slide-85
SLIDE 85

Active Adversary

An active adversary can inject messages into the channel Eve can send ciphertexts to Bob and get them decrypted Chosen Ciphertext Attack (CCA)

slide-86
SLIDE 86

Active Adversary

An active adversary can inject messages into the channel Eve can send ciphertexts to Bob and get them decrypted Chosen Ciphertext Attack (CCA) If Bob decrypts all ciphertexts for Eve, no security possible

slide-87
SLIDE 87

Active Adversary

An active adversary can inject messages into the channel Eve can send ciphertexts to Bob and get them decrypted Chosen Ciphertext Attack (CCA) If Bob decrypts all ciphertexts for Eve, no security possible What can Bob do?

slide-88
SLIDE 88

SIM-CCA secure if: ∀ ∃ s.t. ∀

Key/Enc Key/Dec

Env

Send Recv

Env REAL IDEAL Replay Filter

SIM-CCA Security

Symmetric-Key Encryption

REAL ≈ IDEAL

RECALL

slide-89
SLIDE 89

Experiment picks b←{0,1} and K←KeyGen For as long as Adversary wants Adv sends two messages m0, m1 to the experiment Expt returns Enc(mb,K) to the adversary Adversary returns a guess b’ Experiments outputs 1 iff b’=b IND-CCA secure if for all feasible adversaries Pr[b’=b] ≈ 1/2

b

Key/Enc

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

Adv gets (guarded) access to DecK oracle

Enc(mb,K)

Key/Dec

No challenge ciphertext answered

IND-CCA Security

Symmetric-Key Encryption

IND-CCA + ~correctness equivalent to SIM-CCA

RECALL

slide-90
SLIDE 90

CCA Security

slide-91
SLIDE 91

CCA Security

How to obtain CCA security?

slide-92
SLIDE 92

CCA Security

How to obtain CCA security? Use a CPA-secure encryption scheme, but make sure Bob “accepts” and decrypts only ciphertexts produced by Alice

slide-93
SLIDE 93

CCA Security

How to obtain CCA security? Use a CPA-secure encryption scheme, but make sure Bob “accepts” and decrypts only ciphertexts produced by Alice i.e., Eve can’ t create new ciphertexts that will be accepted by Bob

slide-94
SLIDE 94

CCA Security

How to obtain CCA security? Use a CPA-secure encryption scheme, but make sure Bob “accepts” and decrypts only ciphertexts produced by Alice i.e., Eve can’ t create new ciphertexts that will be accepted by Bob CCA secure SKE reduces to the problem of CPA secure SKE and (shared key) message authentication

slide-95
SLIDE 95

CCA Security

How to obtain CCA security? Use a CPA-secure encryption scheme, but make sure Bob “accepts” and decrypts only ciphertexts produced by Alice i.e., Eve can’ t create new ciphertexts that will be accepted by Bob CCA secure SKE reduces to the problem of CPA secure SKE and (shared key) message authentication MAC: Message Authentication Code

slide-96
SLIDE 96

Message Authentication Codes

slide-97
SLIDE 97

Message Authentication Codes

A single short key shared by Alice and Bob

slide-98
SLIDE 98

Message Authentication Codes

A single short key shared by Alice and Bob Can sign any (polynomial) number of messages

slide-99
SLIDE 99

Message Authentication Codes

A single short key shared by Alice and Bob Can sign any (polynomial) number of messages A triple (KeyGen, MAC, Verify)

MACK VerK

slide-100
SLIDE 100

Message Authentication Codes

A single short key shared by Alice and Bob Can sign any (polynomial) number of messages A triple (KeyGen, MAC, Verify) Correctness: For all K from KeyGen, and all messages M, VerifyK(M,MACK(M))=1

MACK VerK

slide-101
SLIDE 101

Message Authentication Codes

A single short key shared by Alice and Bob Can sign any (polynomial) number of messages A triple (KeyGen, MAC, Verify) Correctness: For all K from KeyGen, and all messages M, VerifyK(M,MACK(M))=1 Security: probability that an adversary can produce (M,s) s.t. VerifyK(M,s)=1 is negligible unless Alice produced an output s=MACK(M)

Mi si = MACK(Mi) (M,s) VerK(M,s)

Advantage = Pr[ VerK(M,s)=1 and (M,s) ∉ {(Mi,si)} ]

MACK VerK

slide-102
SLIDE 102

CCA Secure SKE

slide-103
SLIDE 103

CCA Secure SKE

CCA-EncK1,K2(m) = ( c:= CPA-EncK1(m), t:= MACK2(c) )

slide-104
SLIDE 104

CCA Secure SKE

CCA-EncK1,K2(m) = ( c:= CPA-EncK1(m), t:= MACK2(c) ) CPA secure encryption: Block-cipher/CTR mode construction

slide-105
SLIDE 105

CCA Secure SKE

CCA-EncK1,K2(m) = ( c:= CPA-EncK1(m), t:= MACK2(c) ) CPA secure encryption: Block-cipher/CTR mode construction MAC: from a PRF or Block-Cipher (next time)

slide-106
SLIDE 106

CCA Secure SKE

CCA-EncK1,K2(m) = ( c:= CPA-EncK1(m), t:= MACK2(c) ) CPA secure encryption: Block-cipher/CTR mode construction MAC: from a PRF or Block-Cipher (next time) SKE in practice uses Block-Cipher standards (next time)

slide-107
SLIDE 107

CCA Secure SKE

CCA-EncK1,K2(m) = ( c:= CPA-EncK1(m), t:= MACK2(c) ) CPA secure encryption: Block-cipher/CTR mode construction MAC: from a PRF or Block-Cipher (next time) SKE in practice uses Block-Cipher standards (next time) In principle, constructions (less efficient) possible based on any One-Way Permutation or even any One-Way Function