RSA tool for ctf - uncipher data from weak public key and try to recover private key Automatic selection of best attack for the given public key
Attacks :
- Weak public key factorization
- Wiener's attack
- Hastad's attack (Small exponent attack)
usage: RsaCtfTool.py [-h] --publickey ./pub.pem [--uncipher ./cipher [--verbose]] [--private]
- publickey : public rsa key to crack
- uncipher : cipher message to decrypt
- private : display private rsa key if recovered
./RsaCtfTool.py --publickey ./key.pub --uncipher ./ciphered_file
./RsaCtfTool.py --publickey ./key.pub --private
- weak_public.pub, weak_public.cipher : weak public key
- wiener.pub, wiener.cipher : key vulnerable to Wiener's attack
- small\exponent.pub, small_exponent.cipher : key with e=3, vulnerable to Hastad's attack
- GMPY
- libnum (https://github.com/hellman/libnum.git)