

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This home work exercise is very helpful for the student of discrete mathematics. The major points in the exercises are: Cryptography, Encrypted Message, Number of Integers, Euclidean Algorithm, Inverse Number, Common Divisor, Original Message, Rsa Protocol, Two Variables, Even Number, Odd Numbers, Multiplication
Typology: Exercises
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Suppose that N is a prime in the RSA protocol of Example 17. How can the spy Joe find the message M if he has e, N and the encrypted message M e^ mod N = C?
Joe needs to decode the encrypted message, C, with help of d, since
Cd^ = (M e^ mod N )d^ = M ed^ mod N = M mod N (1)
However, to get the number d, Joe needs to calculate f (N ) first, since
ed mod f (N ) ≡ 1 (2) Therefore the first step is to find f (N ). By definition, f (N ) is the number of integers within the range of [1, N − 1] which are coprime with N. As a result, when N is a prime, all positive integers smaller than N are coprime with it, so we have f (N ) = N − 1. The next step is to find the value of d, which is the inverse of e mod f (N ). He can use an extended Euclidean algorithm to calculate the inverse number as follows. To find d in order to satisfy ed ≡ 1 mod f (N ), it is necessary to have gcd(e, f (N )) = 1. Otherwise, assume gcd(e, f (N )) = x > 1, e = kex and f (N ) = kf x. Since ed ≡ 1 mod f (N ), suppose ed = kedf (N ) + 1, we have ed = dkex = kedkf x + 1, thus x(dke − kedkf ) = 1. This contradicts
with the assumption that x > 1. As a result, we have gcd(e, f (N )) = 1. Theorem 5 on page N T -16 states that every common divisor of e and f (N ) (certainly including gcd(e, f (N ))) can be expressed as af f (N ) + aee, where both af and ae are integers. How to find af and ae is illustrated in Example 13 on page N T -19, where Euclidean algorithm is used again. After we get the value of af and ae satisfying af f (N ) + aee = gcd(e, f (N )) = 1, we have aee ≡ 1 − af f (N ) ≡ 1 mod f (N ). As a result, ae is the inverse of e with modulo f (N ) and we have d = ae. With help of d we can decrypt the received message C into the original message M using Equation 1.
Using the same numbers as in Example 17, decrypt the message 2.
As shown in Example 17, we have N = 77, e = 13 and d = 37. Now the received message M e^ mod N = 2, the original message is computed as
(M e)d^ mod N = 2^37 mod 77 = 137438953472 mod 77 = 51 (3)
As a result, the original message is 51.
Consider the RSA protocol (Example 17). Suppose that N = 5 × 13 and e = 7. What is d?
We have N = p × q = 5 × 13, thus f (N ) = (p − 1)(q − 1) = 4 × 12 = 48. Since we have e = 7 and ed ≡ 1 mod (f (N ) = 48), following the solution to Problem 2.12 we can easily generate the value of d. Specifically, we have gcd(e, f (N )) = 1 = 7e − 1 × f (N ), while 7e ≡ 1 + f (N ) ≡ 1 mod f (N ). As a result, we have 7e ≡ 1 mod f (N ) and d = 7.
Consider the RSA protocol (Example 17). Explain why d and e must both be chosen to be odd.