aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca
diff options
context:
space:
mode:
authorJ08nY2023-11-15 11:46:16 +0100
committerJ08nY2023-11-15 11:46:16 +0100
commitd183a542ffbe9cfc99cac0dcadf7f2953c01d84a (patch)
tree0ac6b6a2eae0abfb6536b2fbba13b7dad3914b4a /pyecsca
parentfc0774b077905eb72b39ff4582c0e50a9072d296 (diff)
downloadpyecsca-d183a542ffbe9cfc99cac0dcadf7f2953c01d84a.tar.gz
pyecsca-d183a542ffbe9cfc99cac0dcadf7f2953c01d84a.tar.zst
pyecsca-d183a542ffbe9cfc99cac0dcadf7f2953c01d84a.zip
Ditch lib formula tests that are not tests.
Diffstat (limited to 'pyecsca')
-rw-r--r--pyecsca/sca/re/__init__.py2
-rw-r--r--pyecsca/sca/re/structural.py3
2 files changed, 5 insertions, 0 deletions
diff --git a/pyecsca/sca/re/__init__.py b/pyecsca/sca/re/__init__.py
index 4ad35ed..1b734d3 100644
--- a/pyecsca/sca/re/__init__.py
+++ b/pyecsca/sca/re/__init__.py
@@ -1,3 +1,5 @@
"""Package for reverse-engineering."""
from .rpa import *
+from .zvp import *
+from .structural import *
diff --git a/pyecsca/sca/re/structural.py b/pyecsca/sca/re/structural.py
index 3581b0d..7b2e3ca 100644
--- a/pyecsca/sca/re/structural.py
+++ b/pyecsca/sca/re/structural.py
@@ -1,5 +1,6 @@
""""""
from typing import Dict
+from public import public
from ...ec.curve import EllipticCurve
from ...ec.formula import Formula
@@ -8,6 +9,7 @@ from .zvp import unroll_formula
from operator import itemgetter, attrgetter
+@public
def formula_similarity(one: Formula, other: Formula) -> Dict[str, float]:
if one.coordinate_model != other.coordinate_model:
raise ValueError("Mismatched coordinate model.")
@@ -34,6 +36,7 @@ def formula_similarity(one: Formula, other: Formula) -> Dict[str, float]:
}
+@public
def formula_similarity_fuzz(
one: Formula, other: Formula, curve: EllipticCurve, samples: int = 1000
) -> Dict[str, float]: