Question

Suppose your RSA Public-key factors are p =6323 and q = 2833, and the public exponent...

Suppose your RSA Public-key factors are p =6323 and q = 2833, and the public exponent e is 31. Suppose you were sent the Ciphertext 6627708. Write a program that takes the above parameters as input and implements the RSA decryption function to recover the plaintext.

IN PYTHON

Homework Answers

Answer #1

Answer : Given data

* For enormous estimations of P and Q , the program can be moderate.

from decimal import Decimal

p = int(input('Enter the estimation of p : '))

q = int(input('Enter the estimation of q : '))

e = int(input('Enter public example e : '))

ct = int(input('Enter the estimation of ciphertext : '))

n = p*q

t = (p-1)*(q-1)

I = 1

while(1):

x = 1 + i*t

if x % e == 0:

d = int(x/e)

break

I += 1

def decrypt(ct, d, n):

dtt = Decimal(0)

dtt = pow(ct,d)

dt = dtt % n

return dt

print('Decrypted plaintext : ', decrypt(ct, d, n))

__________THE END______________

Know the answer?
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
Similar Questions
Suppose the totient for a given public key (52,494,503;7) is inadvertently released and is equal to...
Suppose the totient for a given public key (52,494,503;7) is inadvertently released and is equal to 52,479,768. What are p and q? What is the decryption exponent d? For extra credit what is the plaintext message of the ciphertext C=15,114,578 encrypted with the given public key?
For solving the problems, you are required to use the following formalization of the RSA public-key...
For solving the problems, you are required to use the following formalization of the RSA public-key cryptosystem. In the RSA public-key cryptosystem, each participants creates his public key and secret key according to the following steps: ·       Select two very large prime number p and q. The number of bits needed to represent p and q might be 1024. ·       Compute                n = pq                           (n) = (p – 1) (q – 1). The formula for (n) is owing to...
Perform encryption and decryption for the RSA algorithm using these parameters: p = 13; q =...
Perform encryption and decryption for the RSA algorithm using these parameters: p = 13; q = 19; e = 5; Plaintext should be the first three letters of the month you were born (convert letters to the values 0-25). Note you need to do three encryptions. Show how decryption works. The above calculation is performing a cipher on the alphabet. How does this method compare with a classic cipher?
Let p=3 and q=17 and let an RSA public-key cryptosystem be given. 1. Why is the...
Let p=3 and q=17 and let an RSA public-key cryptosystem be given. 1. Why is the number 8 not a valid encryption-key? 2. We encrypt the number M=8 with the help of the encryption-key e=3. Why is the encrypted message C=2? 3. Why is the decryption key d for the encryption-key, (e=3), equal to 11? https://en.wikipedia.org/wiki/RSA_(cryptosystem)#Encryption
Let p=11, q=17, n = pq = 187. Your (awful) public RSA encryption key is (e=107,...
Let p=11, q=17, n = pq = 187. Your (awful) public RSA encryption key is (e=107, n=187). (a) What is your private decryption key? (b) You receive the encrypted message: 100 Decrypt the message. (In other words, what was the original message, before it was encrypted? Just give me a number, don’t convert it to letters).
Below is an example of key generation, encryption, and decryption using RSA. For the examples below,...
Below is an example of key generation, encryption, and decryption using RSA. For the examples below, fill in the blanks to indicate what each part is or answer the question. Public key is (23, 11) What is 23 called? _______________, What is 11 called?_______________ Private key is (23, 13) What is 23 called?_______________, What is 13 called?_______________ 23 can be part of the public key because it is very hard to _______________ large prime numbers. ENCRYPT (m) = m^e mod...
Write public and private key where p = 13, q = 37 and n = 481....
Write public and private key where p = 13, q = 37 and n = 481. Totient is 432. E is 19 and d is 91. Write public key as (n = , e =) and private key as (n = , d =)
1. Dexter wants to set up his own public keys. He chooses p = 23 and...
1. Dexter wants to set up his own public keys. He chooses p = 23 and q = 37 with e = 5. Answer the following using RSA cryptographic method: a) Encrypt the message ‘100’ and find the CIPHER number (C) to be sent. ‘100’ should be taken together as M while computing encryption [5 Marks] C = Me mod pq (Use This Formula) b) Find the decryption key ‘d’, using extended Euclidean GCD algorithm. [10 Marks] c) Now decrypt...
Aggregating preferences for private and public goods a. Suppose Johns demand for tacos is P=6-Q and...
Aggregating preferences for private and public goods a. Suppose Johns demand for tacos is P=6-Q and Annas demand is P=6-2Q. Write down an equation for the social marginal benefit as a function of Q [i.e. SMB=P=f(Q)] of taco consumption. If the marginal cost of producing each taco constant at $2 per taco, what is the socially optimal number of tacos produced and consumed? b. Now, suppose Johns demand for fighter jets is P=$10,000,000-(2,000,000*Q) and Annas is P=$5,000,000-(1,000,000*Q). Derive the social...
NWS620S Tutorial 1: Symmetric Encryption - DES Encryption is the translation of data into a secret...
NWS620S Tutorial 1: Symmetric Encryption - DES Encryption is the translation of data into a secret code so that only authorised entities can read it. Encrypting data is considered a very effective way of achieving data security. To access encrypted data, you must have access to a secret key that enables you to decrypt it. Unencrypted data is called plain text; encrypted data is referred to as cipher text. There are two types of encryption: • Symmetric encryption • Asymmetric...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT