From 7128a0c8eeab229a4c97057833c680314158baf3 Mon Sep 17 00:00:00 2001 From: J08nY Date: Mon, 21 Jul 2025 13:37:09 +0200 Subject: Fix mults_computed issue. --- pyecsca/ec/formula/fake.py | 6 ++++++ pyecsca/ec/point.py | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'pyecsca/ec') diff --git a/pyecsca/ec/formula/fake.py b/pyecsca/ec/formula/fake.py index 9ea7934..d9e8545 100644 --- a/pyecsca/ec/formula/fake.py +++ b/pyecsca/ec/formula/fake.py @@ -104,3 +104,9 @@ class FakePoint(Point): def __hash__(self): return id(self) + + def __copy__(self): + return self + + def __deepcopy__(self, memo): + return self diff --git a/pyecsca/ec/point.py b/pyecsca/ec/point.py index 5a486bc..5d5fbef 100644 --- a/pyecsca/ec/point.py +++ b/pyecsca/ec/point.py @@ -144,7 +144,7 @@ class Point: lmbd = Mod.random(curve.prime) for var, value in result.items(): weight = coordinate_model.homogweights[var] - lpow = lmbd ** weight + lpow = lmbd**weight result[var] = value * lpow return action.exit(Point(coordinate_model, **result)) @@ -231,7 +231,9 @@ class Point: f"Equality checking does not support {weight} weight." ) else: - lambdas = set(filter(lambda candidate: candidate ** weight == val, lambdas)) + lambdas = set( + filter(lambda candidate: candidate**weight == val, lambdas) + ) if not lambdas: return False return True -- cgit v1.2.3-70-g09d2