diff --git a/lib/elliptic/ec/index.js b/lib/elliptic/ec/index.js index 8b58781..a1f4515 100644 --- a/lib/elliptic/ec/index.js +++ b/lib/elliptic/ec/index.js @@ -223,7 +223,7 @@ EC.prototype.recoverPubKey = function(msg, signature, j, enc) { return this.g.mulAdd(s1, r, s2); }; -EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { +EC.prototype.getKeyRecoveryParam = function(msg, signature, Q, enc) { signature = new Signature(signature, enc); if (signature.recoveryParam !== null) return signature.recoveryParam; @@ -231,7 +231,7 @@ EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { for (var i = 0; i < 4; i++) { var Qprime; try { - Qprime = this.recoverPubKey(e, signature, i); + Qprime = this.recoverPubKey(msg, signature, i); } catch (e) { continue; }