-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix undeterminism #2
Comments
Backtrace:
|
hmm, so I suspect the issue is that thread_rng doesn’t give us enogh randomness, making the key gen fail during prime generation. I don’t have any good insights into the guarantees that thread_rng gives us, so my best guess would be to do
|
As you can probably tell from the |
It's supposed to be crytographically secure and should always be well initialised. Can you explain what you mean by "not enough randomness"? It may still be smart to use the OS RNG directly for key generation (if you don't care too much about the performance overhead or |
Great question, I had the idea that it wasn't able to find enough primes for some reason. But it doesn't make sense, and it turns out the bug had nothing to do with the random number generator. It was simply an edge case where negative numbers, where not moved properly back into the positive range properly. I implemented a fix here #4 |
Ref: #1 (comment)
The text was updated successfully, but these errors were encountered: