0

I have a public key which is used to encrypt some binary data. How can I write the code that can decrypt this data with the same public key ?

1 Answers1

3

You can't - the whole point about public/private-key-cryptography like RSA is that when you encrypt some data using a public key you can only decrypt it using the matching (!) private key. So without the proper private key you won't be able to recover your AES-key and you won't get back to your cleartext.

piet.t
  • 11,718
  • 21
  • 43
  • 52