A common-factors attack breaks RSA when two independently generated public moduli reuse a prime. For public keys (n1,e1) and (n2,e2), computing gcd(n1,n2) reveals the shared prime rather than 1. An attacker can then divide each affected modulus to recover its other factor and reconstruct the private key. section 8.4.1
The failure is not RSA arithmetic itself but key generation: poor entropy or a weak random-number generator can cause devices to select the same primes. Public RSA keys are sufficient for detection, so one faulty population can expose multiple private keys and encrypted traffic. section 8.4.1
Shared prime example
n2 = 269 × 839 and n3 = 151 × 269 share 269, so gcd(225691,40619) = 269. That GCD immediately factors both moduli enough to recover their private-key material. section 8.4.1
Figure 8.15 Moduli that share prime factors reveal the shared factor when calculating their GCD.
The figure visualizes why a nontrivial GCD of two RSA moduli exposes their reused prime factor. section 8.4.1
