Implement the extended euclidean algorithm

Assignment Help JAVA Programming
Reference no: EM131468296

Practical

Objective: Understand Coding, RSA and related issues.

1. Implement the Extended Euclidean Algorithm using C/C++ or Java. The objective is to find the inverse modular for a number. The input is two numbers (a n) and the output is a number b satisfying

ab modn =1

if this number exists. Otherwise present an error information. (Hint: first implement the algorithm of finding the greatest common divisor for two numbers).

2. A smudge has obscured one of the digits of the ISBN code

0-8018-x 073-1.

Determine the unknown digit x.

3. Implement the following prime number test algorithm (Called Lehmann Algorithm) in C/C++ or Java. To test whether a number p is a prime number

Choose a random number a being less than p

- Calculate r = ap-1/2 mod p

- If r is not 1 or -1 then p is definitely not a prime.

- If r=1 or -1 the likelihood that p is not prime is at most than 50 percent.

Repeat this algorithm t times, if the calculation equals to 1 or -1 but does not always equal to 1, then p is probably prime with an error rate of 1 in 1/2t

4. The following is the description of RSA

Public Key

N=pq ( p q are prime numbers but keep secret), e is relative prime to (p-1)(q-1)

Private Key d = e-1mod (p-1)(q-1)

Given message m <n

Encryption c = memod N

Decryption m= Cd mod N

If message m>n, we usually split m into several small blocks with each block less being than n.

In this algorithm, if we given p=47, q=71, e=79, m=682534127893. Solve d using question 1 in this practical and do encryption and decryption for m.

Reference no: EM131468296

Questions Cloud

What form of intrusion-detection software do they use : Visit the IT department of a company and ascertain what hardware they use in their computer system's defense. Do they use a hardware firewall in addition.
Human resource manager of a small firm : Imagine that you are the human resource manager of a small firm. You learn that the monthly premiums for the company's existing health insurance policy.
Employers provide employee beneifts : Why do employers provide employee beneifts, rather than providing all compersation in the from of pay and letting employees buy the services they want?
Research paper on the treatment of osteoporosis : Write and Evidenced based practice research paper on the treatment of osteoporosis.
Implement the extended euclidean algorithm : Implement the Extended Euclidean Algorithm using C/C++ or Java. The objective is to find the inverse modular for a number.
Discuss the decision-making style of a current : The first part of your paper will be to analyze and discuss the decision-making style of a current or former "boss".
What additional steps would you recommend to runa : Runa Singh is the network administrator in charge of network security for a medium-sized company. The firm already has a firewall, its network is divided.
Improve promotion satisfaction : What steps can organizations take to improve promotion satisfaction, supervision satisfaction, and coworker satisfaction?
How expensive are those strategies : Describe other ways that organizations can improve affective, continuance, and normative commitment, other than the strategies suggested in this chapter.

Reviews

len1468296

4/20/2017 2:38:53 AM

Implement only question 3. It has to do power function, but this power function has to be very large. Assume you are doing 7874^(15253763). Better to implement using binary modular representation.

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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