From bfc5924522653e0820c16a0c76cd52daffe4aa42 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sat, 29 Mar 2014 17:30:04 +1100 Subject: [PATCH] Compression is irrelevant in comparison --- src/ecdsa.js | 1 - src/message.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ecdsa.js b/src/ecdsa.js index f721185..cf9c1ad 100644 --- a/src/ecdsa.js +++ b/src/ecdsa.js @@ -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 diff --git a/src/message.js b/src/message.js index 7e52b95..c541495 100644 --- a/src/message.js +++ b/src/message.js @@ -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) {