Use Euclid’s algorithm to find gcd(663, 494).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 663b = 494
gcd(663, 494) =
2.Easy
Use Euclid’s algorithm to find gcd(342, 243).
a = 342b = 243
gcd(342, 243) =
3.Medium
Find the inverse of 25 modulo 34: the number x with 0 < x < 34 and 25·x ≡ 1 (mod 34).
a = 25n = 34
25−1 mod 34 =
4.Medium
Solve 27x ≡ 56 (mod 71). Give the solution x with 0 < x < 71.
27x ≡ 56 (mod 71)
x =
5.Hard
Encrypt the message m = 179 with the RSA public key (n, e) = (209, 11). Find the ciphertext c.
n = 209e = 11m = 179
c =
6.Hard
An RSA key uses the primes p = 7 and q = 29 and the public exponent e = 23. Find the private exponent d (0 < d < φ(n)).
p = 7q = 29e = 23
d =
Answer key
- 1. gcd(663, 494) = 13
- 2. gcd(342, 243) = 9
- 3. 25−1 mod 34 = 15
- 4. x = 31
- 5. c = 69
- 6. d = 95
Full step-by-step solutions: practise this topic on examproblems.com.