Skip to content

Commit

Permalink
Merge pull request #287 from Crypto-TII/fix/fixing_calculate_componen…
Browse files Browse the repository at this point in the history
…t_weight

FIX/fix: calculate_component_weight
  • Loading branch information
peacker authored Oct 14, 2024
2 parents fdf1bba + e43e3b9 commit 53ad52a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion claasp/cipher_modules/models/sat/sat_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def fix_variables_value_constraints(fixed_variables=[]):

def calculate_component_weight(self, component, out_suffix, output_values_dict):
weight = 0
if ('MODADD' in component.description or 'AND' in component.description
if ('MODSUB' in component.description or 'MODADD' in component.description or 'AND' in component.description
or 'OR' in component.description or SBOX in component.type):
weight = sum([output_values_dict[f'hw_{component.id}_{i}{out_suffix}']
for i in range(component.output_bit_size)])
Expand Down

0 comments on commit 53ad52a

Please sign in to comment.