Starting from:

$30

CSCI3171-Assignment 3 Solved

Exercise 1: The objective of this exercise is to implement a Client-Server application that exchanges messages that are encrypted using Caesar cipher. It focuses on developing Client-Server applications using Java socket programming.

a. Go to Brightspace -> Content -> Modules -> Module 3 -> Module 3-Part 5.
    Download two files.                     
•       EchoServer.java
•       EchoClient.java

 

b. Caesar cipher is a simple alphabetic cipher that shifts the letters of the alphabet by k letters to the right where k is the “secret” key known only to the sender and the receiver. For example, if k = 3, the word “Java” will be encoded as “Mdyd”. As another example, “ZEBRA” will be encrypted as “CHEUD” (notice that we wraparound to the beginning of the alphabet from Z).

3
c.You are to write a client-server program in which the communication starts by the client asking the server for the key. A key (an integer between 1 and 25) is randomly generated by the server and sent to the client. (In practice, keys are transferred using a secure protocol, but for now to keep it simple we will just transfer the key in plain text). Then every message that is sent from the client to the server must be encrypted using this key. Again, for the sake of simplicity, assume that only uppercase and lowercase letters are transmitted (no numbers or special characters). The message must be decrypted by the server and displayed. When the client enters “Bye”, the connection terminates.

 

d. Provide three test cases for your program and take a screenshot of each test case. An example of the three test cases is shown below.  

 

Exercise 2:  Now that you have seen how a simple encryption algorithm works,  in this exercise you will conduct the wireshark analysis of a secure application layer protocol, SSH (Secure Shell).  

a. Start Wireshark capture.

b. Connect to the timberlea.cs.dal.ca server using SSH from your terminal window.
For this you would open a command window/Terminal, enter ssh -l <your CS username> timberlea.cs.dal.ca and enter your CS password. Then log out. Stop Wireshark capture.

c. Set the filter to ssh and provide a screen capture of the Wireshark interaction.

d.  Identify and report some of the important SSH protocol messages.

e. Show the content of one encrypted packet.

f. Set the filter to tcp.port==<your client port number> and provide a screen capture of the Wireshark interaction.

 

g. Identify the TCP SYN, SYN-ACK and ACK segments and the FIN-ACK and ACK segments before the start of the SSH session and the end of the SSH session, respectively

More products