26 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
88
views
RSA with nodejs and flutter Error during decryption (probably incorrect key). Original error: Error: error:02000079:rsa routines::oaep decoding error
I am experimenting with developing rsa with flutter and nodejs. public.pem and private.pem are same for both. Both the code are working fine when run in same language. but when transmitting data over ...
0
votes
1
answer
107
views
node-rsa fails to decrypt
On the client side,
import JSEncrypt from 'jsencrypt';
var cryptor = new JSEncrypt();
const publicEncrypt = (str:string, publicKey:string = PUBLIC_KEY) =>{
cryptor.setPublicKey(publicKey);
...
0
votes
0
answers
125
views
The same set of public and private key encrypted text produces different types of variables?
function encrypt(encrypted, publicKey) {
const encrypt = crypto.publicEncrypt(publicKey, Buffer.from(encrypted));
return encrypt;
}
var ciphertext = this.encrypt("***",key.exportKey(...
0
votes
2
answers
1k
views
Convert jwk to pem in nest.js
I have this jwk key that I wanto convert into pem:
const jwkey = {
kty: 'RSA',
kid: 'eecb0ced-4d49-4100-9547-841e4100b756',
n: '...very long string',
e: 'AQAB',
alg: 'RS256',
use: 'sig',
};...
0
votes
0
answers
402
views
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 ...
1
vote
0
answers
819
views
Node-RSA decryption very slow in React Native
I tried to decrypt a string encrypted with a publicKey on the server using Node-RSA in my React Native app with the privateKey using the same Node-RSA lib, it takes about 2-3 secs to decrypt a simple ...
0
votes
0
answers
1k
views
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 ...
1
vote
1
answer
2k
views
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 ...
0
votes
0
answers
180
views
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 ...
0
votes
0
answers
330
views
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 ...
1
vote
1
answer
969
views
Buffer library in browser does not return the same value as in nodejs
When running the Buffer.from static method in node js on a public key I get different console.log when running it from the browser (in an angular project). Should'nt they be the same? Is there ...
0
votes
1
answer
7k
views
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....
1
vote
0
answers
640
views
Node.js - node-rsa - Error during encryption. Original error: Error: error:0306E06C:bignum routines:BN_mod_inverse:no inverse
I`m trying to encrypt data via RSA using public key (128-bytes == 1024-bits) received from auth server.
Here is a code in Node.js:
const NodeRSA = require('node-rsa');
const openData = Buffer.from('...
2
votes
1
answer
6k
views
Node-rsa Encrypting Public key from the pem file and trying to decrypt, but getting following error. (probably incorrect key) NODEJS
Error: Error during decryption (probably incorrect key). Original error: Error: This is not private key
Here is my nodejs code. I am using node-rsa.
const keyData = fs
.readFileSync("./docs/...
0
votes
3
answers
3k
views
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 ...