Skip to main content

rsa-ctf-tool

https://github.com/RsaCtfTool/RsaCtfTool

Is a tool to check/attack RSA keys.

I have used it to retrieve a private key from a weak RSA public key. The key pair are generated by multiplying two prime numbers, if the prime numbers are not big enough, they can be guessed and reveal the private key.

To decypher the file encrypted with the private key use openssl:

openssl rsautl -in flag.enc -out flag.txt -decrypt -inkey key.priv

To know the length of the RSA:

openssl rsa -in key.pub --RSAPublicKey_in -text -noout
openssl rsa -in key.priv -text -noout