Explain Wiener's attack on RSA with small private exponent. If d is small, recover it…
- User
Explain Wiener's attack on RSA with small private exponent. If d is small, recover it using continued fraction expansion of e/n.
- Assistant
Explaining Wiener's RSA attack
Wiener's attack exploits the fact that if the RSA private exponent d is unusually small (less than about one-third of n^(1/4)), then d can be recovered from the public exponent e and modulus n using continued fraction expansions. Since ed ≡ 1 mod φ(n), there exist integers k and d satisfying ed - kφ(n) = 1. This implies that the fraction k/d closely approximates e/φ(n), and because φ(n) is close to n, the convergents from the continued fraction expansion of e/n provide candidates for k/d. By computing these convergents and checking if they yield integers k and d that satisfy the RSA equations—specifically verifying if the corresponding φ(n) produces valid factors p and q of n—one can recover the small private exponent d. In RSA the public and private exponents are tied together by [ e d \equiv 1 \pmod{\varphi(n)}\quad\text{or equivalently}\quad e d - k,\varphi(n)=1 ] for some integer (k). Rearranging gives [ \left|\frac{e}{\varphi(n)} - \frac{k}{d}\right| = \frac{1}{d,\varphi(n)}. ]
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.