Section 6. Factoring. The Pollard ( [Maple Math] ) factoring method.

In a nutshell, John Pollard's famous ( [Maple Math] ) factorisation method (1974) gives a strategy - based on an ingenious use of Fermat's little theorem ( full details are available in the [Maple Math] year Maple section of my web site) - for uncovering a prime factor of an integer n , if that n has a prime factor p such that ( [Maple Math] ) has only relatively small prime factors...

And why - apart from its intrinsic interest - might one want to find a factor? Well one need look no further than the renowned RSA cryptographic method (a full treatment of which may be read in my Maple public lecture Bill Clinton, Bertie Ahern, and digital signatures ): the basis for its security rests on the current difficulty of the famous factorisation problem , of finding a fast method (or prove there isn't one) for factoring general n .

Note . In the following examples, Maple is using the 1971 Brillhart-Morrison continued fraction factorisation method.

> ifactor(15);

[Maple Math]

> n23 := 23!;

[Maple Math]

> length(n23);

[Maple Math]

> ifactor(n23);

[Maple Math]

> ifactor(n23 + 1);

[Maple Math]

>

> n90 := 90!;

[Maple Math]
[Maple Math]

> length(n90);

[Maple Math]

> ifactor(n90);

[Maple Math]
[Maple Math]

But Maple cannot factor ( [Maple Math] ) (and I've placed the 'comment sign', # , before the command to prevent re-execution.

> # ifactor(n90 + 1);

> ifactor(n90 + 1, easy);

[Maple Math]

which informs that ( [Maple Math] ) is a c omposite ' 139 ' digit number.

Note . That 139 digit number may be proved to be composite (not prime) by using Fermat's little theorem:

if ( [Maple Math] ) is prime, one would have [Maple Math] (mod [Maple Math] )

for all integers a not divisible by ( [Maple Math] ).

So, testing to see what happens when [Maple Math] , one finds:

> 2&^n90 mod (n90 + 1);

[Maple Math]
[Maple Math]

>

and so it follows immediately that ( [Maple Math] ) is not prime. (One says that ( [Maple Math] ) has failed the Lucas-Fermat test to the base 2.)

Note . On [Maple Math] April this year, Sean Irvine announced to the Number Theory mailing list the complete factorisation of ( [Maple Math] ); it is the product of three primes, [Maple Math] :

> p := 1381173038633;

[Maple Math]

> q := 42025070023047325132446149666132026718715669472074383;

[Maple Math]

> r := 25596421444788555447555320241499448369527283715169223676054601753562783959;

[Maple Math]

> is(n90 + 1 = p*q*r);

[Maple Math]

>

Now here is the famous 129 digit number, RSA129:

> RSA129 := 114381625757888867669235779976146612010218296721242362562561842935706935245733897830597123563958705058989075147599290026879543541;

[Maple Math]
[Maple Math]

> length(RSA129);

[Maple Math]

>

I am certainly NOT going to attempt to factor it!! It first came to public attention in Martin Gardiner's much read column in the August 1997 issue of the Scientific American.

Rivest, Shamir and Adleman (of RSA fame) threw this number out as a challenge to be factored. Given the then state of mathematical knowledge (as far as factoring was concerned) and computer power, they estimated that it would take some 20,000 years to factor it, and thereby decrypt a message which they had encrypted using it as the ' n ' part of a public modulus.

Briefly, a method known as the 'Quadratic Sieve' - introduced in 1981 by the US mathematician Carl Pomerance - together with thousands of computers worldwide (organised by the Dutch mathematician Arjen Lenstra) - factored it by April 1994, and decrypted the RSA-encrypted message (which, incidentally, was: " The magic

words are squeamish ossifrage. ") Lenstra, and his co-workers found that RSA_129 was the product of the two prime numbers (I show them individually, then their produst, and then show their product really is RSA_129):

> f1 := 3490529510847650949147849619903898133417764638493387843990820577;

[Maple Math]

> length(f1);

[Maple Math]

>

> f2 := 32769132993266709549961988190834461413177642967992942539798288533;

[Maple Math]

> length(f2);

[Maple Math]

>

> f1*f2;

[Maple Math]
[Maple Math]

> is(RSA129 = f1*f2);

[Maple Math]

>

If I were to foolishly enter the Maple command:

> # ifactor(RSA_129);

>

then the timer would stay on for MANY, MANY years ... .

>

I am going to create a number - which I will call by the name 'much_greater_than_RSA129' - which will have these properties:

it will be the product of two primes 'P' and 'Q'

I will choose P to be f2 (the greater of the two primes whose product is RSA129)

I will choose Q to be much greater than P

Those choices will automatically make 'much_greater_than_RSA129' be much greater than RSA129 (hence the name).

This is how I will do it:

> P := f2;

[Maple Math]

>

To save time in my lecture I neutralise the following command, but beforehand copy and paste the output to the next command line.

> # Q := nextprime(4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903679999999999999630);

> Q := 4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000001;

[Maple Math]

>

> much_greater_than_RSA129 := P*Q;

[Maple Math]
[Maple Math]

> length(much_greater_than_RSA129);

[Maple Math]

>

But that MUCH LARGER number can now be factored in seconds by exploiting the Pollard ( [Maple Math] ) factorisation method:

> Pollard := proc(n)
local a,k;
a[1]:=2:
for k from 2 while igcd(n,a[k-1]-1 mod n)=1
do a[k]:=a[k-1]&^k mod n od;
lprint(n,`is the PRODUCT of`, igcd(n, a[k-1]-1 mod n), `and`,
n/igcd(n, a[k-1]-1 mod n))
end:

> Pollard(much_greater_than_RSA129);

146481808053566948606112326494160580676597757390203425433760346556289969224977192583652803722778590707655656624536558761037114144280380743982554672552469432942539798288533   is the PRODUCT of   4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000001   and   32769132993266709549961988190834461413177642967992942539798288533

>

Wonderful? Yes? Of course I deliberately made up the prime Q so that all the prime factors of ( [Maple Math] ) were small:

> ifactor(Q - 1);

[Maple Math]

>

You may have noticed that I choose Q so that the prime factors of Q are the first twenty-one primes: 2, 3, 5, ... , 71 and 73.

Finally, look at the two prime factors - f1 and f2 - of the RSA129 number; see how they behave:

> ifactor(f1 - 1);

[Maple Math]

> ifactor(f2 - 1);

[Maple Math]

>

Rivest, Shamir and Adleman knew what they were doing when the made up RSA129!!

And here you can see why it had been so difficult to find the prime factors q and r of ( [Maple Math] ):

> ifactor(q-1, easy);

[Maple Math]

> ifactor(r-1, easy);

[Maple Math]

>

Contact details 

After August 31st 2007 please use the following Gmail address: jbcosgrave at gmail.com


This page was last updated 18 February 2005 15:08:42 -0000