diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-21 17:16:21 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-21 17:30:38 +0100 |
| commit | 7350fbb6583236b929235a8be7f17f149901f004 (patch) | |
| tree | 77874e80069cd9d29ea3bb00ca172974aec8b026 /python/lilliput_ae_1.py | |
| parent | a3663b7b3bdc092fb0667ea6c16b8e9a6cf4cf73 (diff) | |
| download | lilliput-ae-implem-7350fbb6583236b929235a8be7f17f149901f004.tar.xz | |
[implem-python] Simplification de pad10*
Dans le cadre d'une croisade contre les range(len(…)).
Suppression d'un paramètre inutile dans la foulée.
Diffstat (limited to 'python/lilliput_ae_1.py')
| -rw-r--r-- | python/lilliput_ae_1.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/lilliput_ae_1.py b/python/lilliput_ae_1.py index 0bc4236..5cc263b 100644 --- a/python/lilliput_ae_1.py +++ b/python/lilliput_ae_1.py @@ -85,7 +85,7 @@ def TreatMessageEnc(M, N, key): Final = ltbc.LilliputTBCEnc(tweak, key, checksum) else: - m_padded = Padding10LSB(M[l], padding_bytes*8) + m_padded = Padding10LSB(M[l]) checksum = XorState(checksum, m_padded) tweak = TweakMessage(N, l, _MessageTweak.PAD) pad = ltbc.LilliputTBCEnc(tweak, key, [0 for byte in range(0, BLOCK_BYTES)]) @@ -122,7 +122,7 @@ def TreatMessageDec(C, N, key): lower_part = LowPart(pad, padding_bytes*8) M.append(XorState(C[l], lower_part)) - m_padded = Padding10LSB(M[l], padding_bytes*8) + m_padded = Padding10LSB(M[l]) checksum = XorState(checksum, m_padded) tweak_final = TweakMessage(N, l+1, _MessageTweak.FINAL) Final = ltbc.LilliputTBCEnc(tweak_final, key, checksum) |
