remotesigner: generate MuSig2 nonces on signer

Aperta
#11,530 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Go
Stelle
8.2k
Fork
2.3k
Merge medio
1g 11h
PR unite (30g)
103

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lightningnetwork/lnd

Tutte le issue di lightningnetwork/lnd

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.