In: Computer Science
Alice is sending message “HIDE” to Bob. Perform encryption and decryption using RSA algorithm, with the following information: parameters p=11,q=5, e=7
Present all the information that you will need to encrypt and decrypt only the first letter from text
To perform encryption we have formula as
c = me mod n
Where n = pq = 55
Now Lets Encrypt the message first letter i.e. H
We write letters as number i.e. map A as 0 , B as 1 , C as 2 ............ Z as 25 .
So we have H = 8
Now lets apply the formula
87 mod 55= 2 = B
Similarly we can do all other
I = 9 so we get 97 mod 55 = 4 = E
Hence we get Encrypted text as = BEQX
Now lets Decrypt the message
To do so we need to get Private key d
To. Compute the secret exponent d, 1<d<ϕ, such that e*d ≡ 1 mod ϕ
where ϕ = (p-1) ( q-1) = 40
We get d = 23
Then we have to use the this formula for decryption m = Cd mod n
So Lets see the that we get decrypted message as HIDE or not
d = 223 mod 55 = 8 = H
423 mod 55 = 9 = I
Similarly we get decrypted message as HIDE which is same as original message
This is how we can do encryption and decryption in RSA algorithm
Thank You
If u like the answer do Upvote it and have any doubt ask in comments