diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-22 10:34:02 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-22 10:34:02 +0100 |
| commit | dd934c63386c8fa22a5b0944e0256c435d55938c (patch) | |
| tree | 4cd2b88da9533caaa719bf2f7195172cfd548c52 /python/helpers.py | |
| parent | 7350fbb6583236b929235a8be7f17f149901f004 (diff) | |
| download | lilliput-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.py | 6 |
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 |
