Fall 2016 Adam (Ada) Lerner lerner@cs.washington.edu
Thanks to Franzi Roesner, Dan Boneh, Dieter Gollmann, Dan Halperin, Yoshi Kohno, John Manferdelli, John Mitchell, Vitaly Shmatikov, Bennet Yee, and many others for sample slides and materials ...
Cryptography: Symmetric Encryption (finish), Hash Functions, Message - - PowerPoint PPT Presentation
CSE 484 / CSE M 584: Computer Security and Privacy Cryptography: Symmetric Encryption (finish), Hash Functions, Message Authentication Codes Fall 2016 Adam (Ada) Lerner lerner@cs.washington.edu Thanks to Franzi Roesner, Dan Boneh, Dieter
Thanks to Franzi Roesner, Dan Boneh, Dieter Gollmann, Dan Halperin, Yoshi Kohno, John Manferdelli, John Mitchell, Vitaly Shmatikov, Bennet Yee, and many others for sample slides and materials ...
10/26/16 CSE 484 / CSE M 584 - Fall 2016 2
10/26/16 CSE 484 / CSE M 584 - Fall 2016 3
10/26/16 CSE 484 / CSE M 584 - Fall 2016 4
10/26/16 CSE 484 / CSE M 584 - Fall 2016 5
10/26/16 CSE 484 / CSE M 584 - Fall 2016 6
– For example, 64 bits for DES, 128 bits for AES – Each key defines a different permutation – Same key is reused for each block (can use short keys)
10/26/16 CSE 484 / CSE M 584 - Fall 2016 7
Plaintext
Ciphertext
block cipher Key
10/26/16 CSE 484 / CSE M 584 - Fall 2016 8
block cipher block cipher block cipher block cipher block cipher
10/26/16 CSE 484 / CSE M 584 - Fall 2016 9
Sent with ciphertext
block cipher block cipher block cipher block cipher
Initialization vector (random)
10/26/16 CSE 484 / CSE M 584 - Fall 2016 10
decrypt decrypt decrypt decrypt
Initialization vector
10/26/16 CSE 484 / CSE M 584 - Fall 2016 11
slide 11
Similar plaintext blocks produce similar ciphertext blocks (not good!)
[Picture due to Bart Preneel]
Initial ctr (random)
10/26/16 CSE 484 / CSE M 584 - Fall 2016 12
10/26/16 CSE 484 / CSE M 584 - Fall 2016 13
10/26/16 CSE 484 / CSE M 584 - Fall 2016 14
10/26/16 CSE 484 / CSE M 584 - Fall 2016 15
[wikipedia]
10/26/16 CSE 484 / CSE M 584 - Fall 2016 16
[wikipedia]
10/26/16 CSE 484 / CSE M 584 - Fall 2016 17
[wikipedia]
10/26/16 CSE 484 / CSE M 584 - Fall 2016 18
[wikipedia]
10/26/16 CSE 484 / CSE M 584 - Fall 2016 19
10/26/16 CSE 484 / CSE M 584 - Fall 2016 20
10/26/16 CSE 484 / CSE M 584 - Fall 2016 21
Minimum security requirement for a modern encryption scheme
10/26/16 CSE 484 / CSE M 584 - Fall 2016 22
10/26/16 CSE 484 / CSE M 584 - Fall 2016 23
Alice Bob
Adversary
10/26/16 CSE 484 / CSE M 584 - Fall 2016 24
KEY KEY
message
MAC: message authentication code
(sometimes called a “tag”)
message, MAC(KEY,message) = ? Recomputes MAC and verifies whether it is equal to the MAC attached to the message
10/26/16 CSE 484 / CSE M 584 - Fall 2016 25
block cipher block cipher block cipher block cipher
Initialization vector (random)
10/26/16 CSE 484 / CSE M 584 - Fall 2016 26
block cipher block cipher block cipher block cipher
10/26/16 CSE 484 / CSE M 584 - Fall 2016 27
block cipher block cipher block cipher block cipher
10/26/16 CSE 484 / CSE M 584 - Fall 2016 28
10/26/16 CSE 484 / CSE M 584 - Fall 2016 29
10/26/16 CSE 484 / CSE M 584 - Fall 2016 30
goodFile
VIRUS
badFile
The NYTimes
hash(goodFile)
10/26/16 CSE 484 / CSE M 584 - Fall 2016 31
bit strings of any length n-bit bit strings
– Collision: h(x)=h(x’) for distinct inputs x, x’
– Every bit equally likely to be 0 or 1
message “digest”
message
10/26/16 CSE 484 / CSE M 584 - Fall 2016 32
10/26/16 CSE 484 / CSE M 584 - Fall 2016 33
10/26/16 CSE 484 / CSE M 584 - Fall 2016 34
10/26/16 CSE 484 / CSE M 584 - Fall 2016 35
10/26/16 CSE 484 / CSE M 584 - Fall 2016 36
10/26/16 CSE 484 / CSE M 584 - Fall 2016 37
value requires trying on average 2127 values.
random values.
10/26/16 CSE 484 / CSE M 584 - Fall 2016 38
– Let t be the number of values x,x’,x’’… we need to look at before finding the first pair x,x’ s.t. h(x)=h(x’) – What is probability of collision for each pair x,x’? – How many pairs would we need to look at before finding the first collision? – How many pairs x,x’ total? – What is t, the number of values we need to look at?
10/26/16 CSE 484 / CSE M 584 - Fall 2016 39
10/26/16 CSE 484 / CSE M 584 - Fall 2016 40
10/26/16 CSE 484 / CSE M 584 - Fall 2016 41
10/26/16 CSE 484 / CSE M 584 - Fall 2016 42
10/26/16 CSE 484 / CSE M 584 - Fall 2016 43