Reference no: EM132080186
You need help writing a java program for the Diffie-Hellmann Key Exchange. The program needs only 1 input from the user where it takes a 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 Dife-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. An example of how the code's output should look upon execution is below:
>> 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 Dife-Hellman protocol, their values and the shared key value can be very different during each execution.
How many should the company produce to maximize
: If the price on the competitive market for a bunny this size is $7.00, how many should the company produce to maximize its profit? bunnies
|
Price in dollars and q is the quantity
: If P is the price in dollars and q is the quantity, demand for a product is given by
|
Write a code for an arduino and servo motor
: You need help writing a code for an arduino and servo motor. You need the servo motor to rotate 180* after pressing a button.
|
Injection of the drug
: The quantity of a drug, Q mg, present in the body t hours after the injection of the drug is given is
|
A java program for the diffie-hellmann key exchange
: Compute and print the values of p, the generator g, random numbers a,b Z* p, and other intermediate results computed in the Dife-Hellman protocol.
|
Draw the bracket shown including centre
: ENGINEERING DESIGN - COMPUTER-BASED TECHNOLOGY - BASIC DRAWING - Draw the bracket shown below including centre lines but not the dimensions
|
Write the equation of an ellipse centered at the origin
: Steps to solve the following problem. Write the equation of an ellipse centered at the origin with foci at (0, -3) and (0, 3) and a major axis of 10.
|
Write an application that counts by three
: Write an application that counts by three from 3 through 300 inclusive, and that starts a new line after every multiple of 30.
|
Compare the word with the string and call itself to read
: In the main program, close your file and report whether there is a match and how many characters are in the file.
|