Elliptic curve, JAVA Programming

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,separated 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.
Posted Date: 12/6/2015 1:56:16 PM | Location : United States

Related Discussions:- Elliptic curve, Assignment Help, Ask Question on Elliptic curve, Get Answer, Expert's Help, Elliptic curve Discussions

Write discussion on Elliptic curve
Your posts are moderated
Related Questions
In the lectures, we have written programs for bond pricing in discrete time. We have also talked about the theory for bond pricing and yields in continuous time. In this exercise,

WebSphere - Weblogic and Apache: Building/Installation  and maintenance of Solaris and Linux machines. Exposure to Sun Hardware : Sunfire v880,v890.V440,X4600

Benefits of Spring framework : Spring can effectively organize your middle tier objects as given in the diagram above, whether or not you select to use EJB. Applications create

Differentiation between a Vector and an array . Explain in Brief about the pros and cons of both?

#quThis project is based on the teams example of chapter 1. Instead of teams, you will consider employees working in a department in a company. (Departments and employees are ana

What is the output of the following JavaScript code? name="Ali Akbar"; document.write(name.charAt(4)) ;

Calculate the kilometer within an hour? class Car { String licensePlate = ""; // e.g. "New York 543 A23" double speed = 0.0; // in kilometers per hour doubl

List down the names of two array techniques available in JavaScript. The two techniques thata rae available in java script is: 1. sort( ) [sorts elements within alphabetical

A MapMessage carries name-value pair as its payload. Therefore its payload is same to the java.util.Properties object of Java. The values can be Java primitives or their wrappers

A user interface control that outputs data to a client or permits a user to input data to a JavaServer Faces application.