aboutsummaryrefslogtreecommitdiff
path: root/pyecsca
diff options
context:
space:
mode:
authorJ08nY2025-03-31 16:47:05 +0200
committerJ08nY2025-03-31 16:47:05 +0200
commit1578542520608ba1af342abb457a10b5a6096f57 (patch)
treeccd4cfcd56fb2f594642788b2d13f4d33b1d2953 /pyecsca
parent6a1b165c7ec1d27633c0d4ed1a840357b834e127 (diff)
downloadpyecsca-1578542520608ba1af342abb457a10b5a6096f57.tar.gz
pyecsca-1578542520608ba1af342abb457a10b5a6096f57.tar.zst
pyecsca-1578542520608ba1af342abb457a10b5a6096f57.zip
Diffstat (limited to 'pyecsca')
-rw-r--r--pyecsca/ec/curve.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pyecsca/ec/curve.py b/pyecsca/ec/curve.py
index 18d7e65..f696985 100644
--- a/pyecsca/ec/curve.py
+++ b/pyecsca/ec/curve.py
@@ -258,7 +258,9 @@ class EllipticCurve:
:return: Whether it is the neutral point.
"""
# Neutral is either InfinityPoint or Point in either affine or some other coord system.
- if isinstance(point.coordinate_model, AffineCoordinateModel):
+ if isinstance(point, InfinityPoint):
+ return point.coordinate_model == self.coordinate_model
+ elif isinstance(point.coordinate_model, AffineCoordinateModel):
return self.neutral_is_affine and self.affine_neutral == point
else:
return self.neutral.equals_homog(point)