(number theory) Any system of arithmetic for integers which, for some given positive integern, is equivalent to the set of integers being mapped onto the finite set {0, ... n} according to congruencemodulon, and in which addition and multiplication are defined consistently with the results of ordinary arithmetic being so mapped.

In this section we use two historical ciphers to introduce modular arithmetic with integers. Even though the historical ciphers are no longer relevant, modular arithmetic is extremely important in modern cryptography, especially for asymmetric algorithms.