Darryl Green
e3f95ed25b
Fix bias in random number generation in Miller-Rabin test
...
When a random number is generated for the Miller-Rabin primality test,
if the bit length of the random number is larger than the number being
tested, the random number is shifted right to have the same bit length.
This introduces bias, as the random number is now guaranteed to be
larger than 2^(bit length-1).
Changing this to instead zero all bits higher than the tested numbers
bit length will remove this bias and keep the random number being
uniformly generated.
2018-10-09 16:36:53 +01:00
..
2015-06-25 10:59:56 +02:00
2018-06-17 17:34:55 +01:00
2018-04-05 15:37:38 +02:00
2018-04-17 10:00:21 -05:00
2018-08-13 13:49:52 +03:00
2018-04-17 10:00:21 -05:00
2018-05-25 14:54:14 +01:00
2017-02-15 23:31:07 +02:00
2018-10-09 16:36:53 +01:00
2018-04-17 10:00:21 -05:00
2018-04-17 10:00:21 -05:00
2018-07-30 11:29:26 +03:00
2017-07-27 21:44:33 +01:00
2018-06-07 11:54:17 +02:00
2018-06-18 10:30:30 +02:00
2018-06-19 11:32:48 +02:00
2018-07-01 10:20:43 +03:00
2018-06-27 10:51:47 +01:00
2018-09-06 19:10:26 +01:00
2018-04-17 10:00:21 -05:00
2017-09-06 17:51:14 +03:00
2018-04-17 10:00:21 -05:00
2018-04-17 10:00:21 -05:00
2017-10-10 19:04:27 +03:00
2018-03-30 18:43:16 +02:00
2018-05-15 09:21:57 +01:00
2018-04-04 09:18:27 +02:00
2018-08-20 10:39:27 +03:00
2018-07-24 17:20:17 +01:00
2018-04-17 10:00:21 -05:00
2018-08-17 16:52:08 +01:00
2018-04-17 10:00:21 -05:00
2018-04-17 10:00:21 -05:00
2018-07-23 10:34:47 -07:00
2018-04-17 10:00:21 -05:00
2018-08-31 15:59:10 +01:00
2018-04-17 10:00:21 -05:00
2018-04-17 10:00:21 -05:00
2018-07-05 10:47:00 +02:00
2018-01-22 11:54:42 +01:00
2018-04-17 10:00:21 -05:00
2018-06-12 16:56:04 +01:00
2018-07-24 17:20:17 +01:00
2018-07-24 16:43:20 +01:00
2018-02-08 17:18:15 +08:00
2015-09-04 14:21:07 +02:00
2018-04-17 10:00:21 -05:00
2018-04-17 10:00:21 -05:00
2018-04-17 10:00:21 -05:00
2018-05-25 14:54:14 +01:00
2015-09-04 14:21:07 +02:00
2018-04-17 10:00:21 -05:00
2018-07-11 15:16:53 +02:00
2017-08-23 16:17:27 +01:00
2018-09-06 12:09:56 +01:00
2018-06-13 09:17:59 +01:00
2018-06-07 11:54:17 +02:00
2018-04-17 10:00:21 -05:00
2018-10-09 16:36:53 +01:00
2018-10-09 16:33:27 +01:00
2018-07-05 10:47:00 +02:00
2018-07-05 10:47:00 +02:00
2018-07-05 10:47:00 +02:00
2017-10-29 17:53:52 +02:00
2018-08-10 10:59:53 +01:00
2018-08-30 00:57:28 +01:00
2018-04-17 10:00:21 -05:00
2018-08-28 10:13:29 +01:00
2018-04-17 10:00:21 -05:00
2018-08-30 01:11:35 +01:00
2018-09-06 12:09:56 +01:00
2018-04-11 20:27:32 -04:00
2018-07-24 16:43:20 +01:00
2016-11-04 23:05:56 +01:00
2015-10-21 12:50:45 +02:00
2018-04-17 10:00:21 -05:00
2018-08-28 15:26:11 +01:00
2018-06-28 12:09:15 +01:00
2018-09-05 15:06:19 +01:00
2018-04-17 10:00:21 -05:00
2018-04-17 10:00:21 -05:00
2018-04-17 10:00:21 -05:00