-
Notifications
You must be signed in to change notification settings - Fork 98
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
🐞 Occasional test failures related to 0
nonces
#708
Comments
Negating zeroThe issue with
Zero noncesThe issue with There should be a check to ensure that if a zero nonce is obtained for these calls, nonces should continue to be sampled until a nonzero one is found.
|
update on zero noncesI spoke with @benaloh about this yesterday. He favors a solution other than those I mentioned above: remove the "ElGamal encryption requires a non-zero nonce" flag from |
For what it's worth, I agree that Josh is correct that zero will never occur by accident as a nonce. However, in property-based testing it will be almost guaranteed to happen, because the generators always try "corner case" inputs to make sure they work. So, you probably still want to use the |
Yes, Hypothesis testing uses |
Is there an existing issue for this?
Current Behavior
Tests in
tests/unit/test_decrypt_with_shares.py
andtests/property/test_decryption_mediator.py
occasionally fail, either inelgamal_encrypt
fromelgamal.py
("ElGamal encryption requires a non-zero nonce") or ingroup.py
, where negating a zero nonce during proof construction results in a value that's too large for the group.Log 1
Log 2
Expected Behavior
The tests consistently pass.
Steps To Reproduce
Running the tests in question a few hundred times is usually enough to trigger the error.
Environment
No response
Anything else?
I thought this might have something to do with #656 and the fact that the generators in
election_factory.py
set some sequence orders to zero, but that doesn't seem to fix it. Maybe it's related to #655?The text was updated successfully, but these errors were encountered: