Quantcast

Encrypt with BouncyCastle and decrypt with pg_pub_decrypt

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Encrypt with BouncyCastle and decrypt with pg_pub_decrypt

Kang, Kamal

Hi all,

 

I am trying to encrypt a string using Bouncy Castle PGP Java apis, Base64 encode the encrypted string and then decrypt using pg_pub_decrypt but it is failing with error “Wrong Key”. Just wanted to know if this is doable or pg_pub_decrypt only works with encrypted strings from pg_pub_encrypt?

 

Thanks

 

Kamal

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Encrypt with BouncyCastle and decrypt with pg_pub_decrypt

Jeff Janes
On Thu, May 18, 2017 at 4:57 PM, Kang, Kamal <[hidden email]> wrote:

Hi all,

 

I am trying to encrypt a string using Bouncy Castle PGP Java apis, Base64 encode the encrypted string and then decrypt using pg_pub_decrypt but it is failing with error “Wrong Key”. Just wanted to know if this is doable or pg_pub_decrypt only works with encrypted strings from pg_pub_encrypt?



pg_pub_decrypt is compatible with gpg, so if Bouncy Castle is also compatible with gpg I don't see why it wouldn't also work.  Without more information, it is hard to provide more advice.  encrypt a dummy payload with a dummy password and show us what you get and what you do with it.

Cheers,

Jeff
Previous Thread Next Thread
Loading...