summaryrefslogtreecommitdiff
path: root/python/lilliput_ae_2.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/lilliput_ae_2.py')
-rw-r--r--python/lilliput_ae_2.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/python/lilliput_ae_2.py b/python/lilliput_ae_2.py
index d072935..ed57cdf 100644
--- a/python/lilliput_ae_2.py
+++ b/python/lilliput_ae_2.py
@@ -3,7 +3,6 @@
"""
import lilliput_tbc as ltbc
-from constants import rounds
from helpers import ArrayToBlockbytesMatrix, BlockbytesMatrixToBytes
@@ -13,7 +12,6 @@ TWEAK_BITS = 128
TWEAKEY_BITS = KEY_BITS + TWEAK_BITS
LANE_BITS = 64
LANES = int((TWEAKEY_BITS) / LANE_BITS)
-ROUNDS = 32
BLOCK_BYTES = int(BLOCK_BITS / 8)
KEY_BYTES = int(KEY_BITS / 8)
@@ -32,12 +30,10 @@ def InitParameters(key_bits) :
global TWEAKEY_BITS
global TWEAKEY_BYTES
global LANES
- global ROUNDS
KEY_BITS = key_bits
TWEAKEY_BITS = KEY_BITS + TWEAK_BITS
LANES = int((TWEAKEY_BITS) / LANE_BITS)
- ROUNDS = rounds(key_bits)
KEY_BYTES = int(KEY_BITS / 8)
TWEAKEY_BYTES = int(TWEAKEY_BITS / 8)
@@ -227,7 +223,6 @@ def SCT2Enc(A, M, N, key) :
M = ArrayToBlockbytesMatrix(M)
ltbc.KEY_BITS = KEY_BITS
- ltbc.ROUNDS = ROUNDS
ltbc.TWEAK_BITS = TWEAK_BITS
ltbc.LANES = LANES
@@ -236,11 +231,6 @@ def SCT2Enc(A, M, N, key) :
ltbc.TWEAK_BYTES = TWEAK_BYTES
ltbc.TWEAKEY_BYTES = TWEAKEY_BYTES
- ltbc.TKs = [[0 for byte in range(0, TWEAKEY_BYTES)] for round in range(0, ROUNDS)]
- ltbc.RTKs = [[0 for byte in range(0, 8)] for round in range(0, ROUNDS)]
- ltbc.States = [[0 for byte in range(0, BLOCK_BYTES)] for round in range(0, ROUNDS)]
-
-
Auth = BuildAuth(A, key)
tag = MesssageAuthTag(M, N, Auth, key)
C = MessageEncryption(M, N, tag, key)
@@ -261,7 +251,6 @@ def SCT2Dec(A, C, N, tag, key) :
C = ArrayToBlockbytesMatrix(C)
ltbc.KEY_BITS = KEY_BITS
- ltbc.ROUNDS = ROUNDS
ltbc.TWEAK_BITS = TWEAK_BITS
ltbc.LANES = LANES
@@ -270,11 +259,6 @@ def SCT2Dec(A, C, N, tag, key) :
ltbc.TWEAK_BYTES = TWEAK_BYTES
ltbc.TWEAKEY_BYTES = TWEAKEY_BYTES
- ltbc.TKs = [[0 for byte in range(0, TWEAKEY_BYTES)] for round in range(0, ROUNDS)]
- ltbc.RTKs = [[0 for byte in range(0, 8)] for round in range(0, ROUNDS)]
- ltbc.States = [[0 for byte in range(0, BLOCK_BYTES)] for round in range(0, ROUNDS)]
-
-
M = MessageEncryption(C, N, tag, key)
Auth = BuildAuth(A, key)
tag2 = MesssageAuthTag(M, N, Auth, key)