Modular Arithmetic
← Back to Number Theory
Arithmetic on integers where numbers “wrap around” after reaching a modulus. a mod n gives the remainder when a is divided by n. Fundamental to cryptography (RSA, Diffie-Hellman), hash functions, and random number generators. Supports addition, subtraction, multiplication, and modular exponentiation.
mathematics-for-cs discrete-mathematics number-theory modular-arithmetic