hyperledger-labs / agora-glass_pumpkin

agora-glass_pumpkin

Home Page:https://wiki.hyperledger.org/display/labs/Agora

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Related: hyperledger-labs/agora-unknown_order#4

I see. I'll investigate to see what is the cause.

commented

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.