aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/sca/re/structural.py
diff options
context:
space:
mode:
authorJ08nY2023-11-08 16:11:47 +0100
committerJ08nY2023-11-10 12:21:27 +0100
commit4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a (patch)
tree8811a63fc9e0972eaeee13ffb41b1afec773bb4e /pyecsca/sca/re/structural.py
parent3694c7ba86650e3e8e60a18c8d540e56c5f026fc (diff)
downloadpyecsca-4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a.tar.gz
pyecsca-4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a.tar.zst
pyecsca-4f8f8a8a7a1ea62ec80ad56388cb2bef2b8f0c8a.zip
Add secp256k1 formulas.
Diffstat (limited to 'pyecsca/sca/re/structural.py')
-rw-r--r--pyecsca/sca/re/structural.py8
1 files changed, 4 insertions, 4 deletions
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())