aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca
diff options
context:
space:
mode:
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]: