Active Adversary Lecture 7 CCA Security MAC Active Adversary - - PowerPoint PPT Presentation

active adversary
SMART_READER_LITE
LIVE PREVIEW

Active Adversary Lecture 7 CCA Security MAC Active Adversary - - PowerPoint PPT Presentation

Active Adversary Lecture 7 CCA Security MAC Active Adversary Active Adversary An active adversary can inject messages into the channel Active Adversary An active adversary can inject messages into the channel Eve can send ciphertexts to Bob


slide-1
SLIDE 1

Active Adversary

Lecture 7 CCA Security MAC

slide-2
SLIDE 2

Active Adversary

slide-3
SLIDE 3

Active Adversary

An active adversary can inject messages into the channel

slide-4
SLIDE 4

Active Adversary

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

slide-5
SLIDE 5

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

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

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

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

slide-9
SLIDE 9

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

Invalid ciphertexts are silently ignored

slide-10
SLIDE 10

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

Replay Filter: No challenge ciphertext answered

IND-CCA Security

Symmetric-Key Encryption

IND-CCA + ~correctness equivalent to SIM-CCA

slide-11
SLIDE 11

CCA Security

slide-12
SLIDE 12

CCA Security

How to obtain CCA security?

slide-13
SLIDE 13

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

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

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 Achieves the stronger guarantee: in IDEAL, Eve can’ t send its own messages to Bob

slide-16
SLIDE 16

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 Achieves the stronger guarantee: in IDEAL, Eve can’ t send its own messages to Bob CCA secure SKE reduces to the problem of CPA secure SKE and (shared key) message authentication

slide-17
SLIDE 17

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 Achieves the stronger guarantee: in IDEAL, Eve can’ t send its own messages to Bob CCA secure SKE reduces to the problem of CPA secure SKE and (shared key) message authentication MAC: Message Authentication Code

slide-18
SLIDE 18

Message Authentication Codes

slide-19
SLIDE 19

Message Authentication Codes

A single short key shared by Alice and Bob

slide-20
SLIDE 20

Message Authentication Codes

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

slide-21
SLIDE 21

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

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

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

CCA Secure SKE

slide-25
SLIDE 25

CCA Secure SKE

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

slide-26
SLIDE 26

CCA Secure SKE

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

slide-27
SLIDE 27

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

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 entirely based on Block-Ciphers (next time)

slide-29
SLIDE 29

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 entirely based on Block-Ciphers (next time) In principle, PRFs can be constructed (less efficiently) based

  • n any One-Way Permutation or even any One-Way Function
slide-30
SLIDE 30

Making a MAC

slide-31
SLIDE 31

One-time MAC

MAC Ver

slide-32
SLIDE 32

To sign a single n bit message

One-time MAC

MAC Ver

slide-33
SLIDE 33

To sign a single n bit message A simple (but inefficient) scheme

One-time MAC

MAC Ver

slide-34
SLIDE 34

To sign a single n bit message A simple (but inefficient) scheme Shared secret key: 2n random
 strings (each k-bit long) (ri0,ri1)i=1..n

r10 r20 r30 r11 r21 r31

One-time MAC

MAC Ver

slide-35
SLIDE 35

To sign a single n bit message A simple (but inefficient) scheme Shared secret key: 2n random
 strings (each k-bit long) (ri0,ri1)i=1..n

r10 r20 r30 r11 r21 r31

One-time MAC

010

MAC Ver

slide-36
SLIDE 36

To sign a single n bit message A simple (but inefficient) scheme Shared secret key: 2n random
 strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n

r10 r20 r30 r11 r21 r31

One-time MAC

r10 r21 r30 010

MAC Ver

slide-37
SLIDE 37

To sign a single n bit message A simple (but inefficient) scheme Shared secret key: 2n random
 strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n Negligible probability that Eve can produce
 a signature on m’≠m

r10 r20 r30 r11 r21 r31

One-time MAC

r10 r21 r30 010

MAC Ver

slide-38
SLIDE 38

To sign a single n bit message A simple (but inefficient) scheme Shared secret key: 2n random
 strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n Negligible probability that Eve can produce
 a signature on m’≠m Doesn’ t require any computational restrictions on adversary!

r10 r20 r30 r11 r21 r31

One-time MAC

r10 r21 r30 010

MAC Ver

slide-39
SLIDE 39

To sign a single n bit message A simple (but inefficient) scheme Shared secret key: 2n random
 strings (each k-bit long) (ri0,ri1)i=1..n Signature for m1...mn be (rimi)i=1..n Negligible probability that Eve can produce
 a signature on m’≠m Doesn’ t require any computational restrictions on adversary! More efficient one-time MACs exist (later)

