// GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2019 Sergey Matveev <stargrave@stargrave.org>
+// Copyright (C) 2015-2021 Sergey Matveev <stargrave@stargrave.org>
//
// 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
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)
}
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)