DUE Friday, October 2nd, 2026

New tool: the CRT Demo page shows the Chinese Remainder Theorem as two meshed gears (mod mm and mod nn) turning a big mod mnmn dial, along with the table from class. Try it with mm and nn coprime, and then with mm and nn sharing a factor.

Relevant Textbook Sections:

3.3 (Computing modular inverses), 3.4 (Sunzi’s Theorem (Chinese Remainder Theorem)).

To Do:

  1. Find the inverse of 3535 modulo 6161. Use the extended Euclidean algorithm. Verify your answer by multiplying out.
  2. Try out this Chinese Remainder Theorem problem, by hand: x≡3(mod244)x \equiv 3 \pmod{244} and x≡17(mod495)x \equiv 17 \pmod{495}. Show all the steps of the process, including the extended Euclidean algorithm. You can use the computer to do modular arithmetic for you (e.g. multiplying things if needed), but show the steps as if doing it by hand.
  3. Use any remaining time to do extra examples of CRT problems (you can make up your own by just putting in whatever numbers you want, as long as the moduli are coprime, and you can always check your answer by plugging it back into the original equations). The CRT Demo page can solve small ones too (moduli up to 20), so you can check your answers there.
  4. (AI suggestion) Sunzi’s original problem (c. 3rd–5th century): “There are certain things whose number is unknown. Counted by threes, two are left over; by fives, three are left over; by sevens, two are left over. How many things are there?” Solve it using CRT with three congruences.
  5. (AI suggestion) When the moduli are not coprime, CRT can fail. Does x≡3(mod6)x \equiv 3 \pmod 6, x≡5(mod8)x \equiv 5 \pmod 8 have a solution? What about x≡1(mod6)x \equiv 1 \pmod 6, x≡2(mod8)x \equiv 2 \pmod 8? Explain when such a system has a solution, and how many solutions it has modulo 2424.
  6. (AI suggestion) Another way to invert modulo a prime: by Fermat’s little theorem, a−1≡ap−2(modp)a^{-1} \equiv a^{p-2} \pmod p. Compute 3559 mod 6135^{59} \bmod 61 and compare with problem 1. Which method would you rather use for a 300-digit prime, and why? Which method still works modulo a composite nn?
  7. (AI suggestion) CRT speeds up RSA. Alice’s key from the last daily post is n=3233=61⋅53n = 3233 = 61 \cdot 53, e=17e = 17, d=2753d = 2753, and she receives the ciphertext c=2790c = 2790. Instead of computing cd mod 3233c^{d} \bmod 3233 directly, compute cd mod 61c^{d} \bmod 61 and cd mod 53c^{d} \bmod 53 (why may you reduce the exponent dd modulo 6060 and modulo 5252 respectively?), and then combine the two answers with CRT. Check your answer against the direct computation. Why is this faster?
  8. (AI suggestion) Håstad’s broadcast attack. Bob sends the same message mm to three friends, all using e=3e = 3, with public moduli n1=55n_1 = 55, n2=391n_2 = 391, n3=1189n_3 = 1189. Eve sees the ciphertexts c1=3c_1 = 3, c2=189c_2 = 189, c3=370c_3 = 370. Use CRT to find XX modulo n1n2n3n_1 n_2 n_3 with X≡ci(modni)X \equiv c_i \pmod{n_i} for each ii. Explain why XX must equal m3m^3 exactly (as an integer, not just modulo something), and recover mm. What does this suggest about sending the same message to several people with a small ee?