Skip to content

Only store verified encrypted private shares within Signer#86

Closed
jferrant wants to merge 2 commits intomainfrom
bugfix/fix-invalid-private-share-storage
Closed

Only store verified encrypted private shares within Signer#86
jferrant wants to merge 2 commits intomainfrom
bugfix/fix-invalid-private-share-storage

Conversation

@jferrant
Copy link
Copy Markdown
Collaborator

@jferrant jferrant commented Jun 7, 2024

Need to add a test I think.

@jferrant jferrant requested a review from xoloki June 7, 2024 13:26
self.decrypted_shares.insert(*src_id, decrypted_shares);
self.decryption_keys
.insert(*src_id, (dkg_private_shares.signer_id, shared_key));
verified_shares.push((*src_id, encrypted_shares));
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could result in empty encrypted shares hashmap per src_id. I assumed this was okay. but just confirming?

Copy link
Copy Markdown
Owner

@xoloki xoloki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test to show that nothing crashes if there are no verified shares?

Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
@jferrant jferrant force-pushed the bugfix/fix-invalid-private-share-storage branch from a184a95 to d99a7b8 Compare March 27, 2026 23:21
Signed-off-by: Jacinta Ferrant <jacinta.ferrant@gmail.com>
@jferrant
Copy link
Copy Markdown
Collaborator Author

Not really beneficial anymore. We store all the private shares and report the bad ones during DKG/SIgn. These bad shares are never used except for error reporting.

@jferrant jferrant closed this Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants