ecdsa/ecpubkey: rectify #364 artifacts
This commit is contained in:
parent
7513e73f74
commit
8aa4f9ecc9
2 changed files with 4 additions and 3 deletions
src
|
@ -146,7 +146,7 @@ function verifyRaw (curve, e, signature, Q) {
|
|||
if (r.signum() <= 0 || r.compareTo(n) >= 0) return false
|
||||
if (s.signum() <= 0 || s.compareTo(n) >= 0) return false
|
||||
|
||||
// c = s^-1 mod n
|
||||
// c = s^-1 mod n
|
||||
var c = s.modInverse(n)
|
||||
|
||||
// 1.4.4 Compute u1 = es^−1 mod n
|
||||
|
@ -161,7 +161,7 @@ function verifyRaw (curve, e, signature, Q) {
|
|||
// 1.4.5 (cont.) Enforce R is not at infinity
|
||||
if (curve.isInfinity(R)) return false
|
||||
|
||||
// 1.4.8 If v = r, output "valid", and if v != r, output "invalid"
|
||||
// 1.4.8 If v = r, output "valid", and if v != r, output "invalid"
|
||||
return v.equals(r)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue