Removed not needed code

This commit is contained in:
Piotr Dyraga committed 2018-07-27 16:56:48 +02:00
1 parent ee7e96eaf6
commit 7f7e390737
1 file changed
+1 -6
+1 -6
View File
@@ -210,9 +210,6 @@ func runGenPrimeRoutine(
q.SetBytes(bytes) q.SetBytes(bytes)
p.Mul(q, big.NewInt(2))
p.Add(p, big.NewInt(1))
// Calculate the value mod the product of smallPrimes. If it's // Calculate the value mod the product of smallPrimes. If it's
// a multiple of any of these primes we add two until it isn't. // a multiple of any of these primes we add two until it isn't.
// The probability of overflowing is minimal and can be ignored // The probability of overflowing is minimal and can be ignored
@@ -279,9 +276,7 @@ func isPocklingtonCriterionSatisfied(p *big.Int) bool {
} }
func isPrimeCandidate(number *big.Int) bool { func isPrimeCandidate(number *big.Int) bool {
bigMod := new(big.Int) m := new(big.Int).Mod(number, smallPrimesProduct).Uint64()
bigMod.Mod(number, smallPrimesProduct)
m := bigMod.Uint64()
for _, prime := range smallPrimes { for _, prime := range smallPrimes {
if m%uint64(prime) == 0 && m != uint64(prime) { if m%uint64(prime) == 0 && m != uint64(prime) {