cube attack offline phase

This commit is contained in:
2026-07-06 16:54:19 +02:00
parent bfe0f6c356
commit b91f01c7e3
3 changed files with 312 additions and 4 deletions
+4 -2
View File
@@ -69,7 +69,7 @@ class Tea3Model:
self.R_bits[i][j] = result
def step(self):
def step(self, skip_abstract: bool = False):
R = self.R_bits.copy()
x = self.x_bits.copy()
r = self.r_bits.copy()
@@ -102,7 +102,9 @@ class Tea3Model:
self.R_bits[1] = R0
self.R_bits[0] = xor_vec(x0, xor_vec(R7, xor_vec(BP(R4), F32(R2, R1))))
self._abstract_R()
if not skip_abstract:
self._abstract_R()
self.step_count += 1
return R7