From d4d2f622b567a05cedfa7e6d05ec4fb71a2f5d37 Mon Sep 17 00:00:00 2001 From: "John C. Vernaleo" Date: Mon, 8 Sep 2014 09:29:39 -0400 Subject: [PATCH] Fix bug and inconsistant error msg seen by lint. --- btcec.go | 2 +- signature.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/btcec.go b/btcec.go index d45fef2a..0ad85b6c 100644 --- a/btcec.go +++ b/btcec.go @@ -506,7 +506,7 @@ func (curve *KoblitzCurve) doubleZ1EqualsOne(x1, y1, x3, y3, z3 *fieldVal) { // any assumptions about the z value and stores the result in (x3, y3, z3). // That is to say (x3, y3, z3) = 2*(x1, y1, z1). It is the slowest of the point // doubling routines due to requiring the most arithmetic. -func (cuve *KoblitzCurve) doubleGeneric(x1, y1, z1, x3, y3, z3 *fieldVal) { +func (curve *KoblitzCurve) doubleGeneric(x1, y1, z1, x3, y3, z3 *fieldVal) { // Point doubling formula for Jacobian coordinates for the secp256k1 // curve: // X3 = (3*X1^2)^2 - 8*X1*Y1^2 diff --git a/signature.go b/signature.go index 9bd9fa6a..cb798958 100644 --- a/signature.go +++ b/signature.go @@ -283,7 +283,7 @@ func recoverKeyFromSignature(curve *KoblitzCurve, sig *Signature, msg []byte, if doChecks { nRx, nRy := curve.ScalarMult(Rx, Ry, curve.Params().N.Bytes()) if nRx.Sign() != 0 || nRy.Sign() != 0 { - return nil, errors.New("R*n does not equal the point at infinity") + return nil, errors.New("n*R does not equal the point at infinity") } }