You are part of the Cryptographic Security Team at a military facility, tasked w
ID: 3846080 • Letter: Y
Question
You are part of the Cryptographic Security Team at a military facility, tasked with decoding messages as required. A message has come in from HQ, as an ordered collection of numbers, which is personalised for yourself and aimed at testing aspects of your decoding skills. 247500, 6592, 82121, 76332, 296445, 64710, 164949, 206921, 266199, 315721, 329746, 442869 These numbers (above) have each been encoded using RSA with a modulus of m = p q = 496241 (with p and q being primes) and encoding exponent of 218821. You are advised that {13631, 142703} is a valid encoding decoding pair for the same modulus, m. (a) Use this information to determine phi (m) for this modulus. (Using software to directly factorise m is not a valid option for doing this part.) (b) Verify your answer by determining the primes p and q. Show how these combine to give both m and phi (m). (c) Calculate the decoding exponent for 218821, as encoding exponent, using the extended Euclidean algorithm. (Again, using software to directly obtain this is not a valid option, though you are welcome to use software to confirm your answer.) (d) For each of the 12 numbers in your message, verify they have no prime factors in common with m. (It is OK to use software for this task, provided you have answered the previous part.)Explanation / Answer
Given m=pq = 496241
exponent e = 218821
Factors of m=496241 are 677 × 733
Therefore p = 677
q = 733
a)(m) = (p - 1) * (q - 1)
= (677-1)) * (733-1)
= 676 * 732
= 494832
b) p = 677
q = 733
c) Given, encoding exponent e = 218821
Now, Based on extended euclidean algorithm goal is to find d such that ed = 1 mod (m)
* calculate x and y such that ax+by=gcd(a,b).
Here, a=e, b=(m), and thus gcd(e,(m))=1
Now, ex+(m)y = 1
In this case "x" is decoded exponent (x=d)
we have, e = 218821 and (m) = 494832
ex+(m)y = 1 => 218821x + 494832y = 1
we need to solve this equation for finding "x".
we can write, 494832 = 2*218821 + 57190 ( with e and (m))
similarly, 218821 = 3*57190 + 47251
now, 57190 = 1*47251 + 9939
47251 = 4*9939 + 7495
9939 = 1*7495 + 2444
7495 = 3*2444 + 163
2444 = 14*163 + 162
163 = 1*162 + 1
write last one as 163 - 1*162 = 1
Now substitute in place of 162 as => 163 - 1*(2444 - 14*163) = 1 and so on
=> 163 - 1*(2444 - 14*(7495 - 3*2444)) = 1
=> 163 - 1*(2444 - 14*(7495 - 3*(9939 - 1*7495))) = 1
=> 163 - 1*(2444 - 14*(7495 - 3*(9939 - 1*(47251 - 4*9939)))) = 1
=> 163 - 1*(2444 - 14*(7495 - 3*(9939 - 1*(47251 - 4*(57190 - 1*47251))))) = 1
=> 163 - 1*(2444 - 14*(7495 - 3*(9939 - 1*(47251 - 4*(57190 - 1*(218821 - 3*57190)))))) = 1
=> 163 - 1*(2444 - 14*(7495 - 3*(9939 - 1*(47251 - 4*(57190 - 1*(218821 - 3*(494832 - 2*218821))))))) = 1
Make this as a linear combination of e and (m) i.e, 218821 and 494832
i.e, (d)* 218821 + (some constant)*(494832) = 1
you will get the "d" value and it is the decode exponent of the given "e" value.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.