Attacking RSA by factoring coprimes