Number theory & modular arithmetic worksheet with answers

Free printable Number theory & modular arithmetic worksheet: 6 problems from easy to exam level, with an answer key. Print it or save it as a PDF.

For teachers: free to print, copy and use in class. Every new worksheet has new values and its own answer key. A link to ExamProblems on your course page is appreciated.

Name: ____________________   Date: ____________

1.Easy

Find (143·97) mod 10 without multiplying out the large numbers: reduce first.

n = 10
(143·97) mod 10 =
2.Easy

Find 236² mod 11 without multiplying out the large numbers: reduce first.

n = 11
236² mod 11 =
3.Medium

Find the smallest positive integer x with x ≡ 4 (mod 5) and x ≡ 3 (mod 6).

x ≡ 4 (mod 5)x ≡ 3 (mod 6)
x =
4.Medium

Find Euler’s totient φ(85), the number of integers from 1 to 85 that are coprime to 85.

n = 85 = 5·17
φ(85) =
5.Hard
mc = me​ mod n572m = cd​ mod n?(n, e) = (703, 17)d

An RSA key uses p = 19, q = 37 and e = 17. Decrypt the ciphertext c = 572: find the message m.

p = 19q = 37e = 17c = 572
m =
6.Hard
271c = me​ mod n?m = cd​ mod nm(n, e) = (473, 19)d

Encrypt the message m = 271 with the RSA public key (n, e) = (473, 19). Find the ciphertext c.

n = 473e = 19m = 271
c =

Answer key

  1. 1. (143·97) mod 10 = 1
  2. 2. 236² mod 11 = 3
  3. 3. x = 9
  4. 4. φ(85) = 64
  5. 5. m = 124
  6. 6. c = 272

Full step-by-step solutions: practise this topic on examproblems.com.