Compression is irrelevant in comparison

This commit is contained in:
Daniel Cousens 2014-03-29 17:30:04 +11:00
parent 669a58bbf8
commit bfc5924522
2 changed files with 1 additions and 2 deletions

View file

@ -292,7 +292,6 @@ var ECDSA = {
calcPubKeyRecoveryParam: function (origPubKey, r, s, hash) {
for (var i = 0; i < 4; i++) {
var pubKey = ECDSA.recoverPubKey(r, s, hash, i)
pubKey.compressed = origPubKey.compressed
if (pubKey.pub.equals(origPubKey.pub)) {
return i

View file

@ -32,7 +32,7 @@ Message.signMessage = function (key, message) {
var sig = key.sign(hash)
var obj = ecdsa.parseSig(sig)
var i = ecdsa.calcPubKeyRecoveryParam(key.getPub(key.compressed), obj.r, obj.s, hash)
var i = ecdsa.calcPubKeyRecoveryParam(key.getPub(), obj.r, obj.s, hash)
i += 27
if (key.compressed) {