From 864e0bc2a83297bbea069f3fcc6cb333dbc2de19 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Thu, 14 Mar 2019 13:51:24 +0100 Subject: [implem-python] Dé-duplication de constantes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/lilliput_tbc.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'python/lilliput_tbc.py') diff --git a/python/lilliput_tbc.py b/python/lilliput_tbc.py index 12df2dc..515a671 100644 --- 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 -- cgit v1.2.3