aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/elliptic/params.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/elliptic/params.go b/src/crypto/elliptic/params.go
index 0507d22b27..8cf9a6dc40 100644
--- a/src/crypto/elliptic/params.go
+++ b/src/crypto/elliptic/params.go
@@ -295,13 +295,13 @@ func (curve *CurveParams) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.
Bz := new(big.Int).SetInt64(1)
x, y, z := new(big.Int), new(big.Int), new(big.Int)
- for _, byte := range k {
- for bitNum := 0; bitNum < 8; bitNum++ {
+ for _, b := range k {
+ for range 8 {
x, y, z = curve.doubleJacobian(x, y, z)
- if byte&0x80 == 0x80 {
+ if b&0x80 == 0x80 {
x, y, z = curve.addJacobian(Bx, By, Bz, x, y, z)
}
- byte <<= 1
+ b <<= 1
}
}