Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Network & Security Expert

Write (Java or C/C++) UDP programs allowing two parties to establish a secure communication channel. For simplicity, let us call the programs “Host” and “Client”, which are executed by Alice and Bob, respectively. 

Alice and Bob share a common password PW which contains 6 numeric characters. They want to establish a secure communication channel that can provide data confidentiality and integrity. They aim to achieve this goal via the following steps: (1) use the password to establish a shared session key; (2) use the shared key to secure the communication. 

Step 1 is done via the following key exchange protocol: 

1: A ? B: EPW(KA) 

2: B ? A: EPW (KB) 

Alice and Bob then compute the shared key as K = Hash(KA||KB). KA and KB are both 64-bit random binary strings, and || denotes string concatenation. Alice and Bob decide to use RC4 as the encryption function, and SHA-1 as the Hash function. 

After establishing the session key, step 2 is achieved as follows: 

1. Whenever Alice wants to send a message M to Bob, Alice first computes H = Hash(K||M), and then computes C = EK(M||H) and sends C to Bob. 

2. Upon receiving a ciphertext C, Bob first runs the decryption algorithm to obtain M||H = DK(C). After that, Bob computes H’ = Hash(K||M) and checks if H = H’. If the equation holds, then Bob accepts M; otherwise, Bob rejects the ciphertext. 

3. The same operations are performed when Bob sends a message to Alice. 

Implementation guidelines 

• Place Host and Client in two separate directories: Alice and Bob. The shared password is located in a file under each directory. 

• Alice executes Host. 

- Host is running and listening to the opened port (you need to select a port for your code). 

•Bob executes Client. 

- Client (Bob) sends a connection request to Host. 

- Client is ready and listens to the port. 

•Host generates a random KA, encrypts it using RC4, and sends the ciphertext to Client. 

• Upon receiving the message from the Host, Client decrypts the message to obtain KA, randomly chooses KB, encrypts it and sends the ciphertext to Host. Client then computes the shared key K based on KA and KB. 

• Upon receiving the message from Client, Host performs the decryption to obtain KB and then computes the shared key K. 

• Now, the secure channel is established. 

- Either Alice or Bob can send a message encrypted and authenticated by the key K. They type the 

message on their own terminal. The message is processed by their code (Host or Client) according to 

the step 2 description given above. 

- The received message is printed on the screen if decryption is successful. Otherwise, print

“decryption error” on the screen. 

- To quit the program, the client should type “exit”. 

Coding requirement: 

You need to write two programs: Host and Client. You should name your programs: host.c or host.cpp or 

host.java and client.c or client.cpp or client.java. 

How to run? 

Your programs should run according to the protocol. Host and Client should be executed on different windows. For convenience of marking, please use the local IP: 127.0.0.1 for the submitted version. For simplicity, there is no GUI required in this assignment. That is, messages are simply typed on the window and printed on the receiver’s window. The looping should continue until the moment the user types “exit” to exit.

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M91052922
  • Price:- $65

Priced at Now at $65, Verified Solution

Have any Question?


Related Questions in Computer Network & Security

Metasoft ltd is a software development company which works

MetaSoft Ltd is a software development company which works across Australia and New Zealand. The company is considering the following strategic proposal: - They plan to close down the Melbourne data centre rather than up ...

True or false1 tcp ensures error free transmission2 the

TRUE or FALSE 1. TCP ensures error free transmission. 2. The process that initiates the communication is the server. 3. A host can serve as both server and client in a P2P network. 4. Audio and video applications cannot ...

Question for the remaining questions consider a 4-bit block

Question : For the remaining questions, consider a 4-bit block cipher, described in hexadecimal by the following table: Plaintext Ciphertext Plaintext Ciphertext 0 a 8 e 1 c 9 d 2 f a 0 3 6 b 7 4 3 c 5 5 8 d b 6 4 e 9 7 ...

Assignment descriptionproject scope a typical network

Assignment Description Project Scope: A typical network layout diagram of a firm is given below for illustrative purposes only. The service requirements are enclosed. Figure. Network layout of a firm Service requirements ...

Assignment -need project made by packet truce follow the

Assignment - Need project made by packet Truce. Follow the given report and please don't make the project big and video will describe full project in details and with configuration. Project - Design and Implementation of ...

If a router is attached to a network with a base ip address

If a router is attached to a network with a base IP address of 198.10.0.0/20 and receives a packet addressed to 198.10.10.144, answer the following questions: a. What is the network mask used by the router? (in dotted de ...

If a firms total cost function is given byt c

If a firm's total cost function is given byT C= 115,000Q-500Q2+Q3, what range of output does the firm have economies of scale?

Part auniversity of neverland offers more than 300

Part A University of Neverland offers more than 300 undergraduate programs. The Bachelor of Dreams is one of the highly regarded program offered by the University. The University tries to improve all its programs by intr ...

Task1 in each of the following scenarios there is a

Task 1. In each of the following scenarios there is a relationship to work life in the IT industry. With each of the following question, ensure that your answer includes the explanation of how it would be applied to work ...

Assessment - network analysis using wiresharkpurpose of the

Assessment - Network Analysis using Wireshark Purpose of the assessment (with ULO Mapping) This assignment is designed to develop deeper analytical understanding of different distributed network conditions. At the comple ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As