Closed packcode closed 1 week ago
Hi! The version of node you are using is EoL, can you reproduce in a supported Node.js version?
@preveen-stack FWIW it seems like this isn't specific to windows, but instead the way crypto is used
@RedYetiDev At the business partner's end, there was a problem with the key configuration. The decryption process operates flawlessly once the correct public and private keys have been updated.
I'm glad to fixed your problem!
Node.js Version
v16.17.0
NPM Version
v8.15.0
Operating System
Windows 10
Subsystem
crypto
Description
A client of us is sending encrypted response using javax.crypto.Cipher; with padding scheme RSA/ECB/PKCS1Padding and a public key when I an trying to decrypt the response using crypto.privateDecrypt using a private key it is throwing error
crypto.privateDecrypt throwing Error: error:0407109F:rsa routines:RSA_padding_check_PKCS1_type_2:pkcs decoding error
Minimal Reproduction
Java Code Snippet to encrypt the response:
Crypto decryption:
Output
Before You Submit