X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=gost3410%2Fcurve.go;h=b5fa052c9812867ca5e034700061a5ec147654be;hb=refs%2Ftags%2Fv4.2.0;hp=47f964b583a66bf9b735b73c671b0ca0e97873e3;hpb=ce6c45e481a59d843a3b9caab55608c738aac2f4;p=gogost.git diff --git a/gost3410/curve.go b/gost3410/curve.go index 47f964b..b5fa052 100644 --- a/gost3410/curve.go +++ b/gost3410/curve.go @@ -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)