Find (395·202) mod 6 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 6
(395·202) mod 6 =
2.Easy
Find 921 mod 9, the remainder r with 0 ≤ r < 9.
a = 921n = 9
921 mod 9 =
3.Medium
Find the inverse of 21 modulo 29: the number x with 0 < x < 29 and 21·x ≡ 1 (mod 29).
a = 21n = 29
21−1 mod 29 =
4.Medium
Find the inverse of 23 modulo 37: the number x with 0 < x < 37 and 23·x ≡ 1 (mod 37).
a = 23n = 37
23−1 mod 37 =
5.Hard
Encrypt the message m = 19 with the RSA public key (n, e) = (187, 11). Find the ciphertext c.
n = 187e = 11m = 19
c =
6.Hard
An RSA key uses p = 7, q = 41 and e = 13. Decrypt the ciphertext c = 248: find the message m.
p = 7q = 41e = 13c = 248
m =
Answer key
- 1. (395·202) mod 6 = 2
- 2. 921 mod 9 = 3
- 3. 21−1 mod 29 = 18
- 4. 23−1 mod 37 = 29
- 5. c = 8
- 6. m = 241
Full step-by-step solutions: practise this topic on examproblems.com.