diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-14 14:47:10 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-21 14:49:15 +0100 |
| commit | 99c63c6699e6da600348a476ebbc52b783002d1b (patch) | |
| tree | 263f3430def0edfaff1062867c047f4678e4dad4 /python | |
| parent | 11a1e33e41858d87692a8b6d726d654e292455ec (diff) | |
| download | lilliput-ae-implem-99c63c6699e6da600348a476ebbc52b783002d1b.tar.xz | |
[implem-python] Renommage de variables
Pour que le lien soit plus facile à faire avec la spec.
Diffstat (limited to 'python')
| -rw-r--r-- | python/lilliput_tbc.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/lilliput_tbc.py b/python/lilliput_tbc.py index fbd1fb3..418d083 100644 --- 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)] |
