Question

1. Derive the RSA encryption method, justifying your steps from t sults. 2. Encrypt 0002 with public key (7,77). Find the dec
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.RSA encryption method:-

Here,I am justify my steps in following order below,

The implementation of RSA makes heavy use of modular arithmetic, Euler's theorem, and Euler's totient function.

steps to follow,

  1. First, the receiver chooses two large prime numbers p and q . Their product, , will be half of the public key.
  2. The receiver calculates ϕ=(p−1)(q−1) and chooses a number e relatively prime to ϕ(pq) . In practice, e 216 +1 = 65537 is often chosen to be , though it can be as small as 3 in some cases. e will be the other half of the public key.
  3. The receiver calculates the modular inverse d of e modulo ϕ(n) . In other words, ed≡1 (mod ϕ(n)) . d is the private key.
  4. The receiver distributes both parts of the public key: n and e. d is kept secret.

Now that the public and private keys have been generated, they can be reused as often as wanted

the sender converts his message into a number m. One common conversion process uses the ASCII alphabet:

A B C D E F GHJK L M 65 66 67 68 69 70 71 72 73 74 75 76 77 N O P Q R S T U V W X Y Z 78 79 80 81 82 83 84 85 86 87 88 89 90

For example, the message "HI" would be encoded as 7273. It is important that m<n, as otherwise the message will be lost when taken modulo n, so if n is smaller than the message, it will be sent in pieces.

The sender then calculates c ≡ me (mod n). c is the ciphertext, or the encrypted message. Besides the public key, this is the only information an attacker will be able to steal.

The receiver computes cd ≡ m (mod n), thus retrieving the original number m. (It uses Euler Theorem)

The receiver translates m back into letters, retrieving the original message.

Ex:-

For example, suppose the receiver selected the primes p=11 and q=17, along with e=3 .

  1. The receiver calculates n=p*q => 11 x 17 = 187, which is half of the public key.
  2. The receiver also calculates ϕ=(p−1)(q−1) => 10 x 16 = 160 . e=3 was also chosen.
  3. The receiver calculates d=107, since, de=107 x 3 = 321 ≡ 1 (mod ϕ(n)) ,since( ϕ(n) = 160).
  4. The receiver distributes his public key n=187: and e=3.

Now suppose the sender wanted to send the message "HI". Since n is so small, the sender will have to send his message character by character.

  1. H' is 72 in ASCII, so the message text m is 72.
  2. The sender calculates me=723 ≡ 183(mod 187) , making the ciphertext c=183 . Again, this is the only information an attacker can get, since the attacker does not have the private key.
  3. The receiver calculates Cd =183107 ≡ 72 (mod 107), thus getting the message of m=72.
  4. The receiver translates 72 into 'H'.

This is for 'H' only as same like this, calculate 'I' also ,it will give 73.

This is the total encryption and decryption procedure,once you can check it.

2.Encrypt 0002 with public key (7,77). find the decryption key.?

  1. Step one is selecting two distinct prime numbers p and q. p=7 and q=11 since n=77.
  2. To get n= p x q = 7 x 11 = 77.
  3. phi(n) = (p-1) x (q-1) = 6 x 10 = 60.
  4. given e= 7. where as gcd(60,7)=1 1<=e <=60.  
  5. determine d such that d*e % phe(n) = 1; d < phe(n). where as 43 * 7 % 60 =1,so d=43.
  6. And next given public key KU (7,77) where e=7 and n=77, so m=2 then, Encryption c = m^e % n; m < n , 27 % 77 = 51. c=51, 51 < 77
  7. and next Decryption, m = c^d % n , m= 5143 % 77 .
  8. Finally Private Key:
    1. Private key KR = [d, n]
    2. KR=[43,77].

Thank you..!!!

Add a comment
Know the answer?
Add Answer to:
1. Derive the RSA encryption method, justifying your steps from t sults. 2. Encrypt 0002 with...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 4. Suppose you wish to encrypt the message, M 42 using RSA encryption. Given a public...

    4. Suppose you wish to encrypt the message, M 42 using RSA encryption. Given a public key where p- 23 and q-11 and the relative prime e- 7. Find n, and show all necessary steps to encrypt your message (42). (Hint: check p.411 of the text for information on public key RSA) (5 points)

  • Question 2 (compulsory) (a) Explain the operation of the RSA public-key cryptosystem (b) Illustra...

    Question 2 (compulsory) (a) Explain the operation of the RSA public-key cryptosystem (b) Illustrate your explanation by using the prim es p 13 and q 17 and secret decryption key d 103 to (i) decrypt the ciphertext z2; (ii) compute the public encryption key e corresponding to d (ii) encrypt the plaintext m-. (c) Discuss the security of the RSA public-key cryptosystem Question 2 (compulsory) (a) Explain the operation of the RSA public-key cryptosystem (b) Illustrate your explanation by using...

  • This question tests your knowledge of encryption and decryption using the RSA method. the numbers in...

    This question tests your knowledge of encryption and decryption using the RSA method. the numbers in soled are deliberately chosen to be mall enough to focus on gown understanding without excessive calculations. Alice and Bob decide to use an RSA cryptosystem with public key (77, 13) for communication. Alice wants to send Bob the message m = 22. Determine Alice's ciphertext c. Determine Bob's private boy Carry out Bob's decryption of Aloe's ciphertext c, and compare his result with Alice's...

  • C Programming - RSA Encryption I've tried to write a program that can encrypt and decrypt...

    C Programming - RSA Encryption I've tried to write a program that can encrypt and decrypt strings using RSA and want to be able to integrate it into a header file which contains codes for compression, linked list etc.. However, the use of global variables and fixed size of encryption is making it hard to do so Can someone please help me modify the following the code? I want to be able to just pass it in a string to...

  • C Programming - RSA Encryption I've tried to write a program that can encrypt and decrypt strings using RSA and want...

    C Programming - RSA Encryption I've tried to write a program that can encrypt and decrypt strings using RSA and want to be able to integrate it into a header file which contains codes for compression, linked list etc.. However, the use of global variables and fixed size of encryption is making it hard to do so Can someone please help me modify the following the code? I want to be able to just pass it in a string to...

  • Using a ROT5 cipher encrypt the following plaintext. Prove your answer by showing the steps for...

    Using a ROT5 cipher encrypt the following plaintext. Prove your answer by showing the steps for both the encryption and decryption. (20 points) Meet at the baseball field at three oclock 2. Using a ROT3 cipher decrypt the following ciphertext.       WKHF RUYH WWHL VUHG

  • 5. Consider the RSA encryption scheme, Alice wants to send a message to Bob. Both Alice...

    5. Consider the RSA encryption scheme, Alice wants to send a message to Bob. Both Alice and Bob have p= 17,9 = 19. Alice has e=31 and Bob has e=29. a. What is the public key pair used in the transmission? 2 marks b. What is the secret key pair used in the transmission? 4 marks c. Encrypt the message m=111. 4 marks d. Decrypt the resulting ciphertext. 4 marks e. What's the security problem between Alice and Bob? How...

  • Question 11 (1 point) Approximately how many different starting settings could be created from the Enigma...

    Question 11 (1 point) Approximately how many different starting settings could be created from the Enigma machine's remarkably simple architecture. Question 11 options: 160 X 10 ^9 160 X 10^36 160 X 10^72 160 X 10^18 Question 12 (1 point) PGP uses a two-phase encryption approach to encrypt a message, and a second two-phase approach to decrypt a message. Alice wishes to send a message to Bob that will be confidential and also prove to Bob that Alice was the...

  • C Programming - RSA encryption Hi there, I'm struggling with writing a C program to encrypt and decrypt a string usi...

    C Programming - RSA encryption Hi there, I'm struggling with writing a C program to encrypt and decrypt a string using the RSA algorithm (C90 language only). It can contain ONLY the following libraries: stdio, stdlib, math and string. I want to use the following function prototypes to try and implement things: /*Check whether a given number is prime or not*/ int checkPrime(int n) /*to find gcd*/ int gcd(int a, int h) void Encrypt(); void Decrypt(); int getPublicKeys(); int getPrivateKeys();...

  • Computing RSA by hand. Let p = 13, q = 23, e = 17 be your...

    Computing RSA by hand. Let p = 13, q = 23, e = 17 be your initial parameters. You may use a calculator for this problem, but you should show all intermediate results. Key generation: Compute N and Phi(N). Compute the private key k_p = d = e^-1 mod Phi(N) using the extended Euclidean algorithm. Show all intermediate results. Encryption: Encrypt the message m = 31 by applying the square and multiply algorithm (first, transform the exponent to binary representation)....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT