You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an option to specify the increment to use when searching for primes (#71)
A common operation in cryptography is to want to find a prime `p`
such that some `n` divides `p-1`. This is accomplished by starting
at some value `q` which `n` divides and then proceeding in increments
of `n` rather than increments of `1` until a prime is found. To enable
this procedure, add a keyword argument to `nextprime`/`prevprime` that
lets the user specify the desired increment.
Also, while we're at it, speed up the default `prevprime` case for larger
values by proceeding in increments of `2`.
0 commit comments