From 4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a Mon Sep 17 00:00:00 2001 From: J08nY Date: Wed, 8 Nov 2023 16:11:47 +0100 Subject: Add secp256k1 formulas. --- pyecsca/sca/re/structural.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pyecsca/sca/re/structural.py') diff --git a/pyecsca/sca/re/structural.py b/pyecsca/sca/re/structural.py index 1a8a200..092cf46 100644 --- a/pyecsca/sca/re/structural.py +++ b/pyecsca/sca/re/structural.py @@ -14,13 +14,13 @@ def formula_similarity(one: Formula, other: Formula) -> Dict[str, float]: one_unroll = unroll_formula(one) other_unroll = unroll_formula(other) - one_results = {name: None for name in one.outputs} + one_results = {} for name, value in one_unroll: - if name in one_results: + if name in one.outputs: one_results[name] = value - other_results = {name: None for name in other.outputs} + other_results = {} for name, value in other_unroll: - if name in other_results: + if name in other.outputs: other_results[name] = value one_result_polys = set(one_results.values()) other_result_polys = set(other_results.values()) -- cgit v1.2.3-70-g09d2