aboutsummaryrefslogtreecommitdiff
path: root/pyecsca
diff options
context:
space:
mode:
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)