X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=mgm%2Fmode.go;h=e874dd372f0bc07343dacc496701ddf3a78a0118;hb=c40d1e5634cf6d540d908a57423f4b504e39f186;hp=fdbfa4277fad5577b2fc1af15a2857e547a4099c;hpb=c07494bbd559b9d00f391e28cfd070e18afe9900;p=gogost.git diff --git a/mgm/mode.go b/mgm/mode.go index fdbfa42..e874dd3 100644 --- a/mgm/mode.go +++ b/mgm/mode.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 @@ -61,10 +61,10 @@ type MGM struct { func NewMGM(cipher cipher.Block, tagSize int) (cipher.AEAD, error) { blockSize := cipher.BlockSize() if !(blockSize == 8 || blockSize == 16) { - return nil, errors.New("MGM supports only 64/128 blocksizes") + return nil, errors.New("gogost/mgm: only 64/128 blocksizes allowed") } if tagSize < 4 || tagSize > blockSize { - return nil, errors.New("invalid tag size") + return nil, errors.New("gogost/mgm: invalid tag size") } mgm := MGM{ maxSize: uint64(1<