Re: RsaOaep256 Encryption - CyberSource Flex API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RsaOaep256 Encryption - CyberSource Flex API
Hi Trying to use the Cybersource Flex API . NODE-JS applicaiton
Generated the x-pay-token and got the key back. Encrypted the card number with the returned public key . But getting this error.
"responseStatus": { "status": 400, "reason": "DECRYPTION_ERROR", "message": "Cannot decrypt PAN (RsaOaep256): data hash wrong", "correlationId": null, "details": [] },
Can you please point me if there are any sample s for NODE.js that we should follow to peform the encryption of CARD number for TOKENIZE CARD Request ?
And Also what are the supported encrytion types ? I dont see any documentation regarding this. Thankyou.
-SS
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: RsaOaep256 Encryption - CyberSource Flex API
Hi SS,
Working on getting you an answer. Will get back shortly.
Thanks,
Ricardo
Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: RsaOaep256 Encryption - CyberSource Flex API
Hi SS,
- Flex is designed for the PAN to be encrypted on the client side: bringing the PAN server-side to encrypt will expand PCI DSS scope. Ensure that the PAN is encrypted on the client (e.g. the browser or native app).
- The card number field should be encrypted using RSA OAEP SHA-256 – currently this is the only encryption method supported.
- We have some Flex sample code available in Java on GitHub, which is a browser based implementation that makes use of the WebCrypto API. NODE.js sample code is coming soon. SDKs are also currently being planned.
Does this help?
Thank you,
Ricardo
Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: RsaOaep256 Encryption - CyberSource Flex API
Thanks Ricardio,
Points 1 , 2 are helpful and answers the question.
Do you have ETA of when can we expected the NodeJS Samples.? Is there a git link to watch for ?
thanks
Srinivas
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: RsaOaep256 Encryption - CyberSource Flex API
Hi everyone,
I have the same issus, when I try tokenizing the card info:
</pre>
Response
<pre>
"responseStatus": {
"status": 400,
"reason": "DECRYPTION_ERROR",
"message": "Cannot decrypt PAN (RsaOaep256): data hash wrong",
"correlationId": null,
"details": []
}
</pre>
Please, have you found any solution to this problem?