**Prime **
**factors** (http://en.wikipedia.org/wiki/Prime_factor) are prime numbers that exactly divide an integer without leaving a remainder. Finding prime factors seems almost impossible for big numbers. Therefore, prime factors have an application in cryptography. However, using the right algorithm—Fermat's factorization method (http://en.wikipedia.org/wiki/Fermat%27s_factorization_method) and NumPy—factoring becomes relatively easy for small numbers. The idea is to factor a number *N* into two numbers, *c* and *d*, according to the following equation:

We can apply the factorization recursively until we get the required prime factors. ...

Start Free Trial

No credit card required