mpcium icon indicating copy to clipboard operation
mpcium copied to clipboard

About Preparams Selection Logic During Reshare Phase

Open treeforest opened this issue 10 months ago • 2 comments

Hello,

I noticed that during the reshare phase, new nodes always use the preparams at index 1. However, after the first reshare, in the second reshare, they might end up using the same preparams again.

Currently, the code snippet is:

preParams := p.ecdsaPreParams[0]
if isNewPeer {
	preParams = p.ecdsaPreParams[1]
	participantPeerIDs = newPeerIDs
} else {
	participantPeerIDs = oldKeyInfo.ParticipantPeerIDs
}

Would it be better to select preparams based on version % 2 and (version + 1) % 2 instead, to alternate the preparams and avoid reuse?

Looking forward to your thoughts. Thanks!

treeforest avatar Jan 21 '26 02:01 treeforest

@vietddude can help

anhthii avatar Jan 26 '26 05:01 anhthii

Thank you for reporting @treeforest , fixed in https://github.com/fystack/mpcium/pull/139

anhthii avatar Jan 27 '26 15:01 anhthii