Questions tagged [node-rsa]

Node.js RSA library

Based on jsbn library from Tom Wu http://www-cs-students.stanford.edu/~tjw/jsbn/

  • Pure JavaScript
  • No needed OpenSSL
  • Generating keys
  • Supports long messages for encrypt/decrypt
  • Signing and verifying
26 questions
0
votes
0 answers

Node-RSA. Encrypt from Express server, Decrypt React client

I am trying to send an encrypted string from my server to the client in which it's consumed immediately in a function call. The information is not super sensitive I just want to do it this way haha. When I encrypt and decrypt on the server it works…
bbest12g
  • 21
  • 1
  • 6
0
votes
0 answers

No inverse error during encryption (node-rsa)

I am trying to convert https://clover.app.box.com/s/rz18bni3bpmdrc8wc92xm4w8h9grrtty from Java to node.js I am using the node-rsa package and getting error:0306E06C:bignum routines:BN_mod_inverse:no inverse when trying to encrypt using an imported…
0
votes
0 answers

RSA encryption text/message using our PublicKey - JavaScript or ReactJS

What I have to do is encrypt a small message through a public key. I have the public key but I can't encrypt any messages. I have tried with JSEncrypt, encrypt-rsa, hybrid-crypto-js, NodeRSA and crypto. Can´t encrypt message. The key is something…
kamikazzi
  • 43
  • 9
0
votes
1 answer

Node-rsa isn't working in react native. But, I've to use it for decryption in Mobile application

So, I'm developing a project which needs a website to generate the qr code with encryption and qr code scanner mobile application to scan and decrypt the qr code. I've used node-rsa for encryption in react website. I've added a feature in site to…
0
votes
0 answers

C++ Openssl and node-rsa compatible?

I want to decrypt my C++ Openssl RSA message with node-rsa. In node-rsa I get Error: Error during decryption (probably incorrect key). Original error: Error: Incorrect data or key Encryption: //ADD PRIVATE KEY const char* mKey = "..."; BIO* bo =…
tom203
  • 77
  • 5
0
votes
0 answers

How do I encrypt/decrypt Json Array using node-rsa backend: NodeJS and frontEnd: Angular

I am using node-rsa library in both NodeJS and Angular. node-rsa: https://www.npmjs.com/package/node-rsa I am trying to encrypt a JSON Array from nodeJS server to be sent Angular where it has to decrypt back to JSON Array, I tried few times with…
javapedia.net
  • 2,531
  • 4
  • 25
  • 50
0
votes
1 answer

How to import buffer library in a frontend ionic angular project for node-rsa to work

I need to use node-rsa to encrypt a wifi-password in ionic 5 with angular. I have a running example on Stackblitz. However when i replicate it locally in angular 10 as well as ionic 5, it doesn't work. In the local Angular project I get missing…
Han Che
  • 8,239
  • 19
  • 70
  • 116
0
votes
3 answers

Unable to correctly encrypt data using RSA/ECB/PKCS1 in nodejs

Im using the node-rsa package for encrypting data as follows const crypto = require('crypto') const NodeRSA = require('node-rsa') const path = require("path") const fs = require("fs") const absolutePath = path.resolve('./public_key.pem') const…
Ankit P
  • 5
  • 3
0
votes
1 answer

Should I use a public key or private key to generate modulus and exponent for a JWKS endpoint?

I tried searching for an answer to this question and didn't find anything. So, I'm asking and answering. I'm trying to implement a JWKS endpoint. I found some example code here. Note that the author's intent for that repo is testing only. He is…
Cully
  • 6,427
  • 4
  • 36
  • 58
0
votes
0 answers

Cannot decrypt C# encrypted message using node-rsa npm

I've got a server written in node.js that I want to receive encrypted messages from a C# app. I tried to implement RSA firstly for this task, but with no avail, because I wasn't able to decrypt the message after being encrypted by the C# app using…
Zeke
  • 1
  • 3
0
votes
1 answer

Verifying a RSA signature with nodejs (signed with phpseclib)

I am trying to integrate a payment gateway to my nodejs app. When the payment is complete, the gateway redirects the user to my site with the payment result. The result is RSA signed and I need to verify it with a public key provided by the payment…
Lahiru Chandima
  • 22,324
  • 22
  • 103
  • 179
1
2