remotesigner: generate MuSig2 nonces on signer

Open
#11,530 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
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
go

Research direction

Read the linked sections in lnwallet/musig_session.go, lnwallet/rpcwallet/rpcwallet.go, and lnwallet/channel.go, plus issues #10705, #11529, and the remote-signing security model. Start by tracing nonce creation, RPC forwarding, and force-close reconstruction; then define signer-owned nonce persistence and replay behavior across the listed flows. Done means secret nonces stay on the signer, changed transcripts are rejected, and restart, force-close, and supported backup recovery cases are covered.

Written by the indexing model from the issue text.

Description

Description

Follow-up to #10705 and #11529.

The Taproot channel flow currently generates local MuSig2 nonces on the
watch-only node. RPCKeyRing.MuSig2CreateSession forwards the secret nonce
material through pregenerated_local_nonce:

Track moving nonce generation and secret nonce state to the signer. The
watch-only node should exchange public nonces and references to signer-owned
state.

Suggested scope

  • Add a signer API for obtaining public nonces before the full signing session
    is known, then using the corresponding nonce through an opaque handle or
    equivalent signer-owned reference.
  • Update funding, commitment signing, cooperative close and reconnect paths to
    use this API. Cover both classic RPC and the signer-initiated stream.
  • Reject caller-supplied secret nonces for keys covered by this isolation
    contract, including through alternate signer API paths.
  • Define signer-side persistence or safe reconstruction across crashes and
    restarts. Preserve exact commitment reconstruction after a lost response,
    while rejecting reuse with a changed signing transcript.
  • Preserve force-close and static channel backup recovery. Define the rollout
    for existing channels, wallet restore and lost or rolled-back signer state.
  • Update the remote-signing security model and document the resulting backup
    requirements. Transaction validation and spending policy remain separate
    work.

The nonce-to-transcript history in #11529 can remain useful for replay checks.
It stores fingerprints and transcript hashes, so secret nonce recovery still
needs its own design. Keep those replay checks while moving nonce ownership.

Test coverage

  • The watch-only side receives public nonce material and opaque references;
    secret nonce material stays on the signer.
  • Supplying secret nonce material through an old or alternate API cannot
    bypass the new contract.
  • Reconnects, lost responses and signer restarts preserve the recorded
    transcript and safe exact replay.
  • Changed transcripts fail before a partial signature is returned.
  • Force-close and supported backup recovery work without secret nonces on the
    watch-only node; unavailable signer state fails explicitly.
Dominant language
Go
Stars
8.2k
Forks
2.3k
Avg merge
1d 11h
Merged PRs (30d)
103

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

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 lightningnetwork/lnd

All issues in lightningnetwork/lnd

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.