Compute and print the values of p

Assignment Help Computer Engineering
Reference no: EM132080175

What need to be Implemented The first step for you is to understand the steps involved in the Diffie-Hellman key exchange protocol. You need to implement a program as follows (a). Your program should take the size of the prime number p (in bits) as an argument during execution.

Based on the size of p, your program should be able to compute and print the values of p, the generator g, random numbers a, b ? Z * p , and other intermediate results computed in the Diffie-Hellman protocol.

Note that the values of p, g, a, and b have to be generated randomly by your program based on the input argument.

Your program should finally output the shared key generated. (b). Suppose your program name is Assignment2.java.

Here is a sample case of what your code is expected to output upon its execution >> java Assignment 5

The value of p selected: 23

The value of g selected: 5

The value of a selected by Alice: 6

The value of b selected by Bob: 15

The value of A sent to Bob by Alice: 8

The value of B sent to Alice by Bob: 19

The value of key shared between Alice and Bob: 2

In the above scenario, the program takes 5 as input meaning that the size of p should be 5 bits (i.e., the value of p should be selected in the range (16, 31]). Note that since the values of p, g, a, b are assumed to be generated randomly as per the Diffie-Hellman protocol, their values and the shared key value can be very different during each execution.

Please note that you can use any programming language (C, C++, Java, etc.) to implement this assignment as per your convenience.

However, it is your responsibility to check whether the programming language you select supports proper crypto libraries that you may want to use in your program. C, C++, JAVA and many other programming languages provide support for various crypto libraries which you can directly use to compute generators and random numbers in a group.

Also, note that your program should be able to handle large numbers (for example of size 1024 bits), therefore, you have to use large-number arithmetic built-in libraries depending on the language used.

Reference no: EM132080175

Questions Cloud

What height is the mass when it is first released : A mass attached to a spring is at a height given by h(t) = 3 - ( 2 sin(t) / 1 + t^ 2)
Need an introduction about project integration simulations : Need an introduction about project integration simulations for a software company lullnet corp. localisation of 3 languages to the international market.
What area of lawn receives? water : A water sprinkler sprays water over a distance of 38 feet while rotating through an angle of 130°.
What are the basic properties that a line can have : ENGINEERING DESIGN - COMPUTER-BASED TECHNOLOGY - INTRODUCTION TO CAD AND AUTOCAD - Teesside University - What are the basic properties that a line can have
Compute and print the values of p : What need to be Implemented The first step for you is to understand the steps involved in the Diffie-Hellman key exchange protocol.
Write a javascript program with the following functions : You need some help on writing a JavaScript program with the following functions Displaythe current date and time in appropriate format.
Write a program which asks the user for an integer : Write a program which asks the user for an integer and then prints the following patterns based on that integer.
Prepare a java code to show a multiplication table : A multiplication table is printed out for a range of positive numbers. The user is prompted to start with a number for example 2.
Relationships that may exists between stakeholders : By using the information above, draw an appropriate ER diagram showing this information, make sure you show suitable relationships that may exists between stake

Reviews

Write a Review

Computer Engineering Questions & Answers

  Make a list of 10 specific concerns which a consumer might

during the first wave of electronic commerce many established banks opened online branches and a considerable number of

  How an operational plan has been developed

The paper should focus on either strategic planning or operational planning. Some individuals are high enough in their organization to be able to engage.

  Discuss a computer system configuration

Give clearly defined examples of two objects in a computer system configuration whose security level could change during the process of execution

  Develop an outline of the project plan for the testing

As part of the disaster recovery planning at a medium-sized business, you have been asked to develop a project plan to test the backups of production systems.

  What emerging security threats will have a profound effect

What emerging security threats will have a profound effect on both organizations and/or home environments in the near future

  Devise a sequence to recursively examine all ordinary files

Devise a sequence to recursively examine all ordinary files in the current directory and display their total space usage.

  Write a client that removes all negative numbers from stack

Write a client that removes all negative numbers from a stack of int objects. If the original stack contained the integers 30, -15, 20, -25 (top of stack).

  What privacy issues might be a concern with bank records

ow do you plan to acquire the data? What privacy issues might be a concern with bank records (bank account numbers, customer names, etc.)?

  Write a paper about strategic importance of cloud computing

Write a paper about Strategic importance of cloud computing in business organizations. 2000 words deductions for above or below word count.

  You are a consultant for being brought in by xumuc to

you are a consultant for being brought in by xumuc to assist with a merger with another company.backgroundxumuc is has

  Create a function that pulls a picture from a url

Create a function that pulls a picture from a URL and creates a thumbnail saved on your local machine.

  In short define asynchronous communications

express packet switching and the benefits of packet switching. What are examples of packet switching networks.

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