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

Solving Classical and Homebrew Ciphers

Most CTF cipher challenges come down to a few ideas: modular arithmetic, substitution with a repeating key, reused XOR keystreams, and historical machines. This post covers how I identify which one I’m facing, then works through four challenges from the bi0s DD CTF: a modulo ‘hash’ that can be inverted, an Enigma message, a broken AES-CTR implementation, and a Vigenère cipher with an extended alphabet.

November 12, 2026 · 12 min · 2464 words · Akshit Kathuria

When Symmetric Crypto Goes Wrong: AES Key-as-IV and XOR Mistakes

AES is not broken, but code that uses it often is. Here I explain why reusing the key as the CBC initialisation vector can hand an attacker the key itself, and why home-made XOR ciphers fall to known plaintext and key reuse. Each mistake comes with a working Python demonstration, the correct pattern, and a worked example from the bi0s DD CTF.

November 12, 2026 · 17 min · 3519 words · Akshit Kathuria