cancel
Showing results for 
Search instead for 
Did you mean: 

Response MLE algorithm

Hello

According to Cybersource documentation
algorithm used for MLE response encryption should be "RSA-OAEP-256"

but the JWE header from the encrypted response from Cybersource contains "RSA-OAEP"


{ "cty": "JWT", "enc": "A256GCM", "iat": 1794830670, "alg": "RSA-OAEP", "x5c": ["MIIC..............................rIFBjVIU"], "kid": "17942170XXXXXXXXXXXXX" }

Why there is such discrepancy and what is the correct algorithm?I'm working on a project with Cybersource implementation with SFCC and RSA-OAEP is not supported by SFCC.

Request encryption works as expected with RSA-OAEP-256, the issue is only with response decryption.

Best regards!

velizarn
Member
2 REPLIES 2

The solution actually lies in the CBS cartridge in the GitHub repository, where they have built a complete RSA-OAEP decryption using the SFCC Script API.
Hope, this will help anyone who faces the same issue.

https://github.com/CyberSource/cybersource-plugins-rest-salesforceb2ccommerce

velizarn
Member

Hi velizarn, thanks for sharing the details — that mismatch between the documented RSA-OAEP-256 and the RSA-OAEP showing in the JWE header does look confusing. You could try checking whether your decryption library treats plain RSA-OAEP as RSA-OAEP with SHA-1 by default, as that might explain why the response behaves a little differently from the request side. It could also be worth double-checking the key ID against the one used for the request, just in case a different key is involved here. Hope that helps a little, and I would be keen to hear what you find.

CarlosPerez
Member