cube attack, use loaded model
This commit is contained in:
+4
-2
@@ -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? (1–100): ", 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:
|
||||
|
||||
Reference in New Issue
Block a user