Use Euclid’s algorithm to find gcd(885, 255).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 885b = 255
gcd(885, 255) =
2.Easy
Use Euclid’s algorithm to find gcd(132, 52).
a = 132b = 52
gcd(132, 52) =
3.Medium
Find Euler’s totient φ(52), the number of integers from 1 to 52 that are coprime to 52.
n = 52 = 22·13
φ(52) =
4.Medium
Find the inverse of 28 modulo 31: the number x with 0 < x < 31 and 28·x ≡ 1 (mod 31).
a = 28n = 31
28−1 mod 31 =
5.Hard
An RSA key uses the primes p = 23 and q = 31 and the public exponent e = 23. Find the private exponent d (0 < d < φ(n)).
p = 23q = 31e = 23
d =
6.Hard
How many solutions N does 64x ≡ 32 (mod 90) have in {0, 1, …, 89}?
64x ≡ 32 (mod 90)
N =
Answer key
- 1. gcd(885, 255) = 15
- 2. gcd(132, 52) = 4
- 3. φ(52) = 24
- 4. 28−1 mod 31 = 10
- 5. d = 287
- 6. N = 2
Full step-by-step solutions: practise this topic on examproblems.com.