Eve records the transmission of an RSAencrypted message The

Eve records the transmission of an RSA-encrypted message. The recorded ciphertext is c = 2032. Eve also knows the public key to be pk = (n, e) = (7979, 1879). Your goal is to recover a message m that has been encrypted with RSA. Give the equation for the decryption of c. Which variables are not known to Eve? Can Eve recover m? If so, how? If not, why not? To recover the private key d, Eve has to compute d = e^-1 mod Phi. Can Eve recover Phi(N)? Compute the message m. Can Eve do the same message recovery attack (as in (e)) for large N, e.g., |N| = 1024 bit? Eve recovers a message-ciphertext pair (m, c). Can she recover the private key d?

Solution

class StringSet
{
//An instance variable of type String[]
String[] set;
//An int instance variable that indicates the number of String objects that the StringSet currently contains.
int numOfStrings;
//A no argument constructor.
public StringSet()
{
numOfStrings = 0;
set = new String[10];
}
//A mutator that adds a String newStr to the StringSet object.
void add(String newStr)
{
set[numOfStrings++] = newStr;
}
//An accessor that returns the number of String objects that have been added to this StringSet object.
int size()
{
return numOfStrings;
}
//An accessor that returns the total number of characters in all of the Strings that have been added to this StringSet object.
int numChars()
{
int sum = 0;
for(int i = 0; i < numOfStrings; i++)
sum += set[i].length();
return sum;
}
//An accessor that returns the number of Strings in the StringSet object that have exactly len characters.
int countStrings(int len)
{
int count = 0;
for(int i = 0; i < numOfStrings; i++)
if(set[i].length() == len)
count++;
return count;
}
}

And the code for StringSetTester.java is:

import java.util.*;
class StringSetTester
{
public static void main(String[] args)
{
Scanner kybd = new Scanner(System.in);
System.out.print(\"How many strings will you enter? \");
int numStr = kybd.nextInt();
kybd.nextLine();
StringSet ss = new StringSet();
for(int i = 0; i < numStr; i++)
{
System.out.print(\"Enter string \" + (i+1) + \": \");
String temp = kybd.nextLine();
ss.add(temp);
}
System.out.println(\"The size of the StringSet is: \" + ss.size());
System.out.println(\"The number of characters in StringSet is: \" + ss.numChars());
System.out.println(\"The number of strings of length 5 are: \" + ss.countStrings(5));
System.out.println(\"The number of strings of length 7 are: \" + ss.countStrings(7));
}
}

 Eve records the transmission of an RSA-encrypted message. The recorded ciphertext is c = 2032. Eve also knows the public key to be pk = (n, e) = (7979, 1879).
 Eve records the transmission of an RSA-encrypted message. The recorded ciphertext is c = 2032. Eve also knows the public key to be pk = (n, e) = (7979, 1879).

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site