

This leaves me with a very large long, e.g. In my code I read in the encrypted file, convert it to hex and then perform the decrypt operation on each hex value. Since I have the actual private key, I am able to confirm that I have done this part correctly and have the right primes / private exponent. I am then attempting to walk through the exercise, taking the public key and deducing the private exponent from there. Openssl rsautl -encrypt -raw -inkey public_key.pem -pubin -in test.txt -out test.enc I am encrypting a file using openssl rsautl with the -raw padding option like so: I am intentionally using a weak RSA key (128bit) so that it can be factored and the private exponent deduced. The idea is that you are given an encrypted file and an RSA public key and have to decrypt the file.

I am trying to build a module for a CTF I am planning.
