# DES Attacks and Triple DES Cryptography and Network

• Slides: 8

DES Attacks and Triple DES Cryptography and Network Security Reference: Sec 4. 1 of Stallings Text

DES and Brute Force Attack n Known plaintext attack n n n Plaintext-ciphertext pairs are available Brute force attack involves going through all 256 keys, encrypting the plaintext and matching with the ciphertext SDESCrack 1. java and SDESCrack 2. java are programs that attack Simplified DES n n Brute-force search on all 210 keys Note the necessity of two plaintext-ciphertext pairs

Multiple DES n n Brute-force attack on DES will eventually become possible and practical Multiple applications (multiple keys) of DES increases the key search space for brute-force attacks n e. g. , Double DES means two keys and therefore 2112 possible key-pairs to consider

Double DES n n Encryption: C = Ek 2[Ek 1[P]] Decryption: P = Dk 1[Dk 2[C]] Check out SDES 2. java for a simplified version The following fact is essential: n n n For any two keys k 1 and k 2, it does not follow that a key k 3 exists where Ek 2[Ek 1[P]] = Ek 3[P] A single-key brute-force attack will not work Brute-force attack has two go through all key-pairs (see SDES 2 Crack 1. java & SDES 2 Crack 2. java)

Meet-in-the-Middle Attack n n C = Ek 2[Ek 1[P]] implies X = Ek 1[P] = Dk 2[C] Algorithm: (assume p 1, c 1 and p 2, c 2 are known pairs) n n n Try all 256 possibilities for k 1 and tabulate all Ek 1[p 1] Try all 256 possibilities for k 2, compute for Dk 2[c 1], and compare against the table When values match, check if c 2 = Ek 2[Ek 1[p 2]]

Analysis of Revised Attack on Double DES n n n Takes only twice the amount of time (approx) as brute-force on Regular DES Requires a table of size 256 See SDES 2 MM. java for an attack on Simplified Double DES

Triple DES n n n Meet-in-the-Middle attack does not apply if three DES applications are used Using three keys possible but aggregate length of keys might be undesirable Use two keys instead n n n Reuse a key for first and third application Make second application a decryption operation (for backward compatibility with Regular DES) See SDES 3. java

Programming Homework #2 n n Write an attack program for simplified triple DES (SDES 3. java) Use a combination of the brute-force method and the meet-in-the-middle method (use a table of size 210) to come up with an algorithm that runs in roughly the same amount of time as DES 2 Crack 1. java