Questions tagged [jsencrypt]
36 questions
5
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…
![](../../users/profiles/7821308.webp)
acys
- 53
- 1
- 4
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…
![](../../users/profiles/11184655.webp)
Rakesh Nagarkoti
- 41
- 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…
![](../../users/profiles/5743156.webp)
Praveen Kumar
- 51
- 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=…
![](../../users/profiles/13329809.webp)
shujat132
- 59
- 8
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…
![](../../users/profiles/583301.webp)
Sang Suantak
- 4,868
- 1
- 23
- 42
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…
![](../../users/profiles/5167801.webp)
Anum Sheraz
- 1,400
- 17
- 37
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…
![](../../users/profiles/6434407.webp)
Shashindra Sri
- 753
- 6
- 16
2
votes
1 answer
[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…
![](../../users/profiles/9313676.webp)
Swapnil Soni
- 561
- 4
- 14
2
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…
![](../../users/profiles/9405842.webp)
ljcrafty
- 41
- 6
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…
![](../../users/profiles/2894742.webp)
Madhesh
- 1,468
- 23
- 49
1
vote
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…
![](../../users/profiles/3169524.webp)
Kosteg
- 355
- 2
- 9
1
vote
1 answer
jsencrypt returns null decrypting string from encrypt function
I am playing with jsencrypt and noticed something very strange. Here is my code. The encrypt and decrypt works if they are in a variable. But when I console log the enc and then copy the value into a string, the decryption returns null. Does…
![](../../users/profiles/3730078.webp)
Bill
- 376
- 2
- 11
1
vote
1 answer
Encryption-Decryption not working between the client-sever program
We are facing issue with the encryption-decryption of data.In server-side we are having decryption java code like this
public static String decrypt(byte[] data, PrivateKey base64PrivateKey) throws NoSuchPaddingException, NoSuchAlgorithmException,…
![](../../users/profiles/4667025.webp)
Süresh AK
- 325
- 1
- 18
1
vote
1 answer
JMeter - JsenEncrypt using Groovy so not to overload js load during each thread call for encryption
JMeter using jsr223 preprocessor wanted to use groovy as language.
How to convert present code to groovy so that below code don't cause any performance bottlenecks when executed as part of each thread
The script looks like this:
![](../../users/profiles/9627186.webp)
JMeter User
- 21
- 4
1
vote
3 answers
How to decrypt data using phpseclib class Crypt_RSA that was encrypted by travist/jsencrypt
im using linux ubuntu server with nginx,mysql,php7.3
I'm trying to encrypt message using public rsa key, that was generated on server side using phpseclib (http://phpseclib.sourceforge.net/)
![](../../users/profiles/10035925.webp)
Olympic Bear
- 15
- 4