Use Euclid’s algorithm to find gcd(885, 840).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 885b = 840
gcd(885, 840) =
2.Easy
Use Euclid’s algorithm to find gcd(174, 33).
a = 174b = 33
gcd(174, 33) =
3.Medium
Solve 12x ≡ 5 (mod 35). Give the solution x with 0 < x < 35.
12x ≡ 5 (mod 35)
x =
4.Medium
Find the inverse of 7 modulo 11: the number x with 0 < x < 11 and 7·x ≡ 1 (mod 11).
a = 7n = 11
7−1 mod 11 =
5.Hard
An RSA key uses the primes p = 5 and q = 13 and the public exponent e = 11. Find the private exponent d (0 < d < φ(n)).
p = 5q = 13e = 11
d =
6.Hard
An RSA key uses p = 5, q = 43 and e = 19. Decrypt the ciphertext c = 106: find the message m.
p = 5q = 43e = 19c = 106
m =
Answer key
- 1. gcd(885, 840) = 15
- 2. gcd(174, 33) = 3
- 3. x = 15
- 4. 7−1 mod 11 = 8
- 5. d = 35
- 6. m = 141
Full step-by-step solutions: practise this topic on examproblems.com.