indutny / elliptic

Fast Elliptic Curve Cryptography in plain javascript
1.66k stars 359 forks source link

How to convert a DER-formatted signature back to a Signature object? #303

Open fauxbytes opened 1 year ago

fauxbytes commented 1 year ago

Given:

let sig = ecKey.sign(msg);
let sigDerHex = sig.toDER('hex');

Is there a way to rehydrate sigDerHex back to a Signature Object?

Many thanks!

no-longer-human commented 5 months ago

Project looks dead. The Signature constructor is capable of performing the conversion, but this has not been exposed for some reason.