summaryrefslogtreecommitdiff
path: root/python/helpers.py
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@airbus.com>2019-03-22 10:34:02 +0100
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2019-03-22 10:34:02 +0100
commitdd934c63386c8fa22a5b0944e0256c435d55938c (patch)
tree4cd2b88da9533caaa719bf2f7195172cfd548c52 /python/helpers.py
parent7350fbb6583236b929235a8be7f17f149901f004 (diff)
downloadlilliput-ae-implem-dd934c63386c8fa22a5b0944e0256c435d55938c.tar.xz
[implem-python] Renommage du module TBC
Quand le tout sera packagé sous le namespace "lilliput", le préfixe alourdira plus qu'autre chose.
Diffstat (limited to 'python/helpers.py')
-rw-r--r--python/helpers.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/helpers.py b/python/helpers.py
index be4b406..321b096 100644
--- a/python/helpers.py
+++ b/python/helpers.py
@@ -1,5 +1,5 @@
from constants import BLOCK_BITS, BLOCK_BYTES
-from lilliput_tbc import LilliputTBCEnc
+import tbc
def ArrayToBlockbytesMatrix(array):
@@ -65,7 +65,7 @@ def BuildAuth(t, A, key):
for i in range(0, l_a):
tweak = _tweakAssociatedData(t, i, padded=False)
- enc = LilliputTBCEnc(tweak, key, A[i])
+ enc = tbc.encrypt(tweak, key, A[i])
Auth = XorState(Auth, enc)
if not need_padding:
@@ -73,7 +73,7 @@ def BuildAuth(t, A, key):
tweak = _tweakAssociatedData(t, l_a, padded=True)
ad_padded = Padding10LSB(A[l_a])
- enc = LilliputTBCEnc(tweak, key, ad_padded)
+ enc = tbc.encrypt(tweak, key, ad_padded)
Auth = XorState(Auth, enc)
return Auth