so we know both and . Thus we know the polynomial
whose roots are and . These roots can be found using the quadratic formula.
sage: def crack_rsa(n, phi_n): ... R.<x> = PolynomialRing(QQ) ... f = x^2 - (n+1 -phi_n)*x + n ... return [b for b, _ in f.roots()] sage: crack_rsa(31615577110997599711, 31615577098574867424) [8850588049, 3572144239]
William 2007-06-01