Modify the code to terminate the connection

Assignment Help JAVA Programming
Reference no: EM132260711

Assignment: Encrypted Communication

Background: The goal of this assignment is to give you practical experience in using cryptographic libraries to implement encryption functionality in your code, especially in regard to data in transit i.e. network communications.

To this end you are provided with two pieces of code (Server.java and Client.java) written in the Java programming language. The code implements a simple socket communication program that enables two machines (a client and a server) to make a connection to each other and send messages.

Your objective in carrying out this assignment will be to modify the code to achieve the following:

• Unlimited communication between the client and the server

• Termination of the connection when a specific message is sent from the client to the server

• Encryption of the communication between the client and the server using any encryption technique

Instructions: 1. You will find attached the two pieces of Java programming language code that implement the socket program (One for the client side and the other for the server side).

2. You can run the program on any platform that works for you (I would suggest using Ubuntu Linux). After compiling the code, you have to assign a port number (example; Port number = 5000, you can use any port number between 2000 and 65535) to the server when putting in the command to run it. i.e.

java Server 5000

On the client side, you need the host name or IP address of the machine on which the server is running (if the host name or IP address is X) to run the client and connect to the server

java client X 5000

If you are running both programs on the same machine, the host name of the server will be localhost

java client localhost 5000

NOTE: A tutorial will be given to explain the details of the program and demonstrate how to compile and run the code. Please endeavor to attend the tutorial

3. The connection between the client and server closes after one message is sent, modify the codes such that multiple messages can be sent between both sides without termination.

4. Modify the code to terminate the connection when the client sends the message "End Session" to the server.

5. Modify the code such that communication between both the client and server is encrypted

6. During the communication the terminal should display the messages received both before decryption and after decryption

NOTE: Implement any encryption technique you've learnt so far and use any Java language cryptographic library of your choice, preferably the one you identified in your previous assignment.

Information related to above question is enclosed below:

Attachment:- Code.rar

Reference no: EM132260711

Questions Cloud

Why did you include or exclude data from the research : The assignment is designed to assist with documenting your research. Since, you are entering the data collection and analysis phase of the research.
What is the difference between problem and symptom : With reference to IT as a tool for ‘controlling’ in organizational management, what is the difference between a ‘problem’ and ‘symptom’?
Analyze the internationalization strategy : Analyze the internationalization strategy and/or market strategy pursued by automobiles using Yips model.
Cylindrical part that can be made on screw machine : As a new engineer you designed a cylindrical part that can be made on a screw machine.
Modify the code to terminate the connection : Modify the code to terminate the connection when the client sends the message "End Session" to the server. Modify the code such that communication.
Separating juveniles from their families and communities : What do you think about our current system of separating juveniles from their families and communities?
Flat organization is the same as short organization : Mission and vision statements are the same and should be included in a business plan. A flat organization is the same as a short organization.
Develop classes with the instance variables and methods : Develop three classes with the instance variables and methods - develop the Television and RemoteControl classes. You will demonstrate their functionality
The civil rights act was signed into law : The Civil Rights Act was signed into law in 1964 during the decade commonly referred to as the human rights decade.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program that asks for number of ticket to purchase

Write a program that asks for the number of ticket to purchase. Then calculate and display the amount of the discount (if any) and the total purchase price.

  Write a statement to output the volume of the blue box

Write the statement to instantiate an Box object, blueBox, with a length of 6, width of 4, and height of 2. Write a statement to output the volume of the blue box

  Determine the purpose of using javascriptreg on a website

what is the purpose of using javascriptreg on a website? what is a specific example of a javascriptreg application that

  Write a program to compute sinx

Write a program to compute sinx for given x. The user should supply x and a positive integer n. We compute the sine of x using the series and the computation should use all terms in the series up through the term involving xn

  Write a comparator class that compares products by price

Write a comparator class that compares Products by price. Declare a priority queue that uses the comparator class in number 3 to compare Products.

  Java program ask user to enter 10-character telephone number

Write a Java program that asks the user to enter a 10-character telephone number in the format XXX-XXX-XXXX. The program should display the telephone number with any alphabetic characters

  Finalize() method invoked by the garbage collector

Under what conditions is an object's finalize() method invoked by the garbage collector?

  Project detailsyou will explore basic socket programming

project detailsyou will explore basic socket programming threading and gui design using javas network library threading

  Write a pre-condition and post-condition for this method

Consider the partial Java interface for the BagCQS ADT given in the Supplement. Note that this interface conforms to the principle of Command Query Separation.

  Write a program in java for the deque data structure

Write a program in Java for the deque data structure. All the above operations should take O(1) time per operation.

  Algorithm that preprocesses the input array

Given an array of n integers numbers (with possible duplicates) in range [1..k] - Implement in Java an algorithm that preprocesses the input array

  What is value of returnvalue after given code has executed

What is the value of returnValue after the following code has been executed?x = "150";y = "100";returnValue= x - y; Which of the following uses correct syntax to receive a value stored in totalCost?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd