If is a product of 2 prime numbers and , what is ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The Pollard's rho algorithm is one way of factoring such a number which has an expected running time proportional to the square root of the smallest prime factor of the composite number.
The proof of the algorithm is as follows:
Consider N = p q , the Euler-Fermat theorem states that, a p − 1 ≡ 1 ( m o d p ) for all a relativelly prime to p . Suppose p − 1 is a factor of L . Then L = ( p − 1 ) k , so:
a L ≡ ( a p − 1 ) k ( m o d p ) ≡ 1 ( m o d p )
So p divides a L − 1 , since p is a factor os N , the G C D of a L − 1 and N must include N.
If L = k ! then it must include p − 1 as one of its factors for a large enough k .
The algorithm consists as follow:
Since N = p ∗ q we can simply get the other factor by computing p N , doing so, we get:
p = 48112959837082048697
q = 54673257461630679457
p + q = 102786217298712728154
Here is my Python implementation of the algorithm: