aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/ec
diff options
context:
space:
mode:
authorJ08nY2025-07-21 13:37:09 +0200
committerJ08nY2025-07-21 13:37:09 +0200
commit7128a0c8eeab229a4c97057833c680314158baf3 (patch)
tree5fcac7f12274dc458cfa73faa48919ef9c86d80c /pyecsca/ec
parent6b9da5c1b905ecbaaabc56c509772f2f9f910c60 (diff)
downloadpyecsca-7128a0c8eeab229a4c97057833c680314158baf3.tar.gz
pyecsca-7128a0c8eeab229a4c97057833c680314158baf3.tar.zst
pyecsca-7128a0c8eeab229a4c97057833c680314158baf3.zip
Diffstat (limited to 'pyecsca/ec')
-rw-r--r--pyecsca/ec/formula/fake.py6
-rw-r--r--pyecsca/ec/point.py6
2 files changed, 10 insertions, 2 deletions
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