]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/gost3410.py
Fix 34.10 degree sanitizing
[pygost.git] / pygost / gost3410.py
index 50de4796077ee85f646331a8e9a3a61827b70e5e..f6089128d9571ce606ef518dc2c9885c56c86868 100644 (file)
@@ -164,9 +164,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)