BP matrix family
This commit is contained in:
+6
-3
@@ -1,7 +1,7 @@
|
||||
from tea3.pretty_print import pretty_print
|
||||
from tea3.cliutils import prompt_int, prompt_choice, prompt_list
|
||||
from tea3.tea3model import Tea3Model
|
||||
from tea3.variable_search import run_exhaustive, run_exhaustive_staircase, run_exhaustive_staircase2
|
||||
from tea3.variable_search import run_exhaustive, run_exhaustive_staircase, run_exhaustive_staircase2, run_exhaustive_bp
|
||||
from tea3.sbox import run_sbox
|
||||
from tea3.variable_xor import run_variable_xor, run_exhaustive_xor
|
||||
from tea3.f31f32 import run_f31f32
|
||||
@@ -41,8 +41,9 @@ def run_exhaustive_cli():
|
||||
print(" 1) First-row matrix")
|
||||
print(" 2) Staircase matrix")
|
||||
print(" 3) Staircase 2 matrix")
|
||||
print(" 4) BP matrix")
|
||||
|
||||
family = prompt_choice("Your choice (1, 2 or 3): ", {1, 2, 3})
|
||||
family = prompt_choice("Your choice (1, 2, 3 or 4): ", {1, 2, 3, 4})
|
||||
|
||||
print("\nR registers are indexed 0–7; bits within each register are 0–7.")
|
||||
print("Enter -1 to print all bits in the chosen register.")
|
||||
@@ -57,8 +58,10 @@ def run_exhaustive_cli():
|
||||
run_exhaustive(steps, target_reg, target_bit)
|
||||
elif family == 2:
|
||||
run_exhaustive_staircase(steps, target_reg, target_bit)
|
||||
else:
|
||||
elif family == 3:
|
||||
run_exhaustive_staircase2(steps, target_reg, target_bit)
|
||||
else:
|
||||
run_exhaustive_bp(steps, target_reg, target_bit)
|
||||
|
||||
print("\n" + "=" * 50)
|
||||
print("Done.")
|
||||
|
||||
Reference in New Issue
Block a user