cube attack, use loaded model

This commit is contained in:
2026-07-07 13:46:28 +02:00
parent bf3146cf98
commit 147fe38e8f
2 changed files with 21 additions and 8 deletions
+4 -2
View File
@@ -150,7 +150,7 @@ def run_exhaustive_xor_cli():
print("Done.")
def run_cube_attack_cli():
def run_cube_attack_cli(model = None):
print("\nCube attack search on TEA3 model to search for low-degree superpolys.")
rounds = prompt_int("How many rounds? (1100): ", 1, 100)
@@ -193,6 +193,7 @@ def run_cube_attack_cli():
max_degree=max_degree,
fixed_zero_bits=fixed_zero_bits,
fixed_one_bits=fixed_one_bits,
model=model,
)
print("\n" + "=" * 50)
@@ -201,6 +202,7 @@ def run_cube_attack_cli():
def main():
model = None
while True:
print("=" * 50)
print(" Tea3 Model ")
@@ -242,7 +244,7 @@ def main():
elif mode == 7:
run_exhaustive_xor_cli()
elif mode == 8:
run_cube_attack_cli()
run_cube_attack_cli(model)
elif mode == 9:
run_precompute_cli()
elif mode == 10: