Skip to Content
author's profile photo Former Member
Former Member

SAP PO PGP Decryption

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 14, 2015 at 07:37 AM

    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.

    B2B Adapters - Updating to JCE Unlimited Strength Jurisdiction Policy

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2015 at 07:52 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 13, 2015 at 12:23 PM

    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 -

    Using PGP in Process Integration

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.