Repository navigation
resharing: reject party in both committees, check pubkey per sender - #6
Merged
Merged
Conversation
A party whose key is in both the old and new committees skipped all round 1 messages, leaving the saved pubkey nil (upstream issue bnb-chain#326 panics on it). Fail fast in round 1 instead, and validate each old party's pubkey rather than re-reading message 0.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Upstream bnb-chain/tss-lib#326: resharing panics with a nil pointer when the same party keys are used for the old and new committees.
A party in both committees calls
allOldOK()in round 1Start, soUpdateskips every round 1 message andsave.ECDSAPub/EDDSAPubstays nil. Upstream then panics in the Paillier proof in round 2. Here round 2 uses modproof, so it fails later in round 4 with a misleading pubkey mismatch.Separately, the round 1 pubkey consistency check always read message 0, so it compared that message with itself.
Fix (ECDSA and EdDSA)
Startreturns an error when the party is in both committees.Updatereads the pubkey from each sender's message.Tests
TestRejectsPartyInBothCommitteesin both resharing packages (fails without the fix).ecdsa/resharingandeddsa/resharingsuites pass.mpcium is unaffected: its party keys include label+version, so old and new keys always differ.