Udp programs allowing two parties to establish a secure

Assignment Help Computer Network Security
Reference no: EM13515804

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.

Reference no: EM13515804

Questions Cloud

Find out the moles of precipitate which the molarity of ion : 100.0 mL of 0.400 M CoCl2(aq) is mixed with 100.0 mL of 1.600 M NaOH. Determine the moles of precipitate which form, and the molarity of each ion (including spectator ions) after the precipitation process is complete.
Evaluate the potential problems that can exist when : Evaluate the potential problems that can exist when comparability of asset conditions cannot be made within an agency and with other agencies. Suggest how these problems may be minimized
Find how much force does the block exert on bottom of tank : A 6.0kg block of aluminum sits on the bottom of a tank of water. How much force does the block exert on the bottom of the tank
What will the volume of the swim bladder be : We've seen that fish can control their buoyancy through the use of a swim bladder, a gas-filled organ inside the body. What will the volume of the swim bladder be if the fish ascends to a 42ft depth without changing the quantity of gas
Udp programs allowing two parties to establish a secure : 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
Compute the new marginal cost and average cost : Edward the entrepreneur takes 2 hours to cut a lawn, and he cuts 1,000 lawns per year. He uses solar-powered equipment (truck and mover) that will last forever
What is the force of his foot on the block : A human sprinter of mass 65kg starts a run at the maximum possible acceleration, pushing backward against a block set in the track
Explain chlorohydrin formation conditions : A racemic product mixture is produced when (Z)-4-ethyl-4-octene is subjected to chlorohydrin formation conditions (Cl2, H2O). Draw both of the enantiomers that are formed.
Calculate how far does it run : A horse can maintain a top speed of 20m/s for a long distance but has a maximum acceleration of only 6.0m/s^2. how far does it run, to the nearest 10m

Reviews

Write a Review

Computer Network Security Questions & Answers

  Find time when station c hears the collision

The size of the frame is long enough to guarantee the detection of collision by both stations. Find: The time when station C hears the collision (t3).

  How should organizations respond to security threats your

how should organizations respond to security threats? your response should be at least 200 words in length. you are

  Examine the quick finance company network diagram and

above is the quick finance company network diagram. the company is a small business and does not invest much in

  Define encryption

In a given encryption system where the messages are expressed only as numbers and "e" is an integer.

  Analyse security procedures

Analyse security procedures

  Certification and accreditation for commercial systems

Using Network Security Certification and Accreditation for commercial systems. Do you think a formal process like Certification & Accreditation is appropriate to use for commercial systems in private industry (Why or Why Not)?

  Which will encrypt each users data in a file

Acme Inc. is developing the next generation financial tracking program, and Alice has been given the task of writing the encryption component, which will encrypt each user's data in a file on the hard drive.

  Potential threats to a bank using mobile technology

Your goal is to identify the potential threats to a bank using mobile technology and rank them in terms of risk. To calculate risk, you will need to rank each threat in terms of severity and likelihood- ITECH3215-7215

  Cryptosystem

Block cipher, Primitive root, Confusion, Diffusion, Digital signature, Conventional Symmetric-Key Encryption

  Technical versus soft skills

Suppose that there is some consensus with basic premise that most skills can be learnt, which would you expect to be the more productive task,

  What is the decryption function

a). What is the decryption function, b). What is the decrypted plaintext? c). What are some weaknesses of this cipher?

  Targets of security breaches can be larger-smaller companies

Study three recent information security breaches. Do the key targets appear to be larger or smaller companies? Is there particular industry which appears predominately targeted?

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