Using the encryption and decryption methods, write a program called SDESMitm.java or sdesmitm.py that will carry out a meet-in-the-middle attack on 2SDES. This system encrypts a plaintext first with one key and then again with a different key. Please review the attack in the notes and the textbook. Recall that this is a known-plaintext attack. I will provide plaintext/ciphertext pairs. Based on those, you should be able to recover the two 9-bit keys. Write the program so that it can be run from the command line taking four parameters: plaintext 1 integer ciphertext 1 integer plaintext 2 integer ciphertext 2 integer Two pairs are needed because the first plaintext/ciphertext pair will let you create a short list of key pairs and the second plaintext/ciphertext pair will allow you to narrow that list down to one key pair. When run, the program should print the two keys.   You can test your program on the plaintext/ciphertext pairs 0/247; 4095/2808. In my implemenation, the firat plaintext/ciphertext pair yields a list containing 51 key pairs. The second plaintext/ciphertext pair yields a list of 62 key pairs. These two key pair lists have one pair in common. Warning! Your program must use intelligent data structures! Use a hash map for the first list so that, as you create the second list, you can look up the values quickly. Any solution that performs linear searches on the first list or (worse) produces two lists and then uses linear searches to find matches will lose a lot of points. Needless to add that there should not be any nested loops.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Using the encryption and decryption methods, write a program called SDESMitm.java or sdesmitm.py that will carry out a meet-in-the-middle attack on 2SDES. This system encrypts a plaintext first with one key and then again with a different key. Please review the attack in the notes and the textbook. Recall that this is a known-plaintext attack. I will provide plaintext/ciphertext pairs. Based on those, you should be able to recover the two 9-bit keys.

Write the program so that it can be run from the command line taking four parameters:

  1. plaintext 1 integer
  2. ciphertext 1 integer
  3. plaintext 2 integer
  4. ciphertext 2 integer

Two pairs are needed because the first plaintext/ciphertext pair will let you create a short list of key pairs and the second plaintext/ciphertext pair will allow you to narrow that list down to one key pair. When run, the program should print the two keys.

 

You can test your program on the plaintext/ciphertext pairs 0/247; 4095/2808. In my implemenation, the firat plaintext/ciphertext pair yields a list containing 51 key pairs. The second plaintext/ciphertext pair yields a list of 62 key pairs. These two key pair lists have one pair in common.

Warning! Your program must use intelligent data structures! Use a hash map for the first list so that, as you create the second list, you can look up the values quickly. Any solution that performs linear searches on the first list or (worse) produces two lists and then uses linear searches to find matches will lose a lot of points. Needless to add that there should not be any nested loops.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY