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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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