diff options
Diffstat (limited to 'python/lilliput_tbc.py')
| -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)] |
