aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/ec/point.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/ec/point.py')
-rw-r--r--pyecsca/ec/point.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pyecsca/ec/point.py b/pyecsca/ec/point.py
index b28e130..c7f99db 100644
--- a/pyecsca/ec/point.py
+++ b/pyecsca/ec/point.py
@@ -196,7 +196,7 @@ class Point:
return self.coords == other.coords
def __hash__(self):
- return hash((tuple(self.coords.keys()), tuple(self.coords.values()))) + 1
+ return hash((self.coordinate_model.name, tuple(self.coords.keys()), tuple(self.coords.values()))) + 13
def __str__(self):
args = ", ".join([f"{key}={val}" for key, val in self.coords.items()])
@@ -240,6 +240,9 @@ class InfinityPoint(Point):
else:
return self.coordinate_model == other.coordinate_model
+ def __hash__(self):
+ return hash(self.coordinate_model.name) + 13
+
def __str__(self):
return "Infinity"