Next:
Up:
Previous:
Modular Arithmetic
(a mod n) + (b mod n) = (a + b) mod n
(a mod n) * (b mod n) = ab mod n
mod n = b
ab mod n = 1 (inverse)
Uses identities
a
2
c
mod n
=
(
a
c
)
2
mod n
and
a
2
c
+1
mod n
=
a
* (
a
c
)
2
mod n
.
Next:
Up:
Previous: