RSA starts by making a big number N by multiplying two secret prime numbers together. Because RSA's safety relies on how hard it is to split big numbers into primes, it is smart to learn about this splitting problem. We start by talking about the prime factorization theorem.
integer factorization
Given an integer , its integer factorization (or prime factorization) consists of the primes
which multiplied together give
as a result. To put it algebraically,
with each distinct, all
but not necessarily distinct, and
being the value of the number of distinct prime factors function. Theoretically, an integer is a product of all the prime numbers,
For example, the factorization of 32851 is 7×13×19×19, more usually expressed as 7×13×192. Because of the commutative property of multiplication, it does not matter in what order the prime factors are stated in, but it is customary to give them in ascending order, and to group them together by the use of exponents.
The factorization of a positive integer is unique (this is the fundamental theorem of arithmetic). For a negative number one could take the factorization of |n| and randomly give negative signs to one (or any odd number) of the prime factors. Alternatively, the factorization can be given as
(this is what Mathematica opts for).
Source: planetmath.org, https://web.archive.org/web/20160829110700/http://planetmath.org/integerfactorization
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.