r10 r20 r30 r11 r21 r31

One-time MAC

r10 r21 r30 010

MAC Ver

slide-40
SLIDE 40

(Multi-msg) MAC from PRF

When Each Message is a Single Block

slide-41
SLIDE 41

(Multi-msg) MAC from PRF

PRF is a MAC!

When Each Message is a Single Block

slide-42
SLIDE 42

(Multi-msg) MAC from PRF

PRF is a MAC! MACK(M) := FK(M) where F is a PRF

When Each Message is a Single Block

slide-43
SLIDE 43

(Multi-msg) MAC from PRF

PRF is a MAC! MACK(M) := FK(M) where F is a PRF

When Each Message is a Single Block

FK M FK(M)

slide-44
SLIDE 44

(Multi-msg) MAC from PRF

PRF is a MAC! MACK(M) := FK(M) where F is a PRF VerK(M,S) := 1 iff S=FK(M)

When Each Message is a Single Block

FK M FK(M)

slide-45
SLIDE 45

(Multi-msg) MAC from PRF

PRF is a MAC! MACK(M) := FK(M) where F is a PRF VerK(M,S) := 1 iff S=FK(M) Output length of FK should be big enough

When Each Message is a Single Block

FK M FK(M)

slide-46
SLIDE 46

(Multi-msg) MAC from PRF

PRF is a MAC! MACK(M) := FK(M) where F is a PRF VerK(M,S) := 1 iff S=FK(M) Output length of FK should be big enough If an adversary forges MAC with probability εMAC, then can break PRF with advantage O(εMAC — 2-m(k)) (m(k) being the output length of the PRF) [How?]

When Each Message is a Single Block

FK M FK(M)

slide-47
SLIDE 47

(Multi-msg) MAC from PRF

PRF is a MAC! MACK(M) := FK(M) where F is a PRF VerK(M,S) := 1 iff S=FK(M) Output length of FK should be big enough If an adversary forges MAC with probability εMAC, then can break PRF with advantage O(εMAC — 2-m(k)) (m(k) being the output length of the PRF) [How?]

When Each Message is a Single Block

FK M FK(M)

Recall: Advantage in breaking a PRF F = diff in prob test has

  • f outputting 1, when

given F vs. truly random R

slide-48
SLIDE 48

(Multi-msg) MAC from PRF

PRF is a MAC! MACK(M) := FK(M) where F is a PRF VerK(M,S) := 1 iff S=FK(M) Output length of FK should be big enough If an adversary forges MAC with probability εMAC, then can break PRF with advantage O(εMAC — 2-m(k)) (m(k) being the output length of the PRF) [How?] If random function R used as MAC, then probability of forgery, εMAC* = 2-m(k)

When Each Message is a Single Block

FK M FK(M)

Recall: Advantage in breaking a PRF F = diff in prob test has

  • f outputting 1, when

given F vs. truly random R

slide-49
SLIDE 49

MAC for Multiple-Block Messages

slide-50
SLIDE 50

MAC for Multiple-Block Messages

What if message is longer than one block?

slide-51
SLIDE 51

MAC for Multiple-Block Messages

What if message is longer than one block? MAC’ing each block separately is not secure (unlike in the case of CPA secure encryption)

slide-52
SLIDE 52

MAC for Multiple-Block Messages

What if message is longer than one block? MAC’ing each block separately is not secure (unlike in the case of CPA secure encryption) Eve can rearrange the blocks/drop some blocks

slide-53
SLIDE 53

MAC for Multiple-Block Messages

What if message is longer than one block? MAC’ing each block separately is not secure (unlike in the case of CPA secure encryption) Eve can rearrange the blocks/drop some blocks Could use a PRF that takes longer inputs

slide-54
SLIDE 54

MAC for Multiple-Block Messages

What if message is longer than one block? MAC’ing each block separately is not secure (unlike in the case of CPA secure encryption) Eve can rearrange the blocks/drop some blocks Could use a PRF that takes longer inputs Can we use a PRF with a fixed block-length (i.e., a block cipher)?

slide-55
SLIDE 55

MAC for Multiple-Block Messages

slide-56
SLIDE 56

MAC for Multiple-Block Messages

A simple solution: “tie the blocks together”

slide-57
SLIDE 57

MAC for Multiple-Block Messages

A simple solution: “tie the blocks together” Add to each block a random string r (same r for all blocks), total number of blocks, and a sequence number

slide-58
SLIDE 58

MAC for Multiple-Block Messages

A simple solution: “tie the blocks together” Add to each block a random string r (same r for all blocks), total number of blocks, and a sequence number Bi = (r, t, i, Mi)

slide-59
SLIDE 59

MAC for Multiple-Block Messages

A simple solution: “tie the blocks together” Add to each block a random string r (same r for all blocks), total number of blocks, and a sequence number Bi = (r, t, i, Mi) MAC(M) = (r, (MAC(Bi))i=1..t)

slide-60
SLIDE 60

MAC for Multiple-Block Messages

A simple solution: “tie the blocks together” Add to each block a random string r (same r for all blocks), total number of blocks, and a sequence number Bi = (r, t, i, Mi) MAC(M) = (r, (MAC(Bi))i=1..t) r prevents mixing blocks from two messages, t prevents dropping blocks and i prevents rearranging

slide-61
SLIDE 61

MAC for Multiple-Block Messages

A simple solution: “tie the blocks together” Add to each block a random string r (same r for all blocks), total number of blocks, and a sequence number Bi = (r, t, i, Mi) MAC(M) = (r, (MAC(Bi))i=1..t) r prevents mixing blocks from two messages, t prevents dropping blocks and i prevents rearranging Inefficient! Tag length increases with message length

slide-62
SLIDE 62

CBC-MAC

slide-63
SLIDE 63

CBC-MAC

PRF domain extension: Chaining the blocks

slide-64
SLIDE 64

CBC-MAC

PRF domain extension: Chaining the blocks

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

slide-65
SLIDE 65

CBC-MAC

PRF domain extension: Chaining the blocks

  • cf. CBC mode for encryption (which

is not a MAC!)

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

slide-66
SLIDE 66

CBC-MAC

PRF domain extension: Chaining the blocks

  • cf. CBC mode for encryption (which

is not a MAC!) t-block messages, a single block tag

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

slide-67
SLIDE 67

CBC-MAC

PRF domain extension: Chaining the blocks

  • cf. CBC mode for encryption (which

is not a MAC!) t-block messages, a single block tag Can be shown to be secure

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

slide-68
SLIDE 68

CBC-MAC

PRF domain extension: Chaining the blocks

  • cf. CBC mode for encryption (which

is not a MAC!) t-block messages, a single block tag Can be shown to be secure If restricted to t-block messages (i.e., same length)

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

slide-69
SLIDE 69

CBC-MAC

PRF domain extension: Chaining the blocks

  • cf. CBC mode for encryption (which

is not a MAC!) t-block messages, a single block tag Can be shown to be secure If restricted to t-block messages (i.e., same length) Else attacks possible (by extending a previously signed message)

m1 m2 mt

FK FK FK ⊕ ⊕

T

...

slide-70
SLIDE 70

Patching CBC-MAC

slide-71
SLIDE 71

Patching CBC-MAC

Patching CBC MAC to handle message of any (polynomial) length but still producing a single block tag (secure if block-cipher is):

slide-72
SLIDE 72

Patching CBC-MAC

Patching CBC MAC to handle message of any (polynomial) length but still producing a single block tag (secure if block-cipher is): Derive K as FK’(t), where t is the number of blocks

slide-73
SLIDE 73

Patching CBC-MAC

Patching CBC MAC to handle message of any (polynomial) length but still producing a single block tag (secure if block-cipher is): Derive K as FK’(t), where t is the number of blocks Use first block to specify number of blocks

slide-74
SLIDE 74

Patching CBC-MAC

Patching CBC MAC to handle message of any (polynomial) length but still producing a single block tag (secure if block-cipher is): Derive K as FK’(t), where t is the number of blocks Use first block to specify number of blocks Important that first block is used: if last block, message extension attacks still possible

slide-75
SLIDE 75

Patching CBC-MAC

Patching CBC MAC to handle message of any (polynomial) length but still producing a single block tag (secure if block-cipher is): Derive K as FK’(t), where t is the number of blocks Use first block to specify number of blocks Important that first block is used: if last block, message extension attacks still possible EMAC: Output not the last tag T, but FK’(T), where K’ is an independent key (after padding the message to an integral number of blocks). No need to know message length a priori.

slide-76
SLIDE 76

Patching CBC-MAC

Patching CBC MAC to handle message of any (polynomial) length but still producing a single block tag (secure if block-cipher is): Derive K as FK’(t), where t is the number of blocks Use first block to specify number of blocks Important that first block is used: if last block, message extension attacks still possible EMAC: Output not the last tag T, but FK’(T), where K’ is an independent key (after padding the message to an integral number of blocks). No need to know message length a priori. CMAC: XOR last message block with a key (derived from the

  • riginal key using the block-cipher). Also avoids padding when

message is integral number of blocks.

slide-77
SLIDE 77

Patching CBC-MAC

Patching CBC MAC to handle message of any (polynomial) length but still producing a single block tag (secure if block-cipher is): Derive K as FK’(t), where t is the number of blocks Use first block to specify number of blocks Important that first block is used: if last block, message extension attacks still possible EMAC: Output not the last tag T, but FK’(T), where K’ is an independent key (after padding the message to an integral number of blocks). No need to know message length a priori. CMAC: XOR last message block with a key (derived from the

  • riginal key using the block-cipher). Also avoids padding when

message is integral number of blocks.

NIST Recommendation. 2005

slide-78
SLIDE 78

Patching CBC-MAC

Patching CBC MAC to handle message of any (polynomial) length but still producing a single block tag (secure if block-cipher is): Derive K as FK’(t), where t is the number of blocks Use first block to specify number of blocks Important that first block is used: if last block, message extension attacks still possible EMAC: Output not the last tag T, but FK’(T), where K’ is an independent key (after padding the message to an integral number of blocks). No need to know message length a priori. CMAC: XOR last message block with a key (derived from the

  • riginal key using the block-cipher). Also avoids padding when

message is integral number of blocks. Later: Hash-based HMAC used in TLS and IPSec

NIST Recommendation. 2005 IETF Standard. 1997

slide-79
SLIDE 79

SKE in Practice

slide-80
SLIDE 80

Stream Ciphers

slide-81
SLIDE 81

Stream Ciphers

A key should be used for only a single stream

slide-82
SLIDE 82

Stream Ciphers

A key should be used for only a single stream RC4, eSTREAM portfolio, ...

slide-83
SLIDE 83

Stream Ciphers

A key should be used for only a single stream RC4, eSTREAM portfolio, ... In practice, stream ciphers take a key and an “IV” (for initialization vector) as inputs

slide-84
SLIDE 84

Stream Ciphers

A key should be used for only a single stream RC4, eSTREAM portfolio, ... In practice, stream ciphers take a key and an “IV” (for initialization vector) as inputs

Also used to denote the random nonce chosen for encryption using a block-cipher

slide-85
SLIDE 85

Stream Ciphers

A key should be used for only a single stream RC4, eSTREAM portfolio, ... In practice, stream ciphers take a key and an “IV” (for initialization vector) as inputs Heuristic goal: behave somewhat like a PRF (instead of a PRG) so that it can be used for multi-message encryption

Also used to denote the random nonce chosen for encryption using a block-cipher

slide-86
SLIDE 86

Stream Ciphers

A key should be used for only a single stream RC4, eSTREAM portfolio, ... In practice, stream ciphers take a key and an “IV” (for initialization vector) as inputs Heuristic goal: behave somewhat like a PRF (instead of a PRG) so that it can be used for multi-message encryption But often breaks if used this way

Also used to denote the random nonce chosen for encryption using a block-cipher

slide-87
SLIDE 87

Stream Ciphers

A key should be used for only a single stream RC4, eSTREAM portfolio, ... In practice, stream ciphers take a key and an “IV” (for initialization vector) as inputs Heuristic goal: behave somewhat like a PRF (instead of a PRG) so that it can be used for multi-message encryption But often breaks if used this way NIST Standard: For multi-message encryption, use a block- cipher in CTR mode

Also used to denote the random nonce chosen for encryption using a block-cipher

slide-88
SLIDE 88

Block Ciphers

slide-89
SLIDE 89

Block Ciphers

DES, 3DES, Blowfish, AES, ...

slide-90
SLIDE 90

Block Ciphers

DES, 3DES, Blowfish, AES, ... Heuristic constructions

slide-91
SLIDE 91

Block Ciphers

DES, 3DES, Blowfish, AES, ... Heuristic constructions Permutations that can be inverted with the key

slide-92
SLIDE 92

Block Ciphers

DES, 3DES, Blowfish, AES, ... Heuristic constructions Permutations that can be inverted with the key Speed (hardware/software) is of the essence

slide-93
SLIDE 93

Block Ciphers

DES, 3DES, Blowfish, AES, ... Heuristic constructions Permutations that can be inverted with the key Speed (hardware/software) is of the essence But should withstand known attacks

slide-94
SLIDE 94

Block Ciphers

DES, 3DES, Blowfish, AES, ... Heuristic constructions Permutations that can be inverted with the key Speed (hardware/software) is of the essence But should withstand known attacks As a PRP (or at least, against key recovery)

slide-95
SLIDE 95

Feistel Network

slide-96
SLIDE 96

Feistel Network

Building a permutation from a (block) function

slide-97
SLIDE 97

Feistel Network

