There are applications of modular arithmetic all around us - some of which are used so frequently that you might not even realize it! Our clocks follow a mod 12 or mod 24 pattern and our weeks are a cycle of mod 7. A more complex application of modular arithmetic can be found in check codes. Check codes are used to identify the validity of passports, bank account, credit card numbers, ISBN book numbers, and more. These numbers all follow certain rules and modular arithmetic is used to check them. For example, the rule for airline ticket numbers is as follows: “This number can be any length. It uses the digits 0 to 9 and the last digit is a check digit. The number formed by omitting the check digit must be congruent to the check digit modulo 7. That is \(a_1…a_na_{n+1}\) where \(a_1a_2…a_n ≡ a_{n+1} (mod 7)\). For example, 2943739573 is a valid number because 294373957 ≡ 3 (mod 7)” (Check codes, n.d.).
Another example is with United States (US) Banks, “These are nine digit identification numbers \(a_1a_2…a_9\) using the digits of 0 to 9 where \(7a_1 + 3a_2 + 9a_3 + 7a_4 + 3a_5 + 9a_6 + 7a_7 + 3a_8 ≡ a_9 (mod 10)\). For example, 123456780 is a valid US bank identification number” (Check codes, n.d.).
One of the main applications of modular arithmetic is in the practice of cryptography. Cryptography is “the practice and study of techniques for secure communication in the presence of third party adversaries” (Cheung, 2024, “Cryptography” section). Cryptography is used to encrypt messages and send them to a receiver in a way that if the message is intercepted by an enemy, the enemy will not be able to decode it. Cryptography requires two parts: a secret algorithm for encrypting and decrypting a message and a secret key that gives the receiver information on how to decrypt the message. RSA cryptography is a well-known and effective cipher system that relies on modular arithmetic. It got its name from the three researchers who created it, Rivest-Shamir-Adleman. This method requires a public key made up of a number p*q, a number e (both used to encrypt the message), and a private key used to decrypt the message (Epp, 2010).
P and q are large prime numbers, and e is a number relatively prime to (p-1)(q-1). RSA uses modular exponentiation to encrypt a message using the public key where C is the message received and M is the actual message manipulated into a number system. The encryption follows this function: \(C = M^e (mod (pq))\). In order to decrypt the message, the receiver uses a number d, a positive inverse to e modulo (p-1)(q-1). The security of this process comes from the fact that it is nearly impossible to find the necessary information to decrypt the message without the private key, even using a powerful computer (Epp, 2010).
As you have discovered, modular arithmetic plays a key role in securing digital communication and verifying identification numbers in the world around us. The next time you look at a clock or use your credit card, consider the remarkable concept that is modular arithmetic.