X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=gost3410%2Fvko.go;h=e373e4a6c2a63ef290fd77ec0652f436d1a68f28;hb=589425e6516d75e5c233d72369e39a6a293740b2;hp=bb10f9430b98bbf818c24e2bbb912bafb8fffa6e;hpb=c07494bbd559b9d00f391e28cfd070e18afe9900;p=gogost.git diff --git a/gost3410/vko.go b/gost3410/vko.go index bb10f94..e373e4a 100644 --- a/gost3410/vko.go +++ b/gost3410/vko.go @@ -1,5 +1,5 @@ // GoGOST -- Pure Go GOST cryptographic functions library -// Copyright (C) 2015-2019 Sergey Matveev +// Copyright (C) 2015-2020 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 @@ -24,6 +24,7 @@ func (prv *PrivateKey) KEK(pub *PublicKey, ukm *big.Int) ([]byte, error) { if err != nil { return nil, err } + ukm = ukm.Mul(ukm, prv.C.Co) if ukm.Cmp(bigInt1) != 0 { keyX, keyY, err = prv.C.Exp(ukm, keyX, keyY) if err != nil {