]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/gost3412.py
CTR-ACPKM, OMAC-ACPKM-Master modes of operation
[pygost.git] / pygost / gost3412.py
index 450cc7af80495d2eb5f23a101fce695569bc8444..296e4fbea72a794ca625c71663ce38b223b0d9e6 100644 (file)
@@ -26,6 +26,8 @@ from pygost.utils import strxor
 from pygost.utils import xrange
 
 
+KEY_SIZE = 32
+
 LC = bytearray((
     148, 32, 133, 16, 194, 192, 1, 251, 1, 192, 194, 16, 133, 32, 148, 1,
 ))
@@ -123,6 +125,8 @@ def lp(blk):
 class GOST3412Kuznechik(object):
     """GOST 34.12-2015 128-bit block cipher Кузнечик (Kuznechik)
     """
+    blocksize = 16
+
     def __init__(self, key):
         """
         :param key: encryption/decryption key
@@ -156,6 +160,8 @@ class GOST3412Kuznechik(object):
 class GOST3412Magma(object):
     """GOST 34.12-2015 64-bit block cipher Магма (Magma)
     """
+    blocksize = 8
+
     def __init__(self, key):
         """
         :param key: encryption/decryption key