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
Difference between Hash Map and Hash Table? The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and allows nulls. (HashMap allows null values

What is JAR archives? JAR archives are ZIP archives along with a different extension. They contain a hierarchy of files and directories. In spirit a JAR file can take the place

List the keywords which are used in java 1.1? The list of keywords which are used in java 1.1 are given below: Keyword Purpose boole

(CarbonFootprint Interface: Polymorphism) Using interfaces, as you learned in this chapter, you can specify similar behaviors for possibly disparate classes. Governments and compan

How to Creating Arrays in java? Declaring arrays merely says what type of values the array will hold. It does not form them. Java arrays are objects, and such as any other obje

Interface to calculate carbon foot print

Session Bean : is a non-persistent object that provides some business logic running on the server. Session beans do not provide system break down. There are two kinds of session b

For this assignment you'll create some classes for modeling tickets for a city subway system. The type of system we are modeling has these main features: Stations are grouped in

Why are JSP pages the preferred API for creating a web-based client program? Because no plug-ins or security policy files are required on the client systems (applet does). Also,

What are the types of Dependency Injection Spring supports? Ans) there are two types of Dependency Injection Spring a)  Setter Injection: b)  Constructor Injection: