elliptic icon indicating copy to clipboard operation
elliptic copied to clipboard

How to decipher the encrypted message?

Open istabraq-iot opened this issue 4 years ago • 0 comments

Can I decrypt the signature to original message using this library?

I use this for encryption:

var EC = require('elliptic').ec;
var ec = new EC('secp256k1');
 
var msg = "hello";

let myKey = ec.keyFromPrivate('29f3c33a550d3810e6b82b7b510672118aeabcf8b19e00172e4623cbf480d2b8');
const sig = myKey.sign(msg, 'base64');
var derSign = sig.toDER('hex');
console.log (derSign)

I want to return the signature to hello again. How I could do that, please?

istabraq-iot avatar Jan 27 '21 12:01 istabraq-iot