Hi,
Data is encrypted in Java Application.
To decrypt the data using the below code in Datapower.
1. Provided the private key to decrypt the data
2. Receiving the secretKey in the encrypted response
3. Below is the XSLT code to decrypt the data.
<xsl:variable name="RSAAlg" select="'http://www.w3.org/2001/04/xmlenc#rsa-1_5'"/>
<xsl:variable name="privateKey" select="'name:crypto-key-pass'"/>
<xsl:variable name="secretKeyEncrypted" select="//*[local-name()='secretKey']"/>
<xsl:variable name="secretKeyDecrypted">
<xsl:value-of select="dp:decrypt-key($secretKeyEncrypted,$privateKey,$RSAAlg)"/>
</xsl:variable>
<xsl:variable name="vAlgorithm" select="'http://www.w3.org/2001/04/xmlenc#aes128-cbc'"/>
<xsl:variable name="encryptedtext" select="//*[local-name()='companyType']"/>
<xsl:variable name="vDecrypt">
<xsl:value-of select="dp:decrypt-data($vAlgorithm,$secretKeyDecrypted,$encryptedtext)"/>
</xsl:variable>
<decryptedResponse>
Getting the below error while executing the xslt code.
mpgw: Ephemeral key decryption failed: *RSA decryption failed*
mpgw: *RSA decryption failed*
Could you please help on the below issue
------------------------------
vijendhar soma
------------------------------