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
What are the different scopes for Java variables? The scope of a Java variable is explained by the context in which the variable is declared. Therefore a java variable can have

Specifications 1. readNumberOfEntries → This function will ask the user for a value greater than or equal to two. The function will keep asking values as long as the user prov

When MalformedURLException and UnknownHostException throws? Ans) When the particular URL is not connected then the URL throws MalformedURLException and If InetAddress? methods g

Write a JavaScript program to prompt the user for the radius of a sphere and call function sphereVolume to calculate and display the volume of the sphere in the status bar.

Both functions send you to a new resource like JSP, Servlet etc.     Normal 0 false false false EN-US X-NONE X-NONE

Describe methods of Basic Applet Life Cycle ? All applets have the subsequent four methods: public void init(); public void start(); public void stop(); public void destroy();

what are all possible ways in java for user input and output

Describe Inner Classes in java? An inner class is a class whose body is described inside another class, referred to as the top-level class. For instance: public class Queue {

Remote Method Invocation (RMI) is the process of activating a method on a remotely running object. RMI offers location transparency in the sense that it gives the feel that a metho

Java Programming 1. What do you understand by Java Virtual Machine? 2. Write a simple Java program to display a string message and explain the steps of compilation and execu