lilliput-ae-reference-implementation

Implementations of Lilliput-AE submitted to the NIST LWC standardization process
git clone https://git.kevinlegouguec.net/lilliput-ae-reference-implementation
Log | Files | Refs | README

commit 99c63c6699e6da600348a476ebbc52b783002d1b
parent 11a1e33e41858d87692a8b6d726d654e292455ec
Author: Kévin Le Gouguec <kevin.legouguec@airbus.com>
Date:   Thu, 14 Mar 2019 14:47:10 +0100

[implem-python] Renommage de variables

Pour que le lien soit plus facile à faire avec la spec.

Diffstat:
Mpython/lilliput_tbc.py | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/python/lilliput_tbc.py b/python/lilliput_tbc.py @@ -29,19 +29,19 @@ def RoundTweakeySchedule(tweakey) : def SubTweakeyExtract(tweakey, Ci): - subtweakey = [0 for byte in range(0, 8)] + RTKi = [0]*8 - for byte in range(len(tweakey)): - subtweakey[byte % 8] ^= tweakey[byte] + for j, byte in enumerate(tweakey): + RTKi[j%8] ^= byte - subtweakey[0] ^= Ci + RTKi[0] ^= Ci - return subtweakey + return RTKi def TweakeyScheduleWhole(tweakey, r): # store main tweakey in TKs[0] - # and corresponding RTKs[0] + # and corresponding round tweakey in RTKs[0] TKs = [tweakey] RTKs = [SubTweakeyExtract(TKs[0], 0)]