aboutsummaryrefslogtreecommitdiff
path: root/frozen_deps/Cryptodome/Math/Primality.py
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2022-11-17 18:08:59 -0800
committerDeterminant <[email protected]>2022-11-17 18:08:59 -0800
commit8154806fe2fccacdc3dafaa68181a07bcf8d6c4c (patch)
treef477e6a005599bb88c18db142c267b9297c6060b /frozen_deps/Cryptodome/Math/Primality.py
parentbe4dc086591c9bced04a507d127c83811c5700c4 (diff)
v0.1.7
Diffstat (limited to 'frozen_deps/Cryptodome/Math/Primality.py')
-rw-r--r--frozen_deps/Cryptodome/Math/Primality.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/frozen_deps/Cryptodome/Math/Primality.py b/frozen_deps/Cryptodome/Math/Primality.py
index 08ea3ff..33814fa 100644
--- a/frozen_deps/Cryptodome/Math/Primality.py
+++ b/frozen_deps/Cryptodome/Math/Primality.py
@@ -67,7 +67,7 @@ def miller_rabin_test(candidate, iterations, randfunc=None):
if candidate in (1, 2, 3, 5):
return PROBABLY_PRIME
-
+
if candidate.is_even():
return COMPOSITE
@@ -93,7 +93,8 @@ def miller_rabin_test(candidate, iterations, randfunc=None):
base = 1
while base in (one, minus_one):
base = Integer.random_range(min_inclusive=2,
- max_inclusive=candidate - 2)
+ max_inclusive=candidate - 2,
+ randfunc=randfunc)
assert(2 <= base <= candidate - 2)
# Step 4.3-4.4