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 (207·352 + 346) mod 12 without multiplying out the large numbers: reduce first.

n = 12
(207·352 + 346) mod 12 =
2.Easy

Find (121·930 + 474) mod 13 without multiplying out the large numbers: reduce first.

n = 13
(121·930 + 474) mod 13 =
3.Medium

Find the inverse of 62 modulo 85: the number x with 0 < x < 85 and 62·x ≡ 1 (mod 85).

a = 62n = 85
62−1 mod 85 =
4.Medium

Solve 5x ≡ 8 (mod 17). Give the solution x with 0 < x < 17.

5x ≡ 8 (mod 17)
x =
5.Hard
mc = me​ mod n387m = cd​ mod n?(n, e) = (893, 13)d

An RSA key uses p = 19, q = 47 and e = 13. Decrypt the ciphertext c = 387: find the message m.

p = 19q = 47e = 13c = 387
m =
6.Hard
mc = me​ mod n147m = cd​ mod n?(n, e) = (1271, 11)d

An RSA key uses p = 31, q = 41 and e = 11. Decrypt the ciphertext c = 147: find the message m.

p = 31q = 41e = 11c = 147
m =

Answer key

  1. 1. (207·352 + 346) mod 12 = 10
  2. 2. (121·930 + 474) mod 13 = 8
  3. 3. 62−1 mod 85 = 48
  4. 4. x = 5
  5. 5. m = 843
  6. 6. m = 891

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