diff --git a/sshprime.c b/sshprime.c index 4d1524aa..45081ed3 100644 --- a/sshprime.c +++ b/sshprime.c @@ -382,7 +382,7 @@ static inline unsigned firstbits_b_min( unsigned a, unsigned lo, unsigned hi, unsigned min_separation) { /* To get a large enough product, b must be at least this much */ - unsigned b_min = (lo*lo + a - 1) / a; + unsigned b_min = (2*lo*lo + a - 1) / a; /* Now enforce a