Change the variable name from byte to b, and use range over int to
simplify the loop.
Change-Id: I8855053c26ce798311f12505cd5edf21d7caf1f5
GitHub-Last-Rev:
70c80545df29c897ea81f115334fcc64503c0eb1
GitHub-Pull-Request: golang/go#74736
Reviewed-on: https://go-review.googlesource.com/c/go/+/690135
Reviewed-by: qiu laidongfeng <2645477756@qq.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
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
}
}