finds four factors: 211, 2,218,561, 33,647 and 523,213, suggesting that we take a as the product of the first two and b as the product of the other two: a = 468,116,371 and b = 17,604,547,811.
The two keys are therefore (a, n) and (b, n). They can be used to encrypt and decrypt numbers x between 0 and n – 1 as follows:
f (x) = *xa (mod n) and g (x) = xb (mod n*).
These computations must be handled with care! We need to define an exponentiation function that avoids overflow.
The idea is to define multiplication modulo n as follows:` Mult := proc(b,c,n) irem(b*c,n); end;`