X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=mgm%2Fmul.go;h=8fec46619ded35d6e7fb430492254366a22c2060;hb=6d9056bfe4a2d69469a1e70f3bf08f89b377b06e;hp=7e0daaec6e05b449ae2053d0531cdbb3b8d7519c;hpb=c07494bbd559b9d00f391e28cfd070e18afe9900;p=gogost.git diff --git a/mgm/mul.go b/mgm/mul.go index 7e0daae..8fec466 100644 --- a/mgm/mul.go +++ b/mgm/mul.go @@ -1,5 +1,5 @@ // GoGOST -- Pure Go GOST cryptographic functions library -// Copyright (C) 2015-2019 Sergey Matveev +// Copyright (C) 2015-2021 Sergey Matveev // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -19,7 +19,6 @@ func (mgm *MGM) mul(xBuf, yBuf []byte) []byte { mgm.x.SetBytes(xBuf) mgm.y.SetBytes(yBuf) mgm.z.SetInt64(0) - var i int for mgm.y.BitLen() != 0 { if mgm.y.Bit(0) == 1 { mgm.z.Xor(mgm.z, mgm.x) @@ -35,7 +34,7 @@ func (mgm *MGM) mul(xBuf, yBuf []byte) []byte { } zBytes := mgm.z.Bytes() rem := len(xBuf) - len(zBytes) - for i = 0; i < rem; i++ { + for i := 0; i < rem; i++ { mgm.mulBuf[i] = 0 } copy(mgm.mulBuf[rem:], zBytes)