RsaCtfTool / RsaCtfTool

RSA attack tool (mainly for ctf) - retrieve private key from weak public key and/or uncipher data
GNU General Public License v3.0
5.57k stars 900 forks source link

Pollard p-1 not attempting #312

Closed brothersw closed 2 years ago

brothersw commented 2 years ago

I have a public key that I know is susceptible to the pollard p-1 attack. Attempting it however it seems to not even attempt the attack, without doing any iterations, or timing out. Running --tests says that it works just fine. publickey.txt Failed Cracking

MarcoMeinardi commented 2 years ago

I fixed it in the above pull request. However, in order to factorize your key, you need to increment the number of primes used (line 21 in attack/single_key/pollard_p_1.py). I used 6543 in order to generate primes up to 0x10001 (I'm not sure if this makes sense, I don't understand this attack enough to tell, but it works).