Closed robinhundt closed 3 years ago
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 bce0b60ae0ac60caa1cd74aaeb7c4f84739e6f1d
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.
Related: https://github.com/mikelodder7/unknown_order/issues/4