cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PO PGP Decryption

Former Member
0 Kudos

Hi,

I am struck in this issue on PGP decryption.

I am trying to use PGP decryption in my sender ftp/ file adapter.

I initially tried to test in sandbox and generated the public/ private key pair using this below URL and created two .txt files for private and public and then lend the public key to the partner and SAP PO was able to decrypt the encrypted message using the private key.

https://www.igolder.com/PGP/generate-key/

Now when I tried to generate an actual PGP Public/ Private key using PGP Desktop software, I get two .asc files, I send the public key to my partner and now when I try to use the private key( .asc file contains both public and private key) I am getting the error: Error: java.security.InvalidKeyException: Illegal key size

IS the certificate bad or we need to have any config issues on the Java libraries.

Regards

Ravijeet

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Ravijeet ,

the problem seems to be with the limited JCE policy that is provided by SAP.

As a solution pls update the JCE policy as per the link below and then try.

Thanks.

Answers (2)

Answers (2)

nitindeshpande
Active Contributor
0 Kudos

Hi Ravjeet,

Are you following the below blog for the decryption. You need to decrypt using your private key, i guess you are trying to do it using Public key.

Please follow the below blog to do the encryption and decryption -

And if you still feel the issues is with the keys, then you can try generating the ASCII armored keys from the below link and use this in your configuration.

Generating ASCII Armored PGP Key Pairs - Process Integration - SCN Wiki

And please note, these keys need to be stored in the folders where your SAP application is installed.

Regards,

Nitin Deshpande

asdasd_asdasd
Active Participant
0 Kudos

"( .asc file contains both public and private key)", You must use only the private to decrypt, tries to separate the keys in different files.