Friday, February 25, 2011

Crypto codes: Pollard’s p − 1 factorization algorithm

Code here
It uses prime factor code from square root

Output shows the steps of the algorithm with results:
Find prime factors of 48356747:
2^19! -1 = 13944673 (mod 48356747)
gcd(2^19!-1,48356747) = 6917
factors of 48356747, p=6917, and q=48356747/6917=6991
The prime factorization of 6916 is: 2, 2, 7, 13, 19

The prime factorization of 6990 is: 2, 3, 5, 233

No comments: