CrewCTF 2025 | Inverse with Errors Only
Summary
A 1024-bit prime $d$ is sampled. For $i=1..30{,}000$, a 1024-bit random modulus $n_i$ (MSB set) is chosen and the value
$$ x_i = d^{-1} \bmod n_i $$
is published without revealing $n_i$. The AES key is SHA256(str(d)). The IV and ciphertext of the flag (AES-CBC) are provided.
Goal: recover $d$ from the list of $x_i$ only, then decrypt the flag.
Solve
Consider the residues $x_i \bmod p$ for a small prime $p$.