From 357a5c6ace93443dec929e4fc2a4c6656ccec6e6 Mon Sep 17 00:00:00 2001 From: hadipourh Date: Tue, 17 Dec 2024 11:11:55 +0100 Subject: [PATCH] debug cpgenerator --- sboxanalyzer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sboxanalyzer.py b/sboxanalyzer.py index ae91744..da153f5 100755 --- a/sboxanalyzer.py +++ b/sboxanalyzer.py @@ -1139,7 +1139,7 @@ def generate_cp_constraints(self, propagation_dictionary, input_variables=None, if len(output_variables) != n: raise ValueError(f"The size of output variables should be {n}") output_variables = output_variables - last_condition = " /\\ ".join([f"output_variables{i} = -1" for i in range(n)]) + last_condition = " /\\ ".join([f"{output_variables[i]} = -1" for i in range(n)]) constraints = "" for i, (input, output) in enumerate(propagation_dictionary.items()): input_str = [f"{input_variables[i]} == {input[i]}" for i in range(m)]