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: 

Question about AES-128 encryption

0 Kudos

Hy,

I´m trying to decrypt a file that has a field thatu2019s encrypted in AES-128, but it fails.

I managed to install the certificate for encryption into a PSE in the STRUST and think its working properly.

If I use SSF02 I can envelop and develop without any problems any generated text.

I suspect thatu2019s because I´m using PCKS#7. I´m not sure if PCKS7 is only the format the certificate is stored in the PSE or it is the only format of encryption/decryption the functions admit.

Would be great, if someone could clarify my doubt.

Additionally, someone knows what options I have to decrypt a AES-128 encrypted file?

Thanks a lot for your help.

1 ACCEPTED SOLUTION

martin_voros
Active Contributor
0 Kudos

Hi,

SSF works only with PCKS#7 format. It's not format used for storing a certificate. PCKS#7 is using PKI so for each message a session key is generated and used for encrypting data using symmetric cipher (e.g. AES). This session key is encrypted by public key. Only receiver has a private key and hence decrypt a session key and then whole message.

If you have a field encrypted just by AES then you can't use SSF. It's also important to know what encryption mode is used. don't know about implementation of AES in ABAP. So you can try implement your own AES (it shouldn't be that hard) or to use external commands to decrypt data.

Cheers

5 REPLIES 5

martin_voros
Active Contributor
0 Kudos

Hi,

SSF works only with PCKS#7 format. It's not format used for storing a certificate. PCKS#7 is using PKI so for each message a session key is generated and used for encrypting data using symmetric cipher (e.g. AES). This session key is encrypted by public key. Only receiver has a private key and hence decrypt a session key and then whole message.

If you have a field encrypted just by AES then you can't use SSF. It's also important to know what encryption mode is used. don't know about implementation of AES in ABAP. So you can try implement your own AES (it shouldn't be that hard) or to use external commands to decrypt data.

Cheers

0 Kudos

Thanks a lot for you help martin.

Do you now if there is a "easy" way to do this in the JAVA stack?

0 Kudos

Thanks a lot for you help martin.

Do you now if there is a "easy" way to do this in the JAVA stack?

0 Kudos

There is heaps of Java library that implement AES so it shouldn't be a problem.

Cheers

0 Kudos

Thanks a lot Martin.

I will go over to the java forum and ask if someone did this before.