cancel
Showing results for 
Search instead for 
Did you mean: 

PGP Encryption in SAP PI 7.3

former_member200386
Active Participant
0 Kudos

Dear Experts,

I am working on one POC File to File scenario without ESR part, where in need  pick the file from client FTP and post in our FTP using  PGP encryption.

i am using this below blog approach by Sabarish Vijay Kumar

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/04/10/pgpencryption-module-how-to-guide

I have a few doubts in my mind.

1)do i need to write adapter module for this approach?

2)where i will get partners public key pubring.pkr for encryption and our private key didikey.skr  ?

3) do i need to import those keys in PI trust store in STRUST?

4) do i use filezilla  as FTP server?

Thanks in Advance,

Pavan



Accepted Solutions (0)

Answers (2)

Answers (2)

smavachee
Active Contributor
0 Kudos

Refer below link for understanding PGP in depth..

PGP

For PI 7.3, you can check this options as well..

PGP

or

PGP

Keep SAP Note # 1695563 for compatibility check.

Hope it helps.!

Regards,

Sunil

Former Member
0 Kudos

Hi Pavan,

>>1)do i need to write adapter module for this approach?

Don't need to write.From PI 7.1 SP8 ,SAP has given PGPEncryption as inbuilt module .So use it as shabz suggested in the blog.

>>2)where i will get partners public key pubring.pkr for encryption and our private key didikey.skr  ?

these are sample keys (key names thats it).You just google it ,you can find many sites gives free s/w to generate public and private keys (Just search with the term 'pgp key generator'.)


>>3) do i need to import those keys in PI trust store in STRUST?

By default, the keys can be placed under the path usr/sap/<System ID>/<Instance ID>/sec. But in case you want to use a different path, then use the parameter keyRootPath to define your custom path.

4) do i use filezilla  as FTP server?

filezilla is a front end tool to connect file server.

Regards

Venkat

former_member200386
Active Participant
0 Kudos

HI Venkat,

Thanks for your Quick Response.

I need more info regarding my 2 Question

>>2)where i will get partners public key pubring.pkr for encryption and our private key didikey.skr  ?

these are sample keys (key names thats it).You just google it ,you can find many sites gives free s/w to generate public and private keys (Just search with the term 'pgp key generator'.)

i have searched in google in below site.

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

it is generating Public & Private keys, as per link i tried to copy & paste the certificates in notepad when i tried save  with naming convention pubring.pkr extension it is still saving as pubring.pkr.txt.

can you please help me how can i get those to keys?

Reagrds,

Pavan

former_member200386
Active Participant
0 Kudos
Former Member
0 Kudos

Hi Pavan,

Don't get confused .It is just the file name.You can give any name and provide the same in ID .

>>when i tried save  with naming convention pubring.pkr extension it is still saving as pubring.pkr.txt.

It is expected .Just right click on file -->rename-->remove .txt .

Regards

Venkat

former_member200386
Active Participant
0 Kudos

Dear Venkat,

Thanks for the response  i have completed the scenario, I am getting this below error.

MP: exception caught with cause com.sap.engine.services.jndi.persistent.exceptions720.NameNotFoundException: Object not found in lookup of PGPEncryption.

I copied the private&public keys.in this below path.

sr/sap/<System ID>/<Instance ID>/sec

please help me.

Regards,

Pavan


former_member200386
Active Participant
0 Kudos
former_member200386
Active Participant
0 Kudos

Former Member
former_member200386
Active Participant
0 Kudos

Hi Venkat,

Thanks for your quick response. I am using File adapter(Transport protocol as NFS) . Do i need to Install SFTP/PGP addon for my requirement?

Regards,

Pavan

former_member200386
Active Participant
0 Kudos

Hi Venkat,

I have deployed SFTP/PGP Addon in my server. now i am getting this below error.

Message processing failed. Cause: java.lang.Exception: Could not process message, Internal PGP Error (org.bouncycastle.openpgp.PGPException: Exception creating cipher)

former_member200386
Active Participant
0 Kudos

Hi Venkat,

I found some user is alos faced the same error , reffering to Sabaish Vijay's Blog

Hi Shabarish,

Great blog!

We are trying to implement the new PGPEncyption Module. We are on PI 7.11 and SP08 and have followed the standard procedure to instal the add-on.


In the File Receiver Adapter we use the new PGPEncyption Module only with the parameters:

- encryptionAlgo          AES_256

- partnerPublicKey      pubring.gpg

But in the communication channel we get the error:

Error PGP Encryption Module: Could not process message, Internal PGP Error (org.bouncycastle.openpgp.PGPException: Exception creating cipher)

12.06.2012 11:02:35.990 Error PGP Encryption Module: Could not process message, Internal PGP Error (org.bouncycastle.openpgp.PGPException: Exception creating cipher)

12.06.2012 11:02:35.990 Error MP: exception caught with message Could not process message, Internal PGP Error (org.bouncycastle.openpgp.PGPException: Exception creating cipher)

12.06.2012 11:02:35.990 Error Adapter Framework caught exception: Could not process message, Internal PGP Error (org.bouncycastle.openpgp.PGPException: Exception creating cipher)

12.06.2012 11:02:35.991 Error Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.Exception: Could not process message, Internal PGP Error (org.bouncycastle.openpgp.PGPException: Exception creating cipher).

Can you help us?

Thanks in advance

Octavio


former_member200386
Active Participant
0 Kudos

Dear Experts,

Any idea on my Issue.

Regards,

Pavan

Former Member
0 Kudos

Hi Pavan,

Did you find some resolve to this issue. I am having the same problem in QA - and I cannot see any difference between our QA and Dev system setup. The encryption module is working fine in Dev.

I have checked the JCE files in all the folders - match in both systems. I have undeployed the redeployed the PGP and SFTP B2B components. Tried doing the same in Dev. But difference in behavior persists.

Version:

PIB2BPGP - 1000.1.00.2.0.20130926072800

PIB2BSFTP - 1000.1.00.2.3.20131126032500

Fingers crossed.

Regards,

Emil

Former Member
0 Kudos

update..

I also addressed the issue in thread:

See my conclusions in that thread if anyone is still struggling with this. .

Regards,

Emil

former_member200386
Active Participant
0 Kudos

Hello Emil,

Sorry for the delayed response. The issue your facing was because of in sufficient JCE files. Kindly follow the approach suggested in below link and replace the existing JAR files with new JARs. Please don't forget to restart the PI server after placing the new JAR files.

Thanks,

Pavan T

+91 9892398599

0 Kudos

Hi,

Please check the below link, the error might be because of the bit size of your key. it should be min of 1024 bits.

vicky20691
Active Contributor
0 Kudos

Hi Pavan,

I am assuming by your response that you have found the response as Emil is suggesting in the same thread I have also pointed out the JCE resolution for this issue.

Once you do this just verify as guided in ...

PS - you need to put the jar files at 2 places as suggested in the reply in above thread. You must be able to see the last day modified for the jar files in those 2 locations changed even after restart.

This should solve your issue if your keys are correct...  I guess you have already resolved this

Regards,

Vikas