-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MultiplicativeGroupAlgebra.CreateCryptoGroup skips more known non-pri…
…me candidates. Sophie Germain primes can only have a value of 5 modulo 6, which is used to improve the prime finding algorithm in MultiplicativeGroupAlgebra.CreateCryptoGroup, which previously was checking every odd number. This reduces the number of primality tests that are performed by up to 2/3. Also joins the previously separate test cases into a single implementation and fixes a bug in which the rng mock was not returning the expected bytes.
- Loading branch information
Showing
2 changed files
with
27 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters