Coordinators do not check that a commitment's party_id belongs to the sending signer

Open
#252 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
49/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Start by reading SignerType::validate_party_id, the Aggregator trait, and the receipt paths in both coordinators. Trace how v1 key IDs and v2 party indices are represented in DkgPublicShares, then add an aggregator-side check and reject the whole message when it fails. Done means both coordinator paths enforce the right convention for each version; run the relevant coordinator and protocol tests.

Written by the indexing model from the issue text.

Description

Problem

Neither coordinator validates that the party_id keys inside a DkgPublicShares belong to the signer that sent the message. The signer side does this on receipt (SignerType::validate_party_id). In the coordinator a signer can overwrite another party's entry in party_polynomials with a commitment carrying a valid proof of knowledge under the other party's id, since the proof binds whatever id scalar the sender chose. Honest signers reject such a message, so completing the round still needs the coordinator to receive a different message than the signers, but the coordinator should not accept it at all. Noted in the GHSA-whwx-jj37-4gg5 report.

Why it is not two lines

The commitment map is keyed by comm.id.id, which is a key id for v1 parties and a party index for v2 (a v2 party is a signer). A check of the form signer_key_ids[signer_id].contains(party_id) is correct for v1 and rejects every v2 commitment (measured: 14 test failures). The coordinator is generic over the aggregator, not the signer, so it cannot pick the predicate.

Fix

Add an aggregator-side predicate with the semantics of Signer::validate_party_id (an Aggregator trait method, or a config flag naming the id convention), call it at receipt in both coordinators, and reject the whole message on failure. Trait change; 16.0.0.

Dominant language
Rust
Stars
34
Forks
19
Avg merge
9h 19m
Merged PRs (30d)
12

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from xoloki/wsts

All issues in xoloki/wsts

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.