From 138ea450b99eaf50ab98385606d67ef7f5a9972d Mon Sep 17 00:00:00 2001 From: Juan del Carmen Grados Vasquez Date: Wed, 3 Jul 2024 05:24:34 -0500 Subject: [PATCH] Fixing window_size heuristic test Reducing time for test_find_one_xor_differential_trail_with_fixed_weight_and_with_exactly_one_full_3_window --- .../models/sat/sat_models/sat_xor_differential_model_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/cipher_modules/models/sat/sat_models/sat_xor_differential_model_test.py b/tests/unit/cipher_modules/models/sat/sat_models/sat_xor_differential_model_test.py index 3dbac593..2e5bf432 100644 --- a/tests/unit/cipher_modules/models/sat/sat_models/sat_xor_differential_model_test.py +++ b/tests/unit/cipher_modules/models/sat/sat_models/sat_xor_differential_model_test.py @@ -138,6 +138,7 @@ def test_find_one_xor_differential_trail_with_fixed_weight_and_with_exactly_thre assert int(result['total_weight']) == int(30.0) assert computed_number_of_full_windows == number_of_full_windows + def test_find_one_xor_differential_trail_with_fixed_weight_and_with_exactly_one_full_3_window(): speck = SpeckBlockCipher(number_of_rounds=10) sat = SatXorDifferentialModel(speck) @@ -150,9 +151,9 @@ def test_find_one_xor_differential_trail_with_fixed_weight_and_with_exactly_one_ plaintext = set_fixed_variables( component_id='plaintext', - constraint_type='not_equal', + constraint_type='equal', bit_positions=range(32), - bit_values=integer_to_bit_list(0, 32, 'big')) + bit_values=[1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]) key = set_fixed_variables( component_id='key', constraint_type='equal',