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 python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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