]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/gost3410.py
Raise copyright years
[pygost.git] / pygost / gost3410.py
index 50de4796077ee85f646331a8e9a3a61827b70e5e..8103af0641ae929b30bce50beeb9355256f45dd9 100644 (file)
@@ -1,6 +1,6 @@
 # coding: utf-8
 # PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2018 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2019 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
@@ -94,7 +94,6 @@ CURVE_PARAMS = {
         "0000000000000000000000000000000000000000000000000000000000000000",
         "41ECE55743711A8C3CBF3783CD08C0EE4D4DC440D4641A8F366E550DFDB3BB67",
     ),
-    # pylint: disable=line-too-long
     "GostR3410_2012_TC26_ParamSetA": (
         "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC7",
         "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF27E69532F48D89116FF22B8D4E0560609B4B38ABFAD2B85DCACDB1411F10B275",
@@ -111,7 +110,6 @@ CURVE_PARAMS = {
         "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002",
         "1A8F7EDA389B094C2C071E3647A8940F3C123B697578C213BE6DD9E6C8EC7335DCB228FD1EDF4A39152CBCAAF8C0398828041055F94CEEEC7E21340780FE41BD"
     ),
-    # pylint: enable=line-too-long
 }
 for c, params in CURVE_PARAMS.items():
     CURVE_PARAMS[c] = [hexdec(param) for param in params]
@@ -164,9 +162,9 @@ class GOST3410Curve(object):
         y = y or self.y
         tx = x
         ty = y
-        degree -= 1
         if degree == 0:
             raise ValueError("Bad degree value")
+        degree -= 1
         while degree != 0:
             if degree & 1 == 1:
                 tx, ty = self._add(tx, ty, x, y)