Skip to content

RSA tool for ctf - retreive private key from weak public key and/or uncipher data

Notifications You must be signed in to change notification settings

HwangSuMin/RsaCtfTool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RsaCtfTool

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:

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

Uncipher file :

./RsaCtfTool.py --publickey ./key.pub --uncipher ./ciphered_file

Print private key :

./RsaCtfTool.py --publickey ./key.pub --private

Examples :

  • 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

Requirements:

About

RSA tool for ctf - retreive private key from weak public key and/or uncipher data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%