Skip to content

Commit

Permalink
Merge commit from fork
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-MS authored Jul 17, 2024
1 parent 7570078 commit 7ac5360
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/elliptic/eddsa/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ EDDSA.prototype.sign = function sign(message, secret) {
EDDSA.prototype.verify = function verify(message, sig, pub) {
message = parseBytes(message);
sig = this.makeSignature(sig);
if (sig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()) {
return false;
}
var key = this.keyFromPublic(pub);
var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);
var SG = this.g.mul(sig.S());
Expand Down

0 comments on commit 7ac5360

Please sign in to comment.