Program will read parameters plaintext and ciphertextfrom

Assignment Help JAVA Programming
Reference no: EM13286769

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.

The program will be tested usingcommand line. I will type "javacECC.java" to compile it and type "java ECC" to run it.

Reference no: EM13286769

Questions Cloud

What are the different types of screening or diagnostic test : What are the different types of screening or diagnostic tests available to study salmonella? What the advantages and drawbacks of each of the tests?
How religion should connect with politics and society : From the Confucian passage what is suggested about how religion life might or should influence politics and society? Note the picture of the monastery in the wilderness what does tis say about how religion should connect with politics and society?
Community standards when determining ethical propriety : Which system of ethics would most likely consider community standards when determining ethical propriety?
Bioconcentration and bioaccumulation : Compare and contrast the phenomena “bioconcentration” and “bioaccumulation”.  How are they similar?  How are they different?
Program will read parameters plaintext and ciphertextfrom : 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..
Traditional-modern or global society : Which type of society is the most appealing to you - a traditional, modern, or global society? Which is the least appealing to you? Why so?
What type of corporate advertisement does starbucks need : Use newspapers, magazines, journals, the Internet, and so forth to find other examples of print advertisements for your own company or school, or for a company of your choice. Do you think the ads you found are effective or misleading? What type of c..
What are the six steps to corporate identity management : Please review Case Study 4-1 on JetBlue Airways: Regaining Altitude. What are the six steps to corporate identity management (branding)? Do you think that JetBlue followed all six steps to corporate identity management (branding)? Explain your decisi..
Concept of a project network : To develop a schedule for a project, we will use the concept of a project network, which shows work activities taken from the work breakdown structure and organized according to the logical flow in time and relationships governing when the work will ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Describe principles of data abstraction and inheritance

Study the principles of data abstraction, inheritance and dynamic binding. Use Library to get started on finding resources.You must take the terms and describe it.

  Question superclass and provide a different implementa

Add a method addText to the Question superclass and provide a different implementa- tion of ChoiceQuestion that calls addText rather than storing an array list of choices.

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Java application to permit user to enter ten numbers

Write down Java application which permits a user to enter 10 numbers (double precision) into the array and then sorts and displays numbers from lowest to highest.

  Write a functions that takes an array of doubles

1. Write a function that is passed a single integer and then calculates the factorial of that number. A factorial is the product of the integer times all of the integers below it stopping at 1. So n!= n*(n-1)*(n-2).......3.2.1

  Consider an array of integers

Consider an array of integers as below: int[] a = {5, 2, -4, 3, 0, -5, 7, 11, 6, 13} Complete the method named count(int[] a) in the class Count. The method should return the number of positive numbers in the array

  Write a java program called salesinfominer

Write a Java program called SalesInfoMiner that reads in a file of products, stored in text format. The program must then read in information about past sales transactions and output all the products to a new file, sorted by product description,..

  String as its parameter and returns the length

Write a method named longestWord that accepts a String as its parameter and returns the length of the longest word in the string.A word is a sequence of one or more non-space characters (any character other than the space character).

  The frantic pipe layer game

Design the Frantic Pipe Layer game

  Palindrome by doing character replacement

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement.

  Utilizes a good design process

Analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array.

  Use inheritance to read, store, and print questions for test

use inheritance to read, store, and print questions for a test. First, write an abstract 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