Find (648·55 + 130) mod 13 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 13
(648·55 + 130) mod 13 =
2.Easy
Find 945 mod 12, the remainder r with 0 ≤ r < 12.
a = 945n = 12
945 mod 12 =
3.Medium
Find the inverse of 24 modulo 43: the number x with 0 < x < 43 and 24·x ≡ 1 (mod 43).
a = 24n = 43
24−1 mod 43 =
4.Medium
Find the inverse of 29 modulo 64: the number x with 0 < x < 64 and 29·x ≡ 1 (mod 64).
a = 29n = 64
29−1 mod 64 =
5.Hard
Encrypt the message m = 476 with the RSA public key (n, e) = (481, 13). Find the ciphertext c.
n = 481e = 13m = 476
c =
6.Hard
An RSA key uses the primes p = 19 and q = 37 and the public exponent e = 5. Find the private exponent d (0 < d < φ(n)).
p = 19q = 37e = 5
d =
Answer key
- 1. (648·55 + 130) mod 13 = 7
- 2. 945 mod 12 = 9
- 3. 24−1 mod 43 = 9
- 4. 29−1 mod 64 = 53
- 5. c = 320
- 6. d = 389
Full step-by-step solutions: practise this topic on examproblems.com.