LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

Why is the prime factorization of a whole number unique, and why does that uniqueness matter for cryptography?

Every integer greater than 1 factors into primes in exactly one way (up to the order of the factors) — the Fundamental Theorem of Arithmetic. That uniqueness is what makes "the factorization of $N$" a well-defined secret.

Factor tree: the unique prime factorization of 21420

* However you split it, a number reaches the same prime factorization — here 21420 = 2²·3²·5·7·17. That uniqueness is what makes 'the factors of N' a well-defined RSA secret. *

The theorem: any natural number $n > 1$ can be written as a product of prime powers $n = p_1^{a_1} \cdot p_2^{a_2} \cdots p_k^{a_k}$, and that representation is unique — there is no second, genuinely different set of primes whose product is the same $n$. (0 and 1 are neither prime nor composite, so they are excluded.)

Examples:

  • $144 = 2^4 \cdot 3^2$ — and no other combination of primes multiplies to 144
  • $21420 = 2^2 \cdot 3^2 \cdot 5 \cdot 7 \cdot 17$

Why it matters for RSA: the modulus $N = p \cdot q$ has exactly one prime factorization, namely the pair $p, q$. That is the trapdoor: whoever knows this unique pair can compute $\varphi(N) = (p-1)(q-1)$ and invert the encryption, while everyone else faces the (believed-hard) problem of finding it. If a number could be split into primes several different ways, "knowing the factors" would not be a meaningful secret.

Common misconception: that a large number can "often be written as a product of primes in several ways." False — the factorization is always unique; only discovering it is hard for a large $N$, and that hardness is exactly what RSA leans on.

Go deeper:

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