Python openssl rsa decrypt example

broken image

These values can be extracted out of the public key file. First we need to gather some information like modulo $n$ and the exponent $e$. If you want to know how RSA works, take a look at one of the million blog posts out there. So RSA is not bad, but please use a suitable key size.įor this blog post it’s not important, why RSA is secure and works, it’s just a tutorial how to calculate a private key if it get’s lost (will just work for unsecure keys indeed) or to demonstrate that small key sizes are unsecure.

broken image

Why weak? Because a (only) 268-bit key was used for encryption. I had to decrypt a weak RSA encrypted message.

broken image