From b642de6fe88fa9130f96d30f15b8e5f2c95cf4db Mon Sep 17 00:00:00 2001 From: J08nY Date: Thu, 31 Aug 2023 15:40:57 +0200 Subject: More tests for point coordinate conversion. --- pyecsca/ec/params.py | 2 +- pyecsca/ec/point.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pyecsca/ec') diff --git a/pyecsca/ec/params.py b/pyecsca/ec/params.py index 8f3d092..19ed974 100644 --- a/pyecsca/ec/params.py +++ b/pyecsca/ec/params.py @@ -214,7 +214,7 @@ def _create_params(curve, coords, infty): else: raise_unsatisified_assumption( getconfig().ec.unsatisfied_coordinate_assumption_action, - f"Coordinate model {coord_model} has an unsatisifed assumption on the {param} parameter (0 = {expr})." + f"Coordinate model {coord_model} has an unsatisifed assumption on the {param} parameter (0 = {expr} mod {field})." ) # Construct the point at infinity diff --git a/pyecsca/ec/point.py b/pyecsca/ec/point.py index f682225..e1814de 100644 --- a/pyecsca/ec/point.py +++ b/pyecsca/ec/point.py @@ -82,7 +82,7 @@ class Point: pass result_variables = set(map(lambda x: x.result, ops)) if not result_variables.issuperset(affine_model.variables): - raise NotImplementedError + raise NotImplementedError(f"Coordinate model does have affine mapping function ({result_variables})") result = {} locls = {**self.coords} for op in ops: @@ -160,7 +160,7 @@ class Point: """ Test whether this point is equal to :paramref:`~.equals_scaled.other` using the "z" scaling formula. - The "z" scalig formula maps the projective class to a single representative. + The "z" scaling formula maps the projective class to a single representative. :param other: The point to compare :raises ValueError: If the "z" formula is not available for the coordinate system. -- cgit v1.2.3-70-g09d2