commit 864e0bc2a83297bbea069f3fcc6cb333dbc2de19
parent 9f999131bc6798e320432e71f3bfbcfbf20dc295
Author: Kévin Le Gouguec <kevin.legouguec@airbus.com>
Date: Thu, 14 Mar 2019 13:51:24 +0100
[implem-python] Dé-duplication de constantes
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/python/lilliput_tbc.py b/python/lilliput_tbc.py
@@ -1,23 +1,20 @@
"""
Lilliput TBC
"""
-import constants
+from constants import BLOCK_BYTES, Sbox
import multiplications
-BLOCK_BITS = 128
KEY_BITS = 128
TWEAK_BITS = 192
LANE_BITS = 64
LANE_BYTES = LANE_BITS / 8
LANES = int((TWEAK_BITS+KEY_BITS) / LANE_BITS)
-BLOCK_BYTES = int(BLOCK_BITS / 8)
TWEAKEY_BITS = KEY_BITS + TWEAK_BITS
KEY_BYTES = int(KEY_BITS / 8)
TWEAK_BYTES = int(TWEAK_BITS / 8)
TWEAKEY_BYTES = int(TWEAKEY_BITS / 8)
-Sbox = constants.Sbox
MultiplyM = multiplications.MultiplyM
MultiplyM2 = multiplications.MultiplyM2
MultiplyM3 = multiplications.MultiplyM3