Modular arithmetic
Modular arithmetic wraps numbers around a fixed boundary, like hours on a clock. Bitcoin's signature mathematics uses this kind of arithmetic.
Loading lesson visuals...
Learn the idea
Modular arithmetic keeps only the remainder after division by a fixed number called the modulus. Written a mod n, two integers are equivalent when they leave the same remainder after division by n. Closure means that applying the group operation to allowed values produces another allowed value. Cryptographic groups use wraparound arithmetic and closure so operations stay inside a finite set.
Choose a modulus
With modulus 7, the allowed remainders are 0 through 6. Any integer maps to exactly one of those values.
Inspect every idea above to open it.
It deterministically maps every integer to a remainder class. Cryptographic security comes from carefully chosen hard problems, not from unpredictable remainder calculation.
The questions unlock after every required learning activity
Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.