
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.

Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

- By the end of this lab, you will have acquired a better understanding of SMTP protocol. You will also gain experience in implementing a standard protocol using Python. Your task is to develop a simple mail client that sends email to any recipient. Your client will need to connect to a mail server, dialogue with the mail server using the SMTP protocol, and send an email message to the mail server. Python provides a module, called smtplib, which has built-in methods to send mail using SMTP protocol. However, you will not be using this module in this lab, because it hides the details of SMTP and socket programming. In order to limit spam, some mail servers do not accept TCP connections from arbitrary sources. For the experiment described below, you may want to try connecting both to your university mail server and to a popular Webmail server, such as an AOL mail server. To connect to the university mail server, you will need to use NYU’s VPN. You may also try making your connection…arrow_forwardGive a scenario in which one of the four different methods of access control may be used. If there are other options out there, why should I choose this one?arrow_forwardStuck need help! The class I'm taking is computer science discrete structures. Problem is attached. please view attachment before answering. Really struggling with this concept. Thank you so much.arrow_forward
- Solving this problem in the Java languagearrow_forwardWrite a program that uses a brute force technique to find the longest common substring. Use the Timing class to compare the brute force method with the dynamic programming method.arrow_forwardSuppose a programmer is functionally decomposing a two-factor authentication process. Which step requires further decomposition before it can become a step in an algorithm? a Prompt for user ID. Ob. Prompt for password Generate a one-time PIN Od Valdate that user ID and password matcharrow_forward
- use python pleasearrow_forwardWrite a JavaFX Program to locate ATM. Get the current city name and bank name. Search the database and give the list of ATM centers in the current city of that bank.arrow_forwardDeduce a Java program for the concept of Mutual Exclusion by using the following options. ▪ Synchronized method. ▪ Synchronized block. ▪ Static Synchronizationarrow_forward
- New JAVA Code can only be added to the Order.java files after line 17. Lines 1-17 can NOT be changed in any way.arrow_forwardPYTHON!!!!! Write a script that decrypts a message coded by the method used in Project 6 Method used in project 6: Add 1 to each character’s numeric ASCII value. Convert it to a bit string. Shift the bits of this string one place to the left. A single-space character in the encrypted string separates the resulting bit strings. An example of the program input and output is shown below: Enter the coded text: 0010011 1001101 1011011 1011011 1100001 000011 1110001 1100001 1100111 1011011 1001011 000101 Hello world! Program produces correct output given input: Test case: Test 1 Input: 0010011 1001101 1011011 1011011 1100001 000011 1110001 1100001 1100111 1011011 1001011 000101 Results: Hello world! Test case: Test 2 Input: 0101001 1000101 1110101 000011 010001 1110001 1010011 1000101 1101011 010001 000011 1000101 1010001 1000101 1010101 1011111 011111 Results: Say 'what' again. Test case: Test 3 Input: 0110001 1010011 1000101 1101011 000011…arrow_forwardWhich statement is true of phishing? a. It involves monitoring and recording keystrokes. b. It prevents the disclosure of information to anyone not authorized to access it. c. It involves sending fraudulent e-mails that seem to come from legitimate sources. d. It consists of self-propagating program code triggered by a specified time or event.arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





