Find (577·334 + 48) mod 12 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 12
(577·334 + 48) mod 12 =
2.Easy
Find the least common multiple lcm(116, 98). Use Euclid’s algorithm for the gcd first.
a = 116b = 98
lcm(116, 98) =
3.Medium
Solve 13x ≡ 18 (mod 31). Give the solution x with 0 < x < 31.
13x ≡ 18 (mod 31)
x =
4.Medium
Find the inverse of 9 modulo 31: the number x with 0 < x < 31 and 9·x ≡ 1 (mod 31).
a = 9n = 31
9−1 mod 31 =
5.Hard
Encrypt the message m = 57 with the RSA public key (n, e) = (341, 7). Find the ciphertext c.
n = 341e = 7m = 57
c =
6.Hard
An RSA key uses p = 31, q = 43 and e = 13. Decrypt the ciphertext c = 1273: find the message m.
p = 31q = 43e = 13c = 1273
m =
Answer key
- 1. (577·334 + 48) mod 12 = 10
- 2. lcm(116, 98) = 5684
- 3. x = 30
- 4. 9−1 mod 31 = 7
- 5. c = 150
- 6. m = 159
Full step-by-step solutions: practise this topic on examproblems.com.