← All challenges
RSA·hard·70 pts

Too Close for Comfort

A flawed key generator picked two primes that are suspiciously close together. This is scriptable in a few lines.

An RSA key was generated by a library with a bug: instead of picking two independent random primes, it picked one prime and then searched forward for the very next prime after it. The two primes end up close together — far closer than genuine randomness would ever produce.

You'll want to write a short script for this one (Python with a big-integer square root, or any language with arbitrary-precision integers).

n

1919398208695729625013340256996074550440109025452193674473514632751887476196084741248469724237298976837480604700489316127

e

65537

ciphertext

1616228168952747584128258478470283795776380865684892525283626935861568080001076499128804605876219873757791007897534997175

Hints

Checked entirely in your browser — nothing you submit here leaves your device.

Background on this technique

Up next

Just Factor It →

A modulus small enough that "real" RSA security assumptions don't apply at all.