Diffie-hellman will be used

Assignment Help Python Programming
Reference no: EM133390158

Implement Simulation of TLS

In this assignment, the task is to implement a simulation of TLS in any coding language of your choice, including the two key exchange methods (RSA and Diffie-Hellman). The implementation is only a simulation of what happens in real-life. You can use variables, classes, methods to represent the operations done by the client and the server. No actual deployment of websites is necessary.

The TLS handshake required to be implemented will proceed as follows.

1- The client generates a nonce of size 32 bytes. You may use an existing random number generator or library for this step. The client sends the nonce to the server along with a flag that is set to 1 if RSA will be used for key exchange, and set to zero if Diffie-Hellman will be used. You may randomly set this flag.

2- The server responds with another nonce of size 32 bytes and a flag indicating the choice of key exchange algorithm. You may randomly generate the nonce as in Step 1 and randomly generate the choice of key exchange algorithm as well.

3- The server randomly generates a pair of RSA public/private keys and sends to the client {public key, hash(public key)}. This constitutes the certificate. You may use libraries for key generation and hashing.

4- Upon receiving this certificate, the client re-hashes the public key and compares with the hash that is sent. If they match the client proceeds to Step 5. Otherwise, the process ends here with an error message.

5- The client proceeds with exchanging the pre-master secret (PS) depending on whether RSA or Diffie-Hellman were chosen in Step 2. The details of this step are in the lecture slides. You may use libraries to generate all keys and calculate all RSA/Diffie-Hellman values in this step.

6- Once both sides calculate PS, they use it along with the first two nonces as a seed to a pseudorandom number generator to generate the 4 communication keys. You are free to implement this step in any way using libraries. Let's call the 4 keys {CC, IC, CS, IS}, representing the encryption key of the client, CC, the MAC key of the client, IC, the encryption key of the server CS, and the MAC key of the server, IS.

7- The client the sends the server hash(nonce_client, nonce_server, premaster secret, CC, IC). The server sends to the client hash(nonce_client, nonce_server, premaster secret, CS, IS). Each side will verify the values they received and print either a success or failure message.

Note that to simulate the process of sending anything between two entities, you may just assume that the values being sent (for example if you code them as variables) become available at the receiving side. This can be simulated for example by passing parameters to a method or function or simply just using the variables in the sequence of operations. No actual communication (for example using socket programming or otherwise) is required.

Reference no: EM133390158

Questions Cloud

How do you know you are getting there : How do you know you are getting there? Controls should discuss what exactly will be measured (and how this will be measured), how often, by whom and how much
Provide social media consulting : Provide social media consulting. You own a Social Media consulting company, and your company has been selected to work with a new Saudi B2C organization
Analyze the companys approach to each of the three types : Wrap up your paper with a strong, one-paragraph conclusion that summarizes your key findings vis-à-vis the three types of media and how they fit
How can social entrepreneurs such as the founders of panada : How can social entrepreneurs such as the founders of Panada Sunglasses use their companies' social missions to attract customers and promote their business
Diffie-hellman will be used : What happens in real-life. You can use variables, classes, methods to represent the operations done by the client and the server
Ideas and recommendations for the effective operation : Develop your own ideas and recommendations for the effective operation of the organization. Students are required to write, and present, an individual essay
Organization analysis and strategic recommendations : Organization Analysis and Strategic Recommendations - prepare a slide deck containing your analysis and recommendations that could be presented
Define what a theoretical orientation is : Define what a theoretical orientation is. Report the three theories that you matched most closely to and explain whether you think the assessment
Show the committee your motivation : Statement only you can write. It usually responds to some kind of prompt, though the prompts are often intentionally vague

Reviews

Write a Review

Python Programming Questions & Answers

  Write a program that has a conversation with the user

Assignment - Write a program that has a conversation with the user. The program must ask for both strings and numbers as input

  Display the stripped phone number

Ask the user to enter the 4-digit code of an orange. Strip all the leading and trailing whitespace characters from the code. Display the stripped phone number.

  Program that asks the user to enter a students name

The program should output the students name, a letter grade for each assignment score, and cumulative average for all the assignments

  Find the number of vowels in the string

Using list and one definition for find the Number of vowels in the String.

  Write a class for working with fractions

Write a class for working with fractions. You may not use any floating point calculations in the fraction class, nor in the main task

  Draw the letters xyz with straight lines using python code

Generate a Python program that uses Turtle Graphics to draw the letters "XYZ" with straight lines. Size and location somewhere reasonably in the middle.

  Write a computer program that stores and tracks information

Write a computer program that stores and tracks information about US voters. There are four pieces of information that will need to be captured.

  Find all such numbers between 1000 and 3000 both included

Write a program, which will find all such numbers between 1000 and 3000 both included such that each digit of the number is an even number.

  Topic of effective and ethical communication

Design an algorithm and use it to write a Python program that reads the contents of the data file into a list. The program should then loop, to allow a user to check various numbers against those stored in the list.

  Design data pipeline assessment

Identify best practices in data collection and storage, including data security and privacy principles; and Effectively report and communicate findings

  Calculate bmi amd determine a person has high blood pressure

Calculate BMI-Body Mass Index and determine whether a person has high blood pressure. To calculate BMI, the user must enter his height in inches and weight.

  Write a program to receive a series of numbers

Write a program to receive a series of numbers (including decimal) from the user until enter key is pressed. Process the input data and display number count, sum and average. Use proper data type and format.

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