Find (471·158 + 74) mod 8 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 8
(471·158 + 74) mod 8 =
2.Easy
Find (−11) mod 10, the remainder r with 0 ≤ r < 10.
a = −11n = 10
(−11) mod 10 =
3.Medium
Find the inverse of 58 modulo 67: the number x with 0 < x < 67 and 58·x ≡ 1 (mod 67).
a = 58n = 67
58−1 mod 67 =
4.Medium
Find the inverse of 5 modulo 74: the number x with 0 < x < 74 and 5·x ≡ 1 (mod 74).
a = 5n = 74
5−1 mod 74 =
5.Hard
Encrypt the message m = 304 with the RSA public key (n, e) = (1147, 7). Find the ciphertext c.
n = 1147e = 7m = 304
c =
6.Hard
An RSA key uses the primes p = 31 and q = 37 and the public exponent e = 17. Find the private exponent d (0 < d < φ(n)).
p = 31q = 37e = 17
d =
Answer key
- 1. (471·158 + 74) mod 8 = 4
- 2. (−11) mod 10 = 9
- 3. 58−1 mod 67 = 52
- 4. 5−1 mod 74 = 15
- 5. c = 769
- 6. d = 953
Full step-by-step solutions: practise this topic on examproblems.com.