aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/ec/mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/ec/mod.py')
-rw-r--r--pyecsca/ec/mod.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyecsca/ec/mod.py b/pyecsca/ec/mod.py
index dd09847..a142b71 100644
--- a/pyecsca/ec/mod.py
+++ b/pyecsca/ec/mod.py
@@ -124,6 +124,8 @@ class Mod(object):
return self.x
def __eq__(self, other):
+ if type(other) is int:
+ return self.x == (other % self.n)
if type(other) is not Mod:
return False
return self.x == other.x and self.n == other.n