Simple RSA
by raghul-rajasekar
Can you find a way to attack this RSA implementation?
Files:
Hint: What’s the simplest attack against RSA?
Solution
In simple_rsa.py
, we note that q
is rather small (less than 109), so we could just enumerate all possible values of q
in order to factorize n
. The easiest way, of course, is to just pop n
into http://factordb.com/, giving us p = 22034393943473183756163118460342519430053
and q = 255097177
, which can be used to decrypt the RSA ciphertext.
Flag
rgbCTF{brut3_f0rc3}