LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

What is the zero-divisor problem in modular arithmetic, and why doesn't factoring work the same as with real numbers?

In modular arithmetic, $a \cdot b \equiv 0 \mod N$ does NOT mean that $a = 0$ or $b = 0$ — there can be "zero divisors," which is fundamentally different from real numbers.

For real numbers: $a \cdot b = 0 \Leftrightarrow a = 0$ or $b = 0$ (zero-product property)

For modular arithmetic: only the easy direction holds — $a = 0$ or $b = 0 \Rightarrow a \cdot b \equiv 0 \mod N$. The reverse ("$\Leftarrow$") does NOT: a product can be $\equiv 0$ even when neither factor is. Such non-zero $a, b$ with $a \cdot b \equiv 0$ are called zero divisors.

Examples:

  • $5 \cdot 4 \equiv 20 \equiv 0 \mod 10$, but neither 5 nor 4 is 0
  • $2 \cdot 3 \equiv 6 \equiv 0 \mod 6$, but neither 2 nor 3 is 0
  • $4 \cdot 6 \equiv 24 \equiv 0 \mod 8$, but neither 4 nor 6 is 0

When does this happen? When N is composite and the factors of a and b combine to produce a multiple of N.

When is it NOT a problem? When N is prime — then $\mathbb{Z}_p$ has no zero divisors. This is one reason prime moduli are preferred in cryptography.

Go deeper:

From Quiz: KRYPTOG / Mathematics for Asymmetric Cryptography | Updated: Jul 14, 2026