Implement elliptic curve encryption - decryption in java

Assignment Help JAVA Programming
Reference no: EM13892915

In this project you need to write a program called "ECC.java"to implement Elliptic Curve encryption/decryption.

Specifically, your program will read parameters, plaintext and ciphertextfrom a file named "input.txt" (under the same directory).Then your program needs tocreate a file named "output.txt" (under the same directory) and prints the public key, private key, encryption and decryption results to "output.txt". (Please check the attached sample files "input.txt" and "output.txt".)

In "input.txt":

1. First line is aprime number q. Thus GF(q) is the ground field.

2. Second line are two integers a and b,separated by one blank space. Thus the elliptic curve Eq(a, b) is: y2 = x3 + ax + b.

3. Thirdline are two integers x1 and y1,separat ed by one blank space. Thus the base point is: G = (x1, y1).

4. Fourth line is an integer nA. Thus private key is nA.

5. Fifth line are two integers m1 and m2,separated by one blank space. Thus the point of the plaintext is Pm = (m1, m2).

6. Sixth line is the randomly generated positive integer k.

7. Seventh line arefour integers c11, c12,c21, and c22, separated by one blank space. Thus the point of the ciphertext is Cm = (c1=(c11, c12),c2=(c21,c22)).

In "output.txt":

1. First line (two integers) is the public key.

2. Second line (one integer) is the private key.

3. Third line (four integers)is the point of the ciphertextencrypted fromPmusing public key and k in input.txt. Suppose the point of the ciphertext Cm = (kG, Pm+kPB), then the first two integers are the coordinates ofkG and the latter two integers are the coordinates ofPm+kPB.

4. Fourth line (two integers)is the point of the plaintext decrypted fromCmusing private key in input.txt.

Attachment:- Ecc.rar

Reference no: EM13892915

Questions Cloud

Advantages of being a market follower : Can someone please give me some assistance, help get me started with this question. What is involved with assessing your competition? Why is it important? How can strong competitors benefit a company? Discuss the advantages of being a market follo..
Explanation of cultural factors incorporated into program : Program: Proposed program approach and components and Incorporation of cultural issues: Explanation of cultural factors incorporated into program design and rationale for inclusion
How would you graph the semi-interquartile range : How would you graph the semi-interquartile range corresponding to a given frequency distribution and What is the relationship of the semi-interquartile range to the ogive of the distribution?
Four communication management problems : What do you believe are the top four communication management problems commonly associated with advertising and promotion? Be sure to prioritize and explain your selections. How would you approach solving the aforementioned management problems?
Implement elliptic curve encryption - decryption in java : Implement Elliptic Curve encryption - decryption in java. Specifically, your program will read parameters, plaintext and ciphertextfrom a file
What type of conflict exists between kaye and randy? : What type of conflict exists between Kaye and Randy? What might have caused it?
Direct headline and an indirect headline : Also, please explain the differece between a direct headline and an indirect headline and when each of them would be used.
Write a program that displays a virtual object on real video : In this assignment, you will write a program that displays a virtual (i.e., graphics) object (e.g., a wire-frame cube, a teapot) on a real video sequence.
Describe any pitfalls the firms encountered : Describe any pitfalls the firms encountered and how the problems were resolved.

Reviews

Write a Review

JAVA Programming Questions & Answers

  A fault is fundamentally a deviation from expected behavior

write a 200- to 300-word short-answer response to the following a fault is basically a deviation from expected

  Prepare an app that calculates the product of a series

Prepare an app that calculates the product of a series of integers that are passed to method   product using a variable-length argument list.

  Recommend at least five factors which programmers must

propose at least five factors that programmers should consider when choosing between data types such as those used in c

  Echo client-server application

ASSIGNMENT 1- An echo client-server application, You are required to develop an application that allows clients running on MS Windows platforms to send sequences of strings to an echo server running on a windows platform

  Structure named dog with a string field

Create a Structure named dog with a string field for the Dog's name. Create a Structure named Cat with a string field for the Cat's name. Write a program that declares one Dog and one Cat, and assign names to them. Write two overloaded functions n..

  Write a java binary search tree program

write a JAVA binary search tree program

  Expressions in the matlab command window

These problems all involve typing expressions in the MATLAB command window. To complete this homework assignment, turn in a text (or Word, or PDF) file containing the expression that you type to respond to each problem.

  Explain where the following method invocations

Explain where the following method invocations are most likely to be found in a program for dealing with census data organized using the Model, View, Controller (MVC) design pattern. Choices are zero or more of Model, View, and Controller. Be sure to..

  Construct a bulls and cows program for my intro java class

construct a Bulls and Cows program for my intro Java class. This program needs to perform the basic functions of the game (determining how many cows there are and how many bulls there are and tell the player when they win), but it also needs to offer..

  Develop a program to emulate a purchase transaction

Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class

  Lists the number of appointments

Create a query that lists the number of appointments for each doctor by day. Display the number of appointments, the doctor ID, and the appointment date. Display the output in order of doctor ID with the lowest doctor ID first.

  What position along the chord does minimum pressure occur

At what position along the chord does the minimum pressure occur? What is special about the point where C p is a maximum?

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