SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
James F. Kurose, Keith W. Ross
Chapter:
Security In Computer Networks
Exercise:
Problems
Question:7 | ISBN:9780132856201 | Edition: 6

Question

(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.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

a)

 

Consider the data: p = 3 and q = 11

Consider the endcode word: “dog”

Using RSA,

\large n= p\times q

\large n= 3\times 11

\large n= 33

\large z= (p-1)\times (q-1)

\large z= (3-1)\times (11-1)

\large z= (2)\times (10)

\large z= 20

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.

\large n=p\times q

\large n=43\times 107

\large n=4601

\large z=(p-1)\times (q-1)

\large z=(43-1)\times (107-1)

\large z=(42)\times (106)

\large z=4452

Ciphertext c = me mod n

                    = 445261 mod 4601

                    = 402

So, the encrypted message “dog” as one message m is 402

0 0

Discussions

Post the discussion to improve the above solution.