Skip to content

Commit 16164e5

Browse files
authored
Merge branch 'master' into release-1.3
2 parents 6a29e57 + 5a71f9f commit 16164e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

phe/util.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def powmod(a, b, c):
4242
4343
:return int: (a ** b) % c
4444
"""
45-
45+
if a == 1:
46+
return 1
4647
if not HAVE_GMP or max(a, b, c) < _USE_MOD_FROM_GMP_SIZE:
4748
return pow(a, b, c)
4849
else:

0 commit comments

Comments
 (0)