Find (116·403 + 399) mod 6 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 6
(116·403 + 399) mod 6 =
2.Easy
Use Euclid’s algorithm to find gcd(555, 495).
a = 555b = 495
gcd(555, 495) =
3.Medium
Solve 37x ≡ 31 (mod 95). Give the solution x with 0 < x < 95.
37x ≡ 31 (mod 95)
x =
4.Medium
Solve 27x ≡ 79 (mod 83). Give the solution x with 0 < x < 83.
27x ≡ 79 (mod 83)
x =
5.Hard
An RSA key uses p = 17, q = 31 and e = 17. Decrypt the ciphertext c = 169: find the message m.
p = 17q = 31e = 17c = 169
m =
6.Hard
Encrypt the message m = 121 with the RSA public key (n, e) = (1271, 11). Find the ciphertext c.
n = 1271e = 11m = 121
c =
Answer key
- 1. (116·403 + 399) mod 6 = 5
- 2. gcd(555, 495) = 15
- 3. x = 83
- 4. x = 6
- 5. m = 390
- 6. c = 576
Full step-by-step solutions: practise this topic on examproblems.com.