Skip to content

Commit

Permalink
revise sat differential model
Browse files Browse the repository at this point in the history
  • Loading branch information
cs committed Nov 12, 2024
1 parent a687bb7 commit 8abf78e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _parse_solver_output(self, variable2value):
return components_solutions, total_weight_diff + 2 * total_weight_lin

def find_one_differential_linear_trail_with_fixed_weight(
self, weight, num_unknown_vars=None, fixed_values=[], solver_name=solvers.SOLVER_DEFAULT):
self, weight, num_unknown_vars=None, fixed_values=[], solver_name=solvers.SOLVER_DEFAULT, options=None):
"""
Finds one XOR differential-linear trail with a fixed weight. The weight must be the sum of the probability weight
of the top part (differential part) and the correlation weight of the bottom part (linear part).
Expand Down Expand Up @@ -365,7 +365,7 @@ def find_one_differential_linear_trail_with_fixed_weight(
)
self.model_constraints.extend(constraints)

solution = self.solve("XOR_REGULAR_DETERMINISTIC_DIFFERENTIAL", solver_name=solver_name)
solution = self.solve("XOR_REGULAR_DETERMINISTIC_DIFFERENTIAL", solver_name=solver_name, options=options)
solution['building_time_seconds'] = time.time() - start_time
solution['test_name'] = "find_one_regular_truncated_xor_differential_trail"

Expand Down

0 comments on commit 8abf78e

Please sign in to comment.