Common RSA Weaknesses: Shared Primes, Close Primes, and Bad Parameters

RSA is only as strong as the primes behind it. If two keys share a prime, or if p and q sit too close together, the modulus can be factored in seconds with a GCD or Fermat’s method. Here I explain the maths behind each weakness, with clean Python solves for four crypto challenges from the bi0s DD CTF.

November 12, 2026 · 15 min · 3048 words · Akshit Kathuria