Loading...
Loading...
Cryptography · Axiom Academy
LESSON Modular Arithmetic Review Essential mathematical foundation for modern cryptography The modulo operation finds the remainder after division. When we compute a mod n , we're asking: "What's left over after dividing a by n ?" The most intuitive example is clock arithmetic . A clock has 12 hours, so it operates in "mod 12". If it's 10 o'clock and we wait 5 hours, we don't get 15 o'clock—we get 3 o'clock. 2. Modular Addition & Multiplication One of the most powerful features of modular arithmetic is that we can reduce numbers at any point in a calculation without changing the final result. This means we can work with smaller numbers throughout our computation, which is crucial for cryptography where we often deal with very large numbers. Computing a b mod n is fundamental to RSA encryption and many other cryptographic systems. For large values of b , this would be impossible to compute directly—but modular arithmetic lets us break it down. The key insight: we can reduce after each multiplication, keeping our numbers manageable even when raising to enormous powers. Mathematicians use a special notation to indicate that two numbers have the same remainder when divided by n : We read this as " a is congruent to b modulo n ". This means a and b leave the same remainder when divided by n . 5. Why Modular Arithmetic Powers Cryptography Modular arithmetic has unique properties that make it ideal for encryption:
This is the written version of the interactive lesson above. See the full Cryptography course.