Use Euclid’s algorithm to find gcd(693, 147).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 693b = 147
gcd(693, 147) =
2.Easy
Use Euclid’s algorithm to find gcd(136, 92).
a = 136b = 92
gcd(136, 92) =
3.Medium
Find the inverse of 68 modulo 83: the number x with 0 < x < 83 and 68·x ≡ 1 (mod 83).
a = 68n = 83
68−1 mod 83 =
4.Medium
Find the inverse of 15 modulo 29: the number x with 0 < x < 29 and 15·x ≡ 1 (mod 29).
a = 15n = 29
15−1 mod 29 =
5.Hard
An RSA key uses p = 17, q = 47 and e = 11. Decrypt the ciphertext c = 321: find the message m.
p = 17q = 47e = 11c = 321
m =
6.Hard
Use repeated squaring to find 55161 mod 58.
a = 55k = 161n = 58
55161 mod 58 =
Answer key
- 1. gcd(693, 147) = 21
- 2. gcd(136, 92) = 4
- 3. 68−1 mod 83 = 11
- 4. 15−1 mod 29 = 2
- 5. m = 434
- 6. 55161 mod 58 = 41
Full step-by-step solutions: practise this topic on examproblems.com.