summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoradamantike <mike@fmanganiello.com.ar>2016-03-28 15:29:59 -0300
committerSybren A. Stüvel <sybren@stuvel.eu>2016-04-16 00:03:19 +0200
commitf520014826fbbfffea1ace30fd46af9c6097c547 (patch)
tree1a66c5fc42d65b535a3c89e4fc1f39bc098cfd9a /tests
parent38a7255a5e935c3b2663613392db9d5290fc2340 (diff)
downloadrsa-git-f520014826fbbfffea1ace30fd46af9c6097c547.tar.gz
Trivial fix on primality testing
Diffstat (limited to 'tests')
-rw-r--r--tests/test_prime.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_prime.py b/tests/test_prime.py
index 44d8d71..57620a1 100644
--- a/tests/test_prime.py
+++ b/tests/test_prime.py
@@ -59,15 +59,15 @@ class PrimeTest(unittest.TestCase):
rsa.randnum.randint = fake_randint
try:
# 'n is composite'
- randints.append(2630484831) # causes the 'n is composite' case with n=3784949785
+ randints.append(2630484832) # causes the 'n is composite' case with n=3784949785
self.assertEqual(False, rsa.prime.miller_rabin_primality_testing(2787998641, 7))
self.assertEqual([], randints)
# 'Exit inner loop and continue with next witness'
randints.extend([
- 2119139097, # causes 'Exit inner loop and continue with next witness'
+ 2119139098, # causes 'Exit inner loop and continue with next witness'
# the next witnesses for the above case:
- 3051067715, 3603501762, 3230895846, 3687808132, 3760099986, 4026931494, 3022471881,
+ 3051067716, 3603501763, 3230895847, 3687808133, 3760099987, 4026931495, 3022471882,
])
self.assertEqual(True, rsa.prime.miller_rabin_primality_testing(2211417913,
len(randints)))