aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/ec
diff options
context:
space:
mode:
authorJ08nY2024-01-27 11:48:50 +0100
committerJ08nY2024-01-27 11:48:50 +0100
commit8f05c2a23462be44b8f22da17f36eaf07e8cf9c4 (patch)
tree1bf7b0228f7326521651ba85e7fe7139a6127ac2 /test/ec
parentc99905ad7e2e4dcc269669fb5ef92e787e5248d7 (diff)
downloadpyecsca-8f05c2a23462be44b8f22da17f36eaf07e8cf9c4.tar.gz
pyecsca-8f05c2a23462be44b8f22da17f36eaf07e8cf9c4.tar.zst
pyecsca-8f05c2a23462be44b8f22da17f36eaf07e8cf9c4.zip
Add EFD -> Code transformation.
Diffstat (limited to 'test/ec')
-rw-r--r--test/ec/test_formula.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/ec/test_formula.py b/test/ec/test_formula.py
index ed437a5..e0fd6fe 100644
--- a/test/ec/test_formula.py
+++ b/test/ec/test_formula.py
@@ -33,7 +33,12 @@ from pyecsca.ec.formula.efd import (
LadderEFDFormula,
EFDFormula,
)
-from pyecsca.ec.formula import AdditionFormula, DoublingFormula, LadderFormula
+from pyecsca.ec.formula import (
+ AdditionFormula,
+ DoublingFormula,
+ LadderFormula,
+ CodeFormula,
+)
@pytest.fixture()
@@ -390,14 +395,14 @@ LIBRARY_FORMULAS = [
@pytest.fixture(params=LIBRARY_FORMULAS, ids=list(map(itemgetter(0), LIBRARY_FORMULAS)))
-def library_formula_params(request) -> Tuple[EFDFormula, DomainParameters]:
+def library_formula_params(request) -> Tuple[CodeFormula, DomainParameters]:
name, model, coords_name, param_spec, formula_type = request.param
model = model()
coordinate_model = model.coordinates[coords_name]
with as_file(files(test.data.formulas).joinpath(name)) as meta_path, as_file(
files(test.data.formulas).joinpath(name + ".op3")
) as op3_path:
- formula = formula_type(meta_path, op3_path, name, coordinate_model)
+ formula = formula_type(meta_path, op3_path, name, coordinate_model).to_code()
params = get_params(*param_spec, coords_name)
return formula, params