Reputation: 11
I am new to encryption and am using a Node JS library recrypt-js to perform Proxy Re-encryption using CryptoJS. In the example given there is a message "test data" that is to be encrypted, but the issue is that I am unable to decrypt the encrypted message back to the original text.
In the following code:
...
let obj = PRE.encryptData(pk_A, "test data")
console.log(obj)
let rk = PRE.generateReEncrytionKey(sk_A, pk_B);
PRE.reEncryption(rk, obj)
let decryptData = PRE.decryptData(sk_B, obj)
console.log(decryptData)
The output for decryptData is showing an object containing an array of digits. How can I successfully output the original text? Thanks.
Upvotes: 0
Views: 235