Use Euclid’s algorithm to find gcd(574, 182).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 574b = 182
gcd(574, 182) =
2.Easy
Find 869 mod 3, the remainder r with 0 ≤ r < 3.
a = 869n = 3
869 mod 3 =
3.Medium
Find the inverse of 34 modulo 65: the number x with 0 < x < 65 and 34·x ≡ 1 (mod 65).
a = 34n = 65
34−1 mod 65 =
4.Medium
Find the inverse of 26 modulo 35: the number x with 0 < x < 35 and 26·x ≡ 1 (mod 35).
a = 26n = 35
26−1 mod 35 =
5.Hard
Encrypt the message m = 392 with the RSA public key (n, e) = (799, 7). Find the ciphertext c.
n = 799e = 7m = 392
c =
6.Hard
Encrypt the message m = 308 with the RSA public key (n, e) = (989, 17). Find the ciphertext c.
n = 989e = 17m = 308
c =
Answer key
- 1. gcd(574, 182) = 14
- 2. 869 mod 3 = 2
- 3. 34−1 mod 65 = 44
- 4. 26−1 mod 35 = 31
- 5. c = 596
- 6. c = 854
Full step-by-step solutions: practise this topic on examproblems.com.