You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to generate a key-pair in browser (to sign a message), send the generated public key using wrapKey and server's public key. Then decrypt this in node and verify the message.
I'm having issues, decrypting the received encrypted key, which results in Error: error:04099079:rsa routines:RSA_padding_check_PKCS1_OAEP_mgf1:oaep decoding error.
Generating server keys (and sending the public key to browser):
I'm reasonably sure you can't do that right now with Node.js v10.x. Some of the features you need for WebCrypto interop are really recent, e.g., nodejs/node#26960 and nodejs/node#28335.
You seem to use RSA-OAEP with SHA-256, this requires setting the oaepHash option in crypto.privateDecrypt, which was introduced by one of the PRs that @bnoordhuis mentioned. Please let us know if you need further assistance.
Hi,
I'm trying to generate a key-pair in browser (to sign a message), send the generated public key using wrapKey and server's public key. Then decrypt this in node and verify the message.
I'm having issues, decrypting the received encrypted key, which results in
Error: error:04099079:rsa routines:RSA_padding_check_PKCS1_OAEP_mgf1:oaep decoding error
.Generating server keys (and sending the public key to browser):
Client code (Chrome 76.0.3809)
Server request handler
This step fails with
Error: error:04099079:rsa routines:RSA_padding_check_PKCS1_OAEP_mgf1:oaep decoding error
What am I doing wrong?
The text was updated successfully, but these errors were encountered: