Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 2.2: Private Key Cryptography II CS 436/636/736 Spring 2012 Nitesh Saxena.

Similar presentations


Presentation on theme: "Lecture 2.2: Private Key Cryptography II CS 436/636/736 Spring 2012 Nitesh Saxena."— Presentation transcript:

1 Lecture 2.2: Private Key Cryptography II CS 436/636/736 Spring 2012 Nitesh Saxena

2 Today’s fun/informative bit – The Smudge Attack See: http://www.usenix.org/event/woot10/tech/full_papers/Aviv.pdfhttp://www.usenix.org/event/woot10/tech/full_papers/Aviv.pdf 7/3/2015 Lecture 2.2 - Private Key Cryptography II 2

3 Course Administration TA/Grader: Eric Frees – Email: efrees@uab.eduefrees@uab.edu – Office hours: 2-4pm on Wednesdays, Ugrad lab (CH 154) 7/3/2015 Lecture 2.2 - Private Key Cryptography II 3

4 Outline of today’s lecture Block Ciphers Data Encryption Standard (DES) 7/3/2015 Lecture 2.2 - Private Key Cryptography II 4

5 Block Ciphers and Stream Ciphers Block ciphers partition plaintext into blocks and encrypt each block independently (with the same key) to produce ciphertext blocks. A stream cipher generates a keystream and encrypts by combining the keystream with the plaintext, usually with the bitwise XOR operation. We will focus mostly on Block Ciphers 7/3/2015 Lecture 2.2 - Private Key Cryptography II 5

6 DES – Data Encryption Standard Encrypts by series of substitution and transpositions. Based on Feistel Structure Worldwide standard for more than 20 years. Designed by IBM (Lucifer) with later help (interference?) from NSA. No longer considered secure for highly sensitive applications. Replacement standard AES (advanced encryption standard) recently completed. 7/3/2015 Lecture 2.2 - Private Key Cryptography II 6

7 DES – Overview (Block Operation) 7/3/2015 Lecture 2.2 - Private Key Cryptography II 7

8 DES – Each Round 7/3/20158

9 DES – Function F 7/3/2015 Lecture 2.2 - Private Key Cryptography II 9

10 DES – Key Schedule (KS) 7/3/2015 Lecture 2.2 - Private Key Cryptography II 10

11 Operation Tables of DES: Key Schedule, PC-1, PC-2 7/3/2015 Lecture 2.2 - Private Key Cryptography II 11

12 Operation Tables (IP, IP -1, E and P) 7/3/2015 Lecture 2.2 - Private Key Cryptography II 12

13 S-boxes: S1 (as an example) 0000000100100011010001010110011110001001101010111100110111101111 00 01 10 11 7/3/2015 Lecture 2.2 - Private Key Cryptography II 13 Is the table entry from

14 DES Decryption Same as the encryption algorithm with the “reversed” key schedule – NEXT! 7/3/2015 Lecture 2.2 - Private Key Cryptography II 14

15 Plain text Initial permutation (IP) Round-1 (key K 1 ) Round-16 (key K 16 ) swap IP inverse Cipher text Rounds 2-15 7/3/201515

16 IP inverse Cipher text IP Round-1 (K 16 ) = Since encrypt decrypt 7/3/2015 Lecture 2.2 - Private Key Cryptography II 16

17 DES Example 7/3/2015 Lecture 2.2 - Private Key Cryptography II 17 We choose a random plaintext block and a random key, and determine what the ciphertext block would be (all in hexadecimal):

18 Example (contd) -- encryption 7/3/2015 Lecture 2.2 - Private Key Cryptography II 18

19 Example (contd) -- decryption 7/3/2015 Lecture 2.2 - Private Key Cryptography II 19 Let us see how Bob, at the destination, can decipher the ciphertext received from Alice using the same key. Table 6.16 shows some interesting points.

20 DES Security: Avalanche Effect 7/3/2015 Lecture 2.2 - Private Key Cryptography II 20

21 DES Security S-Box design not well understood Has survived some recent sophisticated attacks (differential cryptanalysis) Key is too short. Hence is vulnerable to brute force attack. 1998 distributed attack took 3 months. $1,000,000 machine will crack DES in 35 minutes – 1997 estimate. $10,000 – 2.5 days. 7/3/2015 Lecture 2.2 - Private Key Cryptography II 21

22 DES Cracking machine 7/3/2015 Lecture 2.2 - Private Key Cryptography II 22

23 Super-encryption. If key length is a concern, then instead of encrypting once, encrypt twice!! C = E K2 (E K1 (P)) P = D K2 (D K1 (C)) Does this result in a larger key space? Encrypting with multiple keys is known as super-encryption. May not always be a good idea 7/3/2015 Lecture 2.2 - Private Key Cryptography II 23

24 Double DES Double DES is almost as easy to break as single DES (Needs more memory though)! 7/3/2015 Lecture 2.2 - Private Key Cryptography II 24

25 Double DES – Meet-in-the-middle Attack (due to Diffie-Hellman) Based on the observation that, if C = E K2 (E K1 (P)) Then X = E K1 (P) = D K2 (C). Given a known (P, C) pair, encrypt P with all possible values of K and store result in table T. Next, decrypt C with all possible keys K and check result. If match occurs then check key pair with new known (P, C) pair. If match occurs, you have found the keys. Else continue as before. Process will terminate successfully. 7/3/2015 Lecture 2.2 - Private Key Cryptography II 25

26 Meet-in-the-middle Explanation The first match does not say anything as we have 2 64 ciphertexts and 2 112 keys. On the average 2 112 / 2 64 = 2 48 keys will produce same ciphertext. So there could be 2 48 possible candidates We can use a second pair (P’,C’) So, probability that false alarm will survive two known (P, C) pairs is 2 48 / 2 64 = 2 -16. One can always check a third pair to further reduce the chance of a false alarm. 7/3/2015 Lecture 2.2 - Private Key Cryptography II 26

27 Triple DES 27 Triple DES (2 keys) requires 2 112 search. Is reasonably secure. Triple DES (3 keys) requires 2 112 as well Which one is better?

28 Some Questions Double encryption in DES increases the key space size from 2^56 to 2^112 – true or false? Is known-plaintext an active or a passive attack? Is chosen-ciphertext attack an active or a passive attack? Reverse Engineering is applied to what design of systems – open or closed? Alice needs to send a 64-bit long top-secret letter to Bob. Which of the ciphers that we studied today should she use? 7/3/2015 Lecture 2.2 - Private Key Cryptography II 28

29 Further Reading Chapter 7.4 of HAC Chapter 3 of Stallings 7/3/2015 Lecture 2.2 - Private Key Cryptography II 29


Download ppt "Lecture 2.2: Private Key Cryptography II CS 436/636/736 Spring 2012 Nitesh Saxena."

Similar presentations


Ads by Google