You are on page 1of 3

(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.
Solution for (a).

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

2. Consider our authentication protocol in Figure 1 in which Alice authenticates herself to Bob,
which we saw works well (i.e., we found no flaws in it). Now suppose that while Alice is
authenticating herself to Bob, Bob must authenticate himself to Alice. Give a scenario by which
Trudy, pretending to be Alice, can now authenticate herself to Bob as Alice. (Hint: Consider
that the sequence of operations of the protocol, one with Trudy initiating and one with Bob
initiating, can be arbitrarily interleaved. Pay particular attention to the fact that both Bob and
Alice will use a nonce and that if care is not taken, the same nonce can be used maliciously.)

Figure 1 Protocol ap4.0 and a failure scenario


In protocol ap4.0 a nonce which is a number that protocol will only use once
in a lifetime. It means that if protocol uses a nonce, then that number will
never use it again.

In figure 1. shows the following step by step scenario:

i) First Alice authenticate herself to Bob by sending the message, ‘I am


Alice’ to Bob.

ii) Bob authenticate and sends a nonce, ‘R’ to Alice.

iii) Alice first encrypts the nonce using common symmetric secret key,
KA-B and sends the encrypted nonce, i.e. KA-B(R) to Bob. Here nonce
is mainly used to insure that Alice is live.

iv) Finally Bob decrypt the message received from Alice. If decrypt ed
nonce same as the nonce

sent by Alice then Alice is authenticated and also live.

Hence in figure 1. shows the protocol ap4.0 with no failure scenario.

You might also like