Hi Fahad...
If you want to implement asymmetric encryption and decryption in API Assembly, you should use a public key to encrypt and private key to decrypt the payload and vice versa, i,e for example,
If a consumer is consuming your API then, the consumer should use the public key which you have provided to the consumer(for example, SSL certificate public key) and API Connect as a provider should use the corresponding private key of the matching public certificate to decrypt the XML payload. It can be done using Gatewayscript crypto.createSign() and crypto.createVerify() methods
If your use case is different, then, please elaborate in detail.
------------------------------
Ashok Beshra
------------------------------
Original Message:
Sent: Wed May 03, 2023 03:41 PM
From: Fahad Hassan
Subject: RSA Encryption
Hi Gabriel,
Thanks for replying. yes i know it will run on gateway just wanted to mention that i am trying to do this in Assembly of API Manager. My use case is to implement aysmetric encyption/decryption of xml payload and for this i am reaching out for help.
BR
Fahad
------------------------------
Fahad Hassan
Original Message:
Sent: Wed May 03, 2023 02:46 PM
From: Gabriel Marte Blanco
Subject: RSA Encryption
Hi Fahad,
Are you actually looking to perform the encrypt/decrypt in the API assembly? If so, it would run on the gateway, not in the API Manager.
Would you be able to provide more details so that I can raise it with the team and try to get you a response as soon as possible.
I am looking through other threads to see if anyone has faced this before.
------------------------------
Gabriel Marte Blanco
Austin TX
Original Message:
Sent: Wed May 03, 2023 06:28 AM
From: Fahad Hassan
Subject: RSA Encryption
HI Team,
I want perform RSA encryption/Decryption in API Manager. Can somebody guide me on how to perform this assembly
BR
Fahad
------------------------------
Fahad Hassan
------------------------------