]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/gost3412.py
Rename Kuz to Kuznechik for clarity
[pygost.git] / pygost / gost3412.py
index ba204a0a1e24fa2d744e941b6fe1268193526c09..663318609d47d0d0214e2f907263a730d7d525c5 100644 (file)
@@ -1,6 +1,6 @@
 # coding: utf-8
 # PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2016 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2017 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
@@ -24,7 +24,7 @@ Several precalculations are performed during this module importing.
 """
 
 from pygost.utils import strxor
-from pygost.utils import xrange
+from pygost.utils import xrange  # pylint: disable=redefined-builtin
 
 
 LC = bytearray((
@@ -75,7 +75,10 @@ def gf(a, b):
 # optimization.
 # Actually it can be computed only once and saved on the disk.
 ########################################################################
+
+
 GF = [bytearray(256) for _ in xrange(256)]
+
 for x in xrange(256):
     for y in xrange(256):
         GF[x][y] = gf(x, y)
@@ -104,7 +107,10 @@ def Linv(blk):
 # Precalculate values of the C -- it does not depend on key.
 # Actually it can be computed only once and saved on the disk.
 ########################################################################
+
+
 C = []
+
 for x in range(1, 33):
     y = bytearray(16)
     y[15] = x
@@ -115,7 +121,7 @@ def lp(blk):
     return L([PI[v] for v in blk])
 
 
-class GOST3412Kuz(object):
+class GOST3412Kuznechik(object):
     """GOST 34.12-2015 128-bit block cipher Кузнечик (Kuznechik)
     """
     def __init__(self, key):