X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=gost3410%2Fcurve.go;h=696beabed9a68889675f9b96237a924fff30ea91;hb=c40d1e5634cf6d540d908a57423f4b504e39f186;hp=47f964b583a66bf9b735b73c671b0ca0e97873e3;hpb=c07494bbd559b9d00f391e28cfd070e18afe9900;p=gogost.git diff --git a/gost3410/curve.go b/gost3410/curve.go index 47f964b..696beab 100644 --- a/gost3410/curve.go +++ b/gost3410/curve.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 @@ -79,7 +79,7 @@ func NewCurve(p, q, a, b, x, y, e, d *big.Int) (*Curve, error) { r2.Mod(r2, c.P) c.pos(r2) if r1.Cmp(r2) != 0 { - return nil, errors.New("Invalid curve parameters") + return nil, errors.New("gogost/gost3410: invalid curve parameters") } if e != nil && d != nil { c.E = e @@ -131,7 +131,7 @@ func (c *Curve) add(p1x, p1y, p2x, p2y *big.Int) { func (c *Curve) Exp(degree, xS, yS *big.Int) (*big.Int, *big.Int, error) { if degree.Cmp(zero) == 0 { - return nil, nil, errors.New("Bad degree value") + return nil, nil, errors.New("gogost/gost3410: zero degree value") } dg := big.NewInt(0).Sub(degree, bigInt1) tx := big.NewInt(0).Set(xS)