Keep signing under the current group key after a failed DKG round

Open
#249 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cryptography

Research direction

Start with the coordinator paths start_public_shares and dkg_end_gathered, then inspect Signer::reset, dkg_ended, nonce_request and sign_share_request to trace how key state and round IDs are used. The issue describes atomic replacement on successful DKG as the proposed behavior; completion means a failed re-keying leaves signing with the previous key usable, with coverage for both coordinators and the signer.

Written by the indexing model from the issue text.

Description

Problem

A failed re-keying currently turns into a signing outage, in both coordinators and in the signer. GHSA-whwx-jj37-4gg5 states this as a limitation of 15.0.1 ("Signing under an existing group key after a failed re-keying is not supported"); this issue is the fix.

Three places are involved:

  1. Coordinators. start_public_shares clears party_polynomials at round start, and the map is only rebuilt in dkg_end_gathered on success (FIRE) or, for FROST, from receipt-time inserts. After a failed round the map no longer matches aggregate_public_key, which is never cleared. FROST then aggregates against the wrong polynomials; FIRE reports BadPartySigs naming honest parties (measured).
  2. Signer gate. Signer::reset on DkgBegin sets dkg_completed = false, and only a successful dkg_ended sets it back; nonce_request and sign_share_request return nothing while it is false. The signer's key shares survive the reset, so it could sign, but the gate stops it.
  3. Signer round id. Signing requests are checked against the single dkg_id that reset just overwrote, so even without the gate a request for the previous key would be rejected.

Proposed semantics

Key material is replaced atomically and only on success. The coordinator builds the new round's map in a pending field and swaps map and aggregate key together in dkg_end_gathered; the signer keeps its completed shares, group key and completed flag until its own dkg_ended succeeds, and tracks the id of the round in progress separately from the id it signs under. A round that fails leaves the previous key fully usable.

If instead signing after a failed re-keying is declared unsupported, the minimum is to clear aggregate_public_key in start_public_shares so start_signing_round fails with MissingAggregatePublicKey rather than aggregating against a stale map.

Notes

  • Interacts with the repeated-DKG stall (separate issue): a coordinator that cannot run a second DKG cannot re-key at all.
  • Breaking: state-machine behaviour and SavedState shape. 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.