Repository navigation
Fix divergent behavior in integer backends #49
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
Merged
+533
−148
Merged
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4e16843
fix: `Arbitrary::shrink` impl for Integer
survived bb69184
fix: forbid whitespaces in integer encoding
survived bd1d104
fix: remove panic in num-bigint's pow_mod when modulo=0
survived 804b353
fix: remove panic in num-bigint's invert when modulo=0
survived 29fecbc
fix!: Integer::random_below returns error if sampled from empty range
survived 85cd18e
fix!: Integer::jacobi returns error if input is not valid
survived 363c885
fix: num-bigint panic on negative shift in shl/shr
survived 283f695
fix!: generate_safe_primes returns an error for unsupported bit size
survived f828fb8
fix!: generate_prime returns an error on impossible bitsize
survived b2e0b2e
Add a few missing quickcheck tests
survived db5507c
fix!: `sample[_pm]_in_mult_group_of` returns an error if `n <= 1`
survived 90dc666
Update changelog
survived d7e2a22
Reduce `.clone()`s
survived dc314d9
Reduce `.clone()`s
survived File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we actually care about this change. It's not like we want our backends to be exactly identical everywhere, just give the same numerical operations and serialize to the same format. If the deserialization of one is more permissive than another - that doesn't concern our usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does concern our usage if we have signers with different backends running in the same cluster. In this case, malicious party may send a broadcast message which will cause one subset of parties to abort (cuz num-bigint doesn't accept whitespaces) and the other subset of signers will continue the protocol.