Networking class question...
What is the relationship between the private key and public key? Who uses the public key and who uses the private key?
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
In Private key, the same key (secret key) is used for encryption and decryption. In this key is symmetric because the only key is copy or share by another party to decrypt the cipher text. It is faster than the public key cryptography.
In Public key, two keys are used one key is used for encryption and another key is used for decryption. One key (public key) is used for encrypt the plain text to convert it into cipher text and another key (private key) is used bu receiver to decrypt the cipher text to read the message.
In RSA, you have a public key, consisting of exponent "e" and modulus "m". If you want to encrypt a message (remember that message is always a number), you raise it to the power of e, divide the result by modulus m, and the remainder after division is your encrypted message.
For example, your public key can be e=5, m=299. If you want to encrypt the message "75", you raise it to the power of 5 and give remainder after division by 299, i. e. 75^5 mod 299 = 186. So your message after encryption is 186.
How does the recipient decrypt it? He has his private key, his secret (or decryption) exponent "d", and the same modulus "m". "d" in this case is 53. So he takes the encrypted message 186, raise it to power of 53, and modulates by 299, i. e. 186^53 mod 299 = 75... thus he recovers the original message.
But how does he know what his private exponent "d" is?
You might have noted that the modulus "m" is made by multiplying two prime numbers - in this case 13 * 23 = 299. These two prime numbers are customarily called "p" and "q".
The private and public exponents e and d must satisfy following rule:
e * d = (p-1) * (q-1) * k +1
The coefficient "k" must be a whole number, which means that e multiplied by d gives a remainder of 1 when divided by (p-1) * (q-1).
Lets see if this holds in our example:
5 * 53 = 265
(13-1) * (23-1) = 12 * 22 = 264
So yes, 265 = 264 * 1 + 1.
For small numbers like 299 it is easy to recover the p and q that were multiplied to obtain the modulus m. But in real life applications, the p and q numbers are each about 300 digits long, and the resulting modulus is more than 600 digits long. Multiplying large p and q is easy for computers, but factoring m it into its prime factors in computationaly infeasible.
We can derive the private key from the public key, but in order to do that, we would need to factor the modulus (which is publicly available) into its prime factors p and q, which were used to generate it. This is at present time computationally infeasible for large m (600 decimal digits or more).
Kindly revert for any queries
Thanks.
Networking class question... What is the relationship between the private key and public key? Who uses...
Describe the relationship between public law enforcement and private security. What are the major problems?
What are the differences between public policy and private policy? At what point does private policy become public policy? (Hint) This question is asking you to address the fundamental definition of public policy—the reasons for public policy, the structure of public policy and the sources of public policy. This is a Public Administration Course (The class is Public Policy and Evaluation) This is not an Operations Management class, however, when asked to select the subject Public Administration is not...
Question 19 Given the following class: public class Swapper ( private int x; private String y public int z; public Swapper( int a, String b, int c) ( x-a; y b; zC; public String swap() ( int temp -x; x-z z temp; return y: public String tostring() ( if (x<z) return y: else return" +x+z What would the following code output? Swapper r new Suapper( 5, "no", 10); System.out.printin( r. swap ) ): no no510 510 e 15 Question 20...
QUESTION 5 Assume Alice's public key is 3,33>, and her private key is 7,33>. She wants create a digital signature for a message m. The hash of the message is 19. What is the digital signature?
Critically analyse the key differences and similarities between corporate governance in the public and private sectors
Question B1 You are given the following Java classes: public class Queue { private static class Node { Object object; Node next; Node () { object = null; next = null; } Node (Object object, Node next) { this.object = object; this.next = next; private Node header; private int size = 0; // size shows the no of elements in queue public Object dequeue () { if (size == 0 ) { return null; else { Object remove_object = header.object;...
Is it possible to recover a private key, given a public key and a substring/a part of the corresponding private key?
Here is the code for the Infant class: public class Infant{ private String name; private int age; // in months public Infant(String who, int months){ name = who; age = months; } public String getName(){ return name;} public int getAge(){ return age;} public void anotherMonth() {age = age + 1;} } The code box below includes a live Infant array variable, thoseKids. You cannot see its declaration or initialization. Your job is to find out which Infant in the array...
JAVA PROGRAM: public class Stack { private DList mList; public Stack() { setList(new DList<>()); } private int indexOfTop() { return getList().isEmpty() ? -1 : getList().getSize() - 1; } public E peek() { return getList().get(indexOfTop()); } public E pop() { return getList().remove(indexOfTop()); } public Stack push(E pData) { getList().append(pData); return this; } private DList getList() { return mList; } private void setList(DList pList) { mList = pList; } Q1 Because Stack encapsulates an instance variable which is of the class DList,...
Alice has the RSA public key (n, e) = (11413, 251) and private key d = 1651. And Bob also has his own RSA public key (n’, e’) = (20413, 2221) and private key d’ = 6661. Alice wants to send the message 1314 to Bob with both authentication and non-repudiation. Use Maple, calculate what is the ciphertext sent by Alice. And Verify that Bob is able to recover the original plaintext 1314.