summaryrefslogtreecommitdiff
path: root/rsa/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'rsa/__init__.py')
-rw-r--r--rsa/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rsa/__init__.py b/rsa/__init__.py
index eef217f..306a569 100644
--- a/rsa/__init__.py
+++ b/rsa/__init__.py
@@ -208,7 +208,7 @@ def jacobi(a, b):
result = -result
a, b = b % a, a
else:
- if (((b ** 2) - 1) >> 3) & 1:
+ if (((b * b) - 1) >> 3) & 1:
result = -result
a >>= 1
if a == 0: return 0
@@ -229,7 +229,7 @@ def randomized_primality_testing(n, k):
"""Calculates whether n is composite (which is always correct) or
prime (which is incorrect with error probability 2**-k)
- Returns False if the number if composite, and True if it's
+ Returns False if the number is composite, and True if it's
probably prime.
"""