Use Euclid’s algorithm to find gcd(434, 168).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 434b = 168
gcd(434, 168) =
2.Easy
Find (−24) mod 7, the remainder r with 0 ≤ r < 7.
a = −24n = 7
(−24) mod 7 =
3.Medium
Find the inverse of 5 modulo 67: the number x with 0 < x < 67 and 5·x ≡ 1 (mod 67).
a = 5n = 67
5−1 mod 67 =
4.Medium
Find the inverse of 41 modulo 67: the number x with 0 < x < 67 and 41·x ≡ 1 (mod 67).
a = 41n = 67
41−1 mod 67 =
5.Hard
Use repeated squaring to find 5393 mod 60.
a = 53k = 93n = 60
5393 mod 60 =
6.Hard
Encrypt the message m = 341 with the RSA public key (n, e) = (377, 19). Find the ciphertext c.
n = 377e = 19m = 341
c =
Answer key
- 1. gcd(434, 168) = 14
- 2. (−24) mod 7 = 4
- 3. 5−1 mod 67 = 27
- 4. 41−1 mod 67 = 18
- 5. 5393 mod 60 = 53
- 6. c = 42
Full step-by-step solutions: practise this topic on examproblems.com.