151
Views
6
Comments
[CryptoAPI] How to encrypt and decrypt the data in both Outsystems in Workato sides
cryptoapi
Service icon
Forge asset by João Barata
Application Type
Traditional Web
Service Studio Version
11.54.84 (Build 63766)

Currently we are trying to send and receive the data as encrypted between Outsystem and Workato. 

I need help to archive the encryption and decryption on both platforms.

In Outsystems, I am using the AES_Encrypt and AES_Decrypt actions. I want to know if it is possible to do encryption and decryption on the data that is shared from outsystems using AES actions from the CryptoAPI component. 

Please suggest if any component is available on the Workato side, same as the AES_Encrypt and AES_Decrypt actions.


Thanks & Regards

Vishnu Shankar

2019-01-07 16-04-16
Siya
 
MVP

You should contact the Workato support team to find out how to decrypt the data received from OutSystems. You may share a bit more context on what you have already built and what challenges you are facing.

UserImage.jpg
Vishnu shankar

Hi @Siya,

In my application, I'm using the AES_Encrypt action from the CryptoAPI component.

I shared the encrypted text and key with Workato. In Workato, they can't decrypt that.

After some discussion, I clarified one thing: the cipher text will always defer when encrypting the same plain text and key, but in workato, the cipher text will be the same for every encryption.

I don't know how this is happening on the Workato side.

So I need help or guidance in this portion.


Thanks,

Vishnu Shankar

2019-01-07 16-04-16
Siya
 
MVP

It's normal for AES encryption to produce different values for the same content and key.

You mentioned sharing the key with Workato. Could you explain how the key was shared? It seems you may have used AES_KeyFromPassword to generate the key for AES_Encrypt. The output of AES_KeyFromPassword is binary data, so you might be using the wrong key in Workato for decryption.

UserImage.jpg
Vishnu shankar

Hi @Siya,

I converted the binary key to Base64 format and shared that with Workato for decryption.

2019-01-07 16-04-16
Siya
 
MVP

It is something Workato support could help you. May is something to do with converting the keys at their end ?

2020-10-08 19-51-35
João Barata
Staff

Hi Vishnu,

The encrypted output of Crypto API is a base64 string that is comprised of 3 parts:
The Iv (initialization vector), the encrypted payload, and the HMAC.
This can cause problems for external libraries that might not be expecting this payload.

I have plans to expose a new version of CryptoAPI that returns the content as 3 separate outputs in order to make it easier to decrypt the content using external libraries, however, I don't have any timeline for that change.

Regards,

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.