Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Open SSL to encrypt the file

Former Member
0 Kudos

We have a requirement in which we need to encrypt the data using public key (attached) and then create a encrypted file on application server. Customer will use private key for decryption.  Anyone have any idea to encrypt data (internal table data) using public key?? End user says it can be done using Open SSL in SAP but have no idea how. Any suggestion will be appriciated.

Thanks.

Regards,

Ronak

2 REPLIES 2

Former Member
0 Kudos

You can invoke OpenSSL binaries as external commands from SAP just like any binaries. See transactions SM69 and SM49. The OpenSSL specific parts are generic and there is a lot of information available on the Internet.


Since you are requested to use a public key, the simplest way would be to use S/MIME to encrypt the files. You can't use asymmetric encryption where the file size is larger then the key size, symmetric encryption must be used.

In fact, you don't have to use OpenSSL. With recent AS ABAP versions there are APIs for encryption and S/MIME.

I'm pinging the space in case someone there wants to give their input on the topic.

mvoros
Active Contributor
0 Kudos

Hi,

what exactly encrypting with public key mean in your case? There are many format options. One of the box ABAP AS supports PKCS#7. So if you can use this format then it's pretty straighforward. Anything else will have to be done outside of ABAP AS. There might are some new formats supported in newer release of ABAP AS. As Samuli mentioned you can use external OS commands for everything else. I would always prefer option of doing it in ABAP AS.

Cheers