add info on public key recovery

This commit is contained in:
Ryan X. Charles 2014-08-24 14:26:17 -07:00
parent e6a88118ae
commit ea0ee1b687
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,9 @@ ECDSA.prototype.randomK = function() {
return this;
};
// Information about public key recovery:
// https://bitcointalk.org/index.php?topic=6430.0
// http://stackoverflow.com/questions/19665491/how-do-i-get-an-ecdsa-public-key-from-just-a-bitcoin-signature-sec1-4-1-6-k
ECDSA.prototype.sig2pubkey = function() {
var i = this.sig.i;
if (!(i === 0 || i === 1 || i === 2 || i === 3))