Safe prime size is occasionally off by a few bits
robinhundt opened this issue · comments
When generating safe primes with a specific size via safe_prime::new, the resulting Integer sometimes has a size which is off by one or two bits.
I see. I'll investigate to see what is the cause.
If you set it to generate a prime of length 128 bits, it generates a number with 39 digits approximately 3/4 of the time and a number with 38 digits 1/4 of the time.
Fixed in bce0b60