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