Questions tagged [jsencrypt]
45 questions
7
votes
2 answers
RSA encrypt using JSEncrypt and decrypt using BouncyCastle (Java)
This might be a duplicate of this answered question, but I can't seem to get the same results. Hoping for some guidance here.
JSEncrypt (client)
let encrypt = new Encrypt.JSEncrypt();
encrypt.setPublicKey(this.publicKey); // retrieved from…

acys
- 73
- 1
- 4
4
votes
2 answers
[Nodejs - Crypto][JSencrypt] rsa routines:RSA_padding_check_PKCS1_OAEP_mgf1:oaep decoding error
I'm using NodeJS Crypto module for encrypting and decrypting with RSA in backend and JSencrypt for frontend RSA
But issue is my backend throws this error whenever I encrypt in frontend using publickey (PS: I'm using this in NuxtJS so using import…

Swapnil Soni
- 965
- 1
- 10
- 26
4
votes
1 answer
RSA/ECB/PKCS1 Padding & AES/CBC/PKCS5Padding Encryption / Decryption
I have an API to call where I have to encrypt my data using RSA/ECB/PKCS1 Padding & AES/CBC/PKCS5PADDING.
Sample Data: {"KEY":"VALUE"}
Step.1:
I have to generate a random number of 16 digit. eg: '1234567890123456'
Step.2:
Do RSA/ECB/PKCS1Padding…

Rakesh Nagarkoti
- 41
- 1
- 5
4
votes
1 answer
RSA Encryption in javascript and Decryption in Java
I have an application that has frontend as HTML, Javascript, and backend as Java,
I need to use RSA to send passwords and sensitive stuff. I'm using JSEncrpt in javascript and Bouncy castle in java.
I need to know how can I manage keys. If I create…

Praveen Kumar
- 51
- 1
- 3
3
votes
0 answers
Javascript not decrypt, laravel RSA encrypted string
Problem Statement
I need to encrypt details in Laravel using RSA algorithm and then decrypt in Javascript.
Efforts Done
In laravel I am using phpseclib library to encrypt.
Laravel code to encrypt string is given below...
$publicKey=…

shujat132
- 59
- 1
- 11
3
votes
1 answer
Issue decrypting RSA public-key encrypted data by JS in C#
I'm getting the error The data to be decrypted exceeds the maximum for this modulus of 256 bytes when decrypting the RSA encrypted string in C#.
What i'm trying to achieve:
Generate public/private key pairs in C# (RSA)
Save private key in…

Sang Suantak
- 5,213
- 1
- 27
- 46
3
votes
1 answer
How to decrypt data in PHP encrypted with JSEncrypt
I'm trying to secure communication between a JS front-end and a PHP backend by using symmetric and asymmetric encryption. I'm creating a symmetric key on the client and encrypting it with the server's public key with JSEncrypt and sending it to the…

ljcrafty
- 71
- 7
3
votes
1 answer
RSA encryption in python & decrypt in JS
I am totally new in Cryptography. I want to generate RSA key pairs from server side and send it to all of the clients (browsers). But before that I am testing the scenario by simply encrypting data in python and sending in to index.html file via…

Anum Sheraz
- 2,383
- 1
- 29
- 54
2
votes
1 answer
Decrypt - PHPSECLIB
I'm trying to decrypt a string using phpseclib.
My hashed string is being generated from a javascript library called jsencrypt. The result of the encryption is saved in a database.
Afterwards I'm using phpseclib3 to try and decrypt the string using…

Brian Moreno
- 977
- 4
- 11
- 39
2
votes
1 answer
static import works from nuxt.config.js but not from component
I have a vanilla js jsencrypt package which i needed to use in my nuxt application, the package itself works fine when imported from Nuxt.config.js but i run into issues when imported using the head object from component, let me show you my…

uneeb meer
- 882
- 1
- 8
- 21
2
votes
1 answer
Node crypto instead of JSEncrypt for encryption with public key
I have some public key which looks like MIIBIjANBgkqhkiG9w0BAQEFAAO... (392 chars).
It used in the browser to encrypt some strings with JSEncrypt.
How can I encrypt strings with that public key using NodeJS crypto module?
I tried this:
const crypto…

Kosteg
- 365
- 2
- 11
2
votes
1 answer
ReferenceError: JSENCRYPT_VERSION is not defined after JSEncrypt 3.0.0
I was using jsencrypt 3.0.0-rc.1 and updated to 3.0.0 just now. Now I am having a following error.
Uncaught ReferenceError: JSENCRYPT_VERSION is not defined.
Temporary Solution
: I could get rid of that error by replacing import JSEncrypt from…

ymssa___
- 993
- 9
- 16
2
votes
4 answers
Importing Javascript library (jsencrypt) into Angular 2 app
I have looked through all the tutorials revolving around this issue, and havn't been able to find a solution. Some background first. I have a Angular 2 app and I need to use this JS library for encryption: https://github.com/travist/jsencrypt
First,…

Patrick
- 165
- 2
- 2
- 8
2
votes
0 answers
How to generate public key from modulus and exponent in RSA in javascript JSEncrypt library
How to generate public key from modulus and exponent in RSA in javascript JSEncrypt library
In my project we are encrypting the data using RSA.The client shared
RSA modulus and exponent (65531 hard coded value).We have to generate the
RSA public…

Selva
- 1,620
- 3
- 33
- 63
1
vote
2 answers
NextJS project compilation fails with JSEncrypt
I've installed JSEncrypt npm package for asymmetric encryption.
But when I run the project I get the below error
Server Error
ReferenceError: window is not defined
I even tried to dynamically load the JSEncrypt.min.js file in the project.
Can some…

Sairaj Naik
- 13
- 3