(a) Using RSA, choose p = 3 and q = 11, and encode the word “dog” by encrypting each letter separately. Apply the decryption algorithm to the encrypted version to recover the original plaintext message.
(b) Repeat part (a) but now encrypt “dog” as one message m.
a)
Consider the data: p = 3 and q = 11
Consider the endcode word: “dog”
Using RSA,
Take e=9, since 9 and 20 have no common factors and d=29, since 9.29-1(that is, e.d-1) is exactly divisible by 20.
So, the encrypting the each letter “dog” by RSA encryption, e=9, n=33.
The following table encrypted version to recover the original plaintext message
word | m | me | c=me mod n |
d | 4 | 26214425 | 25 |
o | 15 | 38443359375 | 3 |
g | 7 | 40353607 | 19 |
So, the encrypted message is 25,3,19.
The following table decryption algorithm to the encrypted version to recover the original plaintext message by using RSA:
c | cd | m=cd mod n | plaintext |
25 | 2529 | 4 | d |
3 | 68630377364883 | 15 | o |
19 | 1929 | 7 | g |
b)
Consider the above part (a), now have to encrypt “dog” as one message m:
Consider p = 43 and q = 107.
Ciphertext c = me mod n
= 445261 mod 4601
= 402
So, the encrypted message “dog” as one message m is 402