Building a permutation from a (block) function Let f: {0,1}m → {0,1}m be an arbitrary function

slide-98
SLIDE 98

Feistel Network

f1

Building a permutation from a (block) function Let f: {0,1}m → {0,1}m be an arbitrary function Ff: {0,1}2m→{0,1}2m defined as Ff(x,y) = ( y, x⊕f(y) )

slide-99
SLIDE 99

Feistel Network

f1

Building a permutation from a (block) function Let f: {0,1}m → {0,1}m be an arbitrary function Ff: {0,1}2m→{0,1}2m defined as Ff(x,y) = ( y, x⊕f(y) ) Ff is a permutation (Why?)

slide-100
SLIDE 100

Feistel Network

f1

Building a permutation from a (block) function Let f: {0,1}m → {0,1}m be an arbitrary function Ff: {0,1}2m→{0,1}2m defined as Ff(x,y) = ( y, x⊕f(y) ) Ff is a permutation (Why?) Can invert (How?)

slide-101
SLIDE 101

Feistel Network

f1

Building a permutation from a (block) function Let f: {0,1}m → {0,1}m be an arbitrary function Ff: {0,1}2m→{0,1}2m defined as Ff(x,y) = ( y, x⊕f(y) ) Ff is a permutation (Why?) Can invert (How?) Given functions f1,...,ft can build a t-layer Feistel network Ff1...ft

slide-102
SLIDE 102

f2

Feistel Network

f1

Building a permutation from a (block) function Let f: {0,1}m → {0,1}m be an arbitrary function Ff: {0,1}2m→{0,1}2m defined as Ff(x,y) = ( y, x⊕f(y) ) Ff is a permutation (Why?) Can invert (How?) Given functions f1,...,ft can build a t-layer Feistel network Ff1...ft

1

slide-103
SLIDE 103

f2

Feistel Network

f1

Building a permutation from a (block) function Let f: {0,1}m → {0,1}m be an arbitrary function Ff: {0,1}2m→{0,1}2m defined as Ff(x,y) = ( y, x⊕f(y) ) Ff is a permutation (Why?) Can invert (How?) Given functions f1,...,ft can build a t-layer Feistel network Ff1...ft Still a permutation from {0,1}2m to {0,1}2m

1

slide-104
SLIDE 104

f2

Feistel Network

f1

Building a permutation from a (block) function Let f: {0,1}m → {0,1}m be an arbitrary function Ff: {0,1}2m→{0,1}2m defined as Ff(x,y) = ( y, x⊕f(y) ) Ff is a permutation (Why?) Can invert (How?) Given functions f1,...,ft can build a t-layer Feistel network Ff1...ft Still a permutation from {0,1}2m to {0,1}2m Luby-Rackoff: A 3-layer Feistel network, in which 3 PRFs with independent seeds are the 3 round functions, is a PRP. A 4-layer Feistel gives a strong PRP

1

slide-105
SLIDE 105

f2

Feistel Network

f1

Building a permutation from a (block) function Let f: {0,1}m → {0,1}m be an arbitrary function Ff: {0,1}2m→{0,1}2m defined as Ff(x,y) = ( y, x⊕f(y) ) Ff is a permutation (Why?) Can invert (How?) Given functions f1,...,ft can build a t-layer Feistel network Ff1...ft Still a permutation from {0,1}2m to {0,1}2m Luby-Rackoff: A 3-layer Feistel network, in which 3 PRFs with independent seeds are the 3 round functions, is a PRP. A 4-layer Feistel gives a strong PRP Fewer layers do not suffice! [Exercise]

1

slide-106
SLIDE 106

Luby-Rackoff

slide-107
SLIDE 107

Luby-Rackoff

Using Feistel networks of PRFs to build a PRP

slide-108
SLIDE 108

Luby-Rackoff

Using Feistel networks of PRFs to build a PRP A 3-layer Feistel network, with PRFs with 3 independent seeds as the round functions, is a PRP

slide-109
SLIDE 109

Luby-Rackoff

Using Feistel networks of PRFs to build a PRP A 3-layer Feistel network, with PRFs with 3 independent seeds as the round functions, is a PRP 1 or 2 layers do not suffice! [Exercise]

slide-110
SLIDE 110

Luby-Rackoff

Using Feistel networks of PRFs to build a PRP A 3-layer Feistel network, with PRFs with 3 independent seeds as the round functions, is a PRP 1 or 2 layers do not suffice! [Exercise] With 4 layers (and 4 independent seeds), it is a strong PRP

slide-111
SLIDE 111

Luby-Rackoff

Using Feistel networks of PRFs to build a PRP A 3-layer Feistel network, with PRFs with 3 independent seeds as the round functions, is a PRP 1 or 2 layers do not suffice! [Exercise] With 4 layers (and 4 independent seeds), it is a strong PRP 3 layers do not suffice! [Exercise]

slide-112
SLIDE 112

Luby-Rackoff

Using Feistel networks of PRFs to build a PRP A 3-layer Feistel network, with PRFs with 3 independent seeds as the round functions, is a PRP 1 or 2 layers do not suffice! [Exercise] With 4 layers (and 4 independent seeds), it is a strong PRP 3 layers do not suffice! [Exercise] OWF/OWP ⇒ PRG ⇒ PRF ⇒ (strong) PRP, i.e., Block Cipher

slide-113
SLIDE 113

Luby-Rackoff

Using Feistel networks of PRFs to build a PRP A 3-layer Feistel network, with PRFs with 3 independent seeds as the round functions, is a PRP 1 or 2 layers do not suffice! [Exercise] With 4 layers (and 4 independent seeds), it is a strong PRP 3 layers do not suffice! [Exercise] OWF/OWP ⇒ PRG ⇒ PRF ⇒ (strong) PRP, i.e., Block Cipher OWF/OWP ⇒ PRG ⇒ PRF is too slow for standards

slide-114
SLIDE 114

DES Block Cipher

slide-115
SLIDE 115

DES Block Cipher

Data Encryption Standard (DES), Triple-DES, DES-X

NIST Standard. 1976

slide-116
SLIDE 116

DES Block Cipher

Data Encryption Standard (DES), Triple-DES, DES-X DES uses a 16-layer Feistel network (and a few other steps)

NIST Standard. 1976

slide-117
SLIDE 117

DES Block Cipher

Data Encryption Standard (DES), Triple-DES, DES-X DES uses a 16-layer Feistel network (and a few other steps) The round functions are not PRFs, but ad hoc

NIST Standard. 1976

slide-118
SLIDE 118

DES Block Cipher

Data Encryption Standard (DES), Triple-DES, DES-X DES uses a 16-layer Feistel network (and a few other steps) The round functions are not PRFs, but ad hoc “Confuse and diffuse”

NIST Standard. 1976

slide-119
SLIDE 119

DES Block Cipher

Data Encryption Standard (DES), Triple-DES, DES-X DES uses a 16-layer Feistel network (and a few other steps) The round functions are not PRFs, but ad hoc “Confuse and diffuse” Defined for fixed key/block lengths (56 bits and 64 bits); key is used to generate subkeys for round functions

NIST Standard. 1976

slide-120
SLIDE 120

DES Block Cipher

Data Encryption Standard (DES), Triple-DES, DES-X DES uses a 16-layer Feistel network (and a few other steps) The round functions are not PRFs, but ad hoc “Confuse and diffuse” Defined for fixed key/block lengths (56 bits and 64 bits); key is used to generate subkeys for round functions DES’ s key length too short

NIST Standard. 1976

slide-121
SLIDE 121

DES Block Cipher

Data Encryption Standard (DES), Triple-DES, DES-X DES uses a 16-layer Feistel network (and a few other steps) The round functions are not PRFs, but ad hoc “Confuse and diffuse” Defined for fixed key/block lengths (56 bits and 64 bits); key is used to generate subkeys for round functions DES’ s key length too short Can now mount brute force key-recovery attacks (e.g. using $10K hardware, running for under a week, in 2006; now, in under a day)

NIST Standard. 1976

slide-122
SLIDE 122

DES Block Cipher

Data Encryption Standard (DES), Triple-DES, DES-X DES uses a 16-layer Feistel network (and a few other steps) The round functions are not PRFs, but ad hoc “Confuse and diffuse” Defined for fixed key/block lengths (56 bits and 64 bits); key is used to generate subkeys for round functions DES’ s key length too short Can now mount brute force key-recovery attacks (e.g. using $10K hardware, running for under a week, in 2006; now, in under a day) DES-X: extra keys to pad input and output

NIST Standard. 1976

slide-123
SLIDE 123

DES Block Cipher

Data Encryption Standard (DES), Triple-DES, DES-X DES uses a 16-layer Feistel network (and a few other steps) The round functions are not PRFs, but ad hoc “Confuse and diffuse” Defined for fixed key/block lengths (56 bits and 64 bits); key is used to generate subkeys for round functions DES’ s key length too short Can now mount brute force key-recovery attacks (e.g. using $10K hardware, running for under a week, in 2006; now, in under a day) DES-X: extra keys to pad input and output Triple DES: 3 successive applications of DES (or DES-1) with 3 keys

NIST Standard. 1976

slide-124
SLIDE 124

AES Block Cipher

slide-125
SLIDE 125

AES Block Cipher

Advanced Encryption Standard (AES)

NIST Standard. 2001

slide-126
SLIDE 126

AES Block Cipher

Advanced Encryption Standard (AES) AES-128, AES-192, AES-256 (3 key sizes; block size = 128 bits)

NIST Standard. 2001

slide-127
SLIDE 127

AES Block Cipher

Advanced Encryption Standard (AES) AES-128, AES-192, AES-256 (3 key sizes; block size = 128 bits) Very efficient in software implementations (unlike DES)

NIST Standard. 2001

slide-128
SLIDE 128

AES Block Cipher

Advanced Encryption Standard (AES) AES-128, AES-192, AES-256 (3 key sizes; block size = 128 bits) Very efficient in software implementations (unlike DES) Uses “Substitute-and-Permute” instead of Feistel networks

NIST Standard. 2001

slide-129
SLIDE 129

AES Block Cipher

Advanced Encryption Standard (AES) AES-128, AES-192, AES-256 (3 key sizes; block size = 128 bits) Very efficient in software implementations (unlike DES) Uses “Substitute-and-Permute” instead of Feistel networks Has some algebraic structure

NIST Standard. 2001

slide-130
SLIDE 130

AES Block Cipher

Advanced Encryption Standard (AES) AES-128, AES-192, AES-256 (3 key sizes; block size = 128 bits) Very efficient in software implementations (unlike DES) Uses “Substitute-and-Permute” instead of Feistel networks Has some algebraic structure Operations in a vector space over the field GF(28)

NIST Standard. 2001

slide-131
SLIDE 131

AES Block Cipher

Advanced Encryption Standard (AES) AES-128, AES-192, AES-256 (3 key sizes; block size = 128 bits) Very efficient in software implementations (unlike DES) Uses “Substitute-and-Permute” instead of Feistel networks Has some algebraic structure Operations in a vector space over the field GF(28) The algebraic structure may lead to “attacks”?

NIST Standard. 2001

slide-132
SLIDE 132

AES Block Cipher

Advanced Encryption Standard (AES) AES-128, AES-192, AES-256 (3 key sizes; block size = 128 bits) Very efficient in software implementations (unlike DES) Uses “Substitute-and-Permute” instead of Feistel networks Has some algebraic structure Operations in a vector space over the field GF(28) The algebraic structure may lead to “attacks”? Some implementations may lead to side-channel attacks (e.g. cache-timing attacks)

NIST Standard. 2001

slide-133
SLIDE 133

AES Block Cipher

Advanced Encryption Standard (AES) AES-128, AES-192, AES-256 (3 key sizes; block size = 128 bits) Very efficient in software implementations (unlike DES) Uses “Substitute-and-Permute” instead of Feistel networks Has some algebraic structure Operations in a vector space over the field GF(28) The algebraic structure may lead to “attacks”? Some implementations may lead to side-channel attacks (e.g. cache-timing attacks) No “simple” hardness assumption known to imply any sort of security for AES

NIST Standard. 2001

slide-134
SLIDE 134

By Jeff Moser (http:/ /www.moserware.com/2009/09/stick-figure-guide-to-advanced.html)

slide-135
SLIDE 135

Cryptanalysis

slide-136
SLIDE 136

Cryptanalysis

Attacking stream ciphers and block ciphers

slide-137
SLIDE 137

Cryptanalysis

Attacking stream ciphers and block ciphers Typically for key recovery

slide-138
SLIDE 138

Cryptanalysis

Attacking stream ciphers and block ciphers Typically for key recovery Brute force cryptanalysis, using specialized hardware

slide-139
SLIDE 139

Cryptanalysis

Attacking stream ciphers and block ciphers Typically for key recovery Brute force cryptanalysis, using specialized hardware e.g. Attack on DES in 1998

slide-140
SLIDE 140

Cryptanalysis

Attacking stream ciphers and block ciphers Typically for key recovery Brute force cryptanalysis, using specialized hardware e.g. Attack on DES in 1998 Several other analytical techniques to speed up attacks

slide-141
SLIDE 141

Cryptanalysis

Attacking stream ciphers and block ciphers Typically for key recovery Brute force cryptanalysis, using specialized hardware e.g. Attack on DES in 1998 Several other analytical techniques to speed up attacks Sometimes “theoretical”: on weakened (“reduced round”) constructions, showing improvement over brute-force attack

slide-142
SLIDE 142

Cryptanalysis

Attacking stream ciphers and block ciphers Typically for key recovery Brute force cryptanalysis, using specialized hardware e.g. Attack on DES in 1998 Several other analytical techniques to speed up attacks Sometimes “theoretical”: on weakened (“reduced round”) constructions, showing improvement over brute-force attack Meet-in-the-middle, linear cryptanalysis, differential cryptanalysis, impossible differential cryptanalysis, boomerang attack, integral cryptanalysis, cube attack, ...

slide-143
SLIDE 143

Authenticated Encryption

slide-144
SLIDE 144

Authenticated Encryption

Doing encryption + authentication better

slide-145
SLIDE 145

Authenticated Encryption

Doing encryption + authentication better Generic composition: encrypt, then MAC

slide-146
SLIDE 146

Authenticated Encryption

Doing encryption + authentication better Generic composition: encrypt, then MAC Needs two keys and two passes

slide-147
SLIDE 147

Authenticated Encryption

Doing encryption + authentication better Generic composition: encrypt, then MAC Needs two keys and two passes AE aims to do this more efficiently

slide-148
SLIDE 148

Authenticated Encryption

Doing encryption + authentication better Generic composition: encrypt, then MAC Needs two keys and two passes AE aims to do this more efficiently Several constructions based on block-ciphers (modes of

  • peration) provably secure modeling block-cipher as PRP
slide-149
SLIDE 149

Authenticated Encryption

Doing encryption + authentication better Generic composition: encrypt, then MAC Needs two keys and two passes AE aims to do this more efficiently Several constructions based on block-ciphers (modes of

  • peration) provably secure modeling block-cipher as PRP

One pass: IAPM, OCB, ... [patented]

slide-150
SLIDE 150

Authenticated Encryption

Doing encryption + authentication better Generic composition: encrypt, then MAC Needs two keys and two passes AE aims to do this more efficiently Several constructions based on block-ciphers (modes of

  • peration) provably secure modeling block-cipher as PRP

One pass: IAPM, OCB, ... [patented] Two pass: CCM, GCM, SIV , ... [included in NIST standards]

slide-151
SLIDE 151

Authenticated Encryption

Doing encryption + authentication better Generic composition: encrypt, then MAC Needs two keys and two passes AE aims to do this more efficiently Several constructions based on block-ciphers (modes of

  • peration) provably secure modeling block-cipher as PRP

One pass: IAPM, OCB, ... [patented] Two pass: CCM, GCM, SIV , ... [included in NIST standards] AE with Associated Data: Allows unencrypted (but authenticated) parts of the plaintext, for headers etc.

slide-152
SLIDE 152

SKE today

slide-153
SLIDE 153

SKE today

SKE in IPsec, TLS etc. mainly based on AES block-ciphers

slide-154
SLIDE 154

SKE today

SKE in IPsec, TLS etc. mainly based on AES block-ciphers AES-128, AES-192, AES-256

slide-155
SLIDE 155

SKE today

SKE in IPsec, TLS etc. mainly based on AES block-ciphers AES-128, AES-192, AES-256 Recommended: AES Counter-mode + CMAC (or HMAC)

slide-156
SLIDE 156

SKE today

SKE in IPsec, TLS etc. mainly based on AES block-ciphers AES-128, AES-192, AES-256 Recommended: AES Counter-mode + CMAC (or HMAC) Gives CCA security, and provides authentication

slide-157
SLIDE 157

SKE today

SKE in IPsec, TLS etc. mainly based on AES block-ciphers AES-128, AES-192, AES-256 Recommended: AES Counter-mode + CMAC (or HMAC) Gives CCA security, and provides authentication Older components/modes still in use

slide-158
SLIDE 158

SKE today

SKE in IPsec, TLS etc. mainly based on AES block-ciphers AES-128, AES-192, AES-256 Recommended: AES Counter-mode + CMAC (or HMAC) Gives CCA security, and provides authentication Older components/modes still in use Supported by many standards for legacy purposes

slide-159
SLIDE 159

SKE today

SKE in IPsec, TLS etc. mainly based on AES block-ciphers AES-128, AES-192, AES-256 Recommended: AES Counter-mode + CMAC (or HMAC) Gives CCA security, and provides authentication Older components/modes still in use Supported by many standards for legacy purposes In many applications (sometimes with modifications)

slide-160
SLIDE 160

SKE today

SKE in IPsec, TLS etc. mainly based on AES block-ciphers AES-128, AES-192, AES-256 Recommended: AES Counter-mode + CMAC (or HMAC) Gives CCA security, and provides authentication Older components/modes still in use Supported by many standards for legacy purposes In many applications (sometimes with modifications) e.g. RC4 in BitTorrent, Skype, PDF