Use Euclid’s algorithm to find gcd(112, 102).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 112b = 102
gcd(112, 102) =
2.Easy
Find (−107) mod 5, the remainder r with 0 ≤ r < 5.
a = −107n = 5
(−107) mod 5 =
3.Medium
Find the inverse of 63 modulo 67: the number x with 0 < x < 67 and 63·x ≡ 1 (mod 67).
a = 63n = 67
63−1 mod 67 =
4.Medium
Find the inverse of 19 modulo 43: the number x with 0 < x < 43 and 19·x ≡ 1 (mod 43).
a = 19n = 43
19−1 mod 43 =
5.Hard
An RSA key uses the primes p = 19 and q = 37 and the public exponent e = 11. Find the private exponent d (0 < d < φ(n)).
p = 19q = 37e = 11
d =
6.Hard
An RSA key uses the primes p = 23 and q = 37 and the public exponent e = 19. Find the private exponent d (0 < d < φ(n)).
p = 23q = 37e = 19
d =
Answer key
- 1. gcd(112, 102) = 2
- 2. (−107) mod 5 = 3
- 3. 63−1 mod 67 = 50
- 4. 19−1 mod 43 = 34
- 5. d = 59
- 6. d = 667
Full step-by-step solutions: practise this topic on examproblems.com.