Course Solutions Uncategorized (Solved) : Java Complete Rsa Class Make Work Complete Dos Also Take Input Inputtxt File Inputtxt E 10 Q28864127 . . . .

(Solved) : Java Complete Rsa Class Make Work Complete Dos Also Take Input Inputtxt File Inputtxt E 10 Q28864127 . . . .

 

[Java]

I am to complete this RSA class to make it work. Complete To Dosalso take input from Input.txt file such as

Input.txt

e= 103687
p= 1413297339818079839
q= 7795673610480062959
message= gravitatio

————————–

import java.io.*;

import java.util.*;

import java.math.BigInteger;

public class RSA_assignment

{

static Scanner console = new Scanner (System.in);

public static void main(String [] args) throwsFileNotFoundException

{

System.out.println(“Q. How to say hello on Java? : A. HelloJava!!!”);

System.out.println(“Q. How to say hello on C++? : A. HelloC++!!!”);

Scanner inFile = new Scanner (newFileReader(“Kamilla2.txt”));

long p,q;

long e;

String ggg;

ggg= inFile.next(); //e-

e=inFile.nextInt();

ggg= inFile.next(); //p=

p=inFile.nextLong();

ggg= inFile.next(); //q=

q=inFile.nextLong();

if ((p-1)%e==0||(q-1)%e==0) {System.out.println(“I must chooseanother e from teacher’s website”);}

else{ System.out.println(“gcd(e,(p-1)(q-1))=1”);

  

BigInteger nBI= BobCalculateN(p, q);  

BigInteger eBI= new BigInteger(“”+e);

System.out.println(“p=”+p+” q=”+q);

BigInteger dBI=BobCalculateD(p, q, e );

System.out.println(“dBI=”+dBI);

String mStr; //message

long m; //coded value as

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Describe Personal Decision Process Similar Different Step List Steps Decision Making Proce Q34303921Describe Personal Decision Process Similar Different Step List Steps Decision Making Proce Q34303921

<p style="margin-left:48px;">Describe how your personal decisionprocess is similar to or different from each step? List the stepsin the Decision Making Process from:</p><ol><li>identify and define the problem</li><li>generate alternatives</li><li>evaluate alternatives</li><li>determine a course</li><li>implement