Find (−8) mod 6, the remainder r with 0 ≤ r < 6.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = −8n = 6
(−8) mod 6 =
2.Easy
Find 622² mod 7 without multiplying out the large numbers: reduce first.
n = 7
622² mod 7 =
3.Medium
Find the smallest positive integer x with x ≡ 3 (mod 4) and x ≡ 4 (mod 5).
x ≡ 3 (mod 4)x ≡ 4 (mod 5)
x =
4.Medium
Find the smallest positive integer x with x ≡ 3 (mod 5) and x ≡ 10 (mod 11).
x ≡ 3 (mod 5)x ≡ 10 (mod 11)
x =
5.Hard
An RSA key uses p = 13, q = 17 and e = 7. Decrypt the ciphertext c = 74: find the message m.
p = 13q = 17e = 7c = 74
m =
6.Hard
Encrypt the message m = 971 with the RSA public key (n, e) = (1081, 5). Find the ciphertext c.
n = 1081e = 5m = 971
c =
Answer key
- 1. (−8) mod 6 = 4
- 2. 622² mod 7 = 1
- 3. x = 19
- 4. x = 43
- 5. m = 48
- 6. c = 135
Full step-by-step solutions: practise this topic on examproblems.com.