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

Open SSL to encrypt the file

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2014 at 05:56 PM

    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 Security space in case someone there wants to give their input on the topic.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2014 at 10:50 PM

    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

    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.