Skip to content

Add design doc for retail threshold custody wallet - #1

Open
numbxs wants to merge 4 commits into
mainfrom
claude/detail-balance-mpc-keys-gaibpd
Open

Add design doc for retail threshold custody wallet#1
numbxs wants to merge 4 commits into
mainfrom
claude/detail-balance-mpc-keys-gaibpd

Conversation

@numbxs

@numbxs numbxs commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds a comprehensive design document for a consumer-facing 2-of-3 threshold custody wallet that would eventually replace the current signerWIFs model. The design focuses on making threshold custody practical and secure for retail users through architectural decisions that eliminate bearer secrets and maintain genuine thresholds at signing time.

Changes

  • Added docs/design/threshold-custody.md — A 452-line design document covering:

    • Problem statement: current limitations of the signerWIFs approach (plaintext key pasting, transparent addresses, public explorer dependency)
    • Three load-bearing design decisions:
      • D1: Provider share is recovery-only; everyday quorum is user + user's chosen share (A + C)
      • D2: Share C is user-chosen, not provider-contracted
      • D3: Shielded Orchard at launch via ZIP 312 FROST
    • Detailed requirements (R1–R10) and trust model
    • Security analysis of how D1 prevents provider from seeing everyday transactions while maintaining recovery capability
    • Privacy win: provider holds only a spend-authorization share, no viewing keys or transaction history
    • Architecture: three shares with diversity requirements, PCZT as interop backbone, self-hosted chain access
    • Recovery mechanism: share re-issuance (not backup) with mandatory delays and veto windows
    • Staging plan with launch blockers, Phase 1 (software co-signer), and Phase 2 (hardware default)
    • Residual risks and open questions
  • Updated README.md — Added a "Design docs" section linking to the new threshold custody design document with a brief description of its scope

Notable Details

  • The design explicitly addresses the Bybit-class attack (compromised renderer) by requiring share C to independently verify transactions, recompute sighashes, and render all outputs
  • Recovery is positioned as the primary attack surface once seed phrases are eliminated, with specific mitigations (identity verification at C, mandatory delays, veto windows)
  • The document is marked as a design draft for discussion and is not yet implemented
  • Includes explicit caveats about ZIP 312 being Draft status and the re-randomized FROST path requiring independent security review before launch

https://claude.ai/code/session_01LHCbFGfn1LkGunb4hLGmVq

claude added 4 commits August 10, 2026 16:28
Draft architecture replacing the signerWIFs model with a consumer-facing
threshold wallet:

- 2-of-3 shares: user device (passkey-gated, non-exportable, no seed
  phrase), provider co-signer, user-chosen third share.
- Recovery by FROST share refresh rather than backup, so device loss is
  recoverable and no bearer secret ever exists.
- Share diversity requirements, and enrolment that rejects configurations
  where two shares share a failure domain.
- Risk-tiered quorums: the convenient A+B path is the weak one, since the
  provider also ships the app that drives the user's share.
- Zcash specifics: ZIP 312 splits only ask, so co-signers hold full viewing
  capability; coordinator kept on the user's device for unlinkability.
  PCZT as transport so a software share can become hardware later.
- Staging (transparent plumbing -> shielded FROST -> hardware share),
  residual risk, and open questions that change the architecture.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHCbFGfn1LkGunb4hLGmVq
Provider share is recovery-only, share C is user-chosen, shielded Orchard
at launch. Consequences worked through:

- Everyday quorum is A+C; B appears only in resharing rows. Funds move
  with zero provider involvement, so provider death costs the user their
  recovery option rather than their access.
- B never joins a signing session, so it never sees a transaction, sighash
  or randomizer: it holds a share of ask and no viewing key at all. With a
  hardware share C, nobody but the user has viewing capability.
- But the provider still ships the app that renders transactions, so share
  C's independence is now the whole everyday security model. Adds the hard
  enrolment rule that C must not run the provider's build, and the specific
  verification C must perform (recompute sighash, render every output,
  check change-address ownership, verify fee) — confirmed achievable from
  a PCZT, per Ledger's Orchard signer.
- States honestly that B+C is still a valid spending quorum, and hardens
  the recovery-only restriction architecturally (HSM permits resharing
  only; no code path emits a spend signature share).
- Shielded at launch pulls draft-spec risk to day one: independent review
  of the re-randomized FROST path becomes a launch blocker, alongside
  share-epoch and change-address conformance tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHCbFGfn1LkGunb4hLGmVq
Three open items resolved, plus a correction and a new decision point.

Share C menu (§5.3): curated tiers as default, arbitrary C behind an
advanced path, three classes refused outright. The refusals matter most —
a FIDO/PIV token cannot hold a Pallas scalar or run the FROST protocol, so
a YubiKey is an auth factor for share A and not a share C at all; and an
offline written share verifies nothing and must be typed into the
provider's app to be used, putting both shares in the one place the design
exists to avoid. Tier 2 co-signer services get selection criteria and an
explicit statement of what they cannot catch.

Memo exposure (§4.3): the memo lives in the note plaintext inside
enc_ciphertext, so any party with the viewing key reads it, and C cannot
avoid outgoing memos because recomputing enc_ciphertext requires them.
Incoming memos are avoidable and now excluded by making C a pure signer
that never syncs the chain. Adds key-material minimization, retention
limits, and a memo-entry warning when C is a third party.

Review scope (§9): nonce handling under session abort/crash first, then
randomizer binding, conformance to the analyzed scheme, binding factors,
epochs, keygen, and cross-implementation differential testing. Notes that
reviewer availability is the long pole and that ZF should be engaged early.

Correction: hardware wallets have shipped PCZT verification but return
ordinary single-key spendAuthSigs, not FROST signature shares. Tier 1 needs
FROST-RedPallas participant firmware that does not exist off the shelf, so
Phase 1 launches with a Tier 2 software C.

New: §5.8 requires DKG over a trusted dealer. Trusted-dealer keygen at the
provider would mean it held the full ask at enrolment, making the rest of
the design theatre.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHCbFGfn1LkGunb4hLGmVq
No trusted dealer, no fallback: no party ever holds the full ask, at any
moment, including enrolment.

The consequence worth the section is that DKG relocates the trusted party
rather than removing it. Round 2 distributes secret shares between
participants; if those messages ride a provider-relayed channel without
end-to-end authentication to each participant's own long-term identity
key, the provider can MITM the ceremony and learn both A's and C's shares.
That is the full key, and it is the exact failure D4 exists to prevent
arriving through the back door. An unauthenticated DKG has not removed the
trusted dealer, it has renamed it "the relay". Requires pinned identity
keys, enforced PoK and commitment verification, group-key agreement across
all three parties, and reinforces that the provider must not be the sole
path between A and C.

Also adds:
- Atomic enrolment (§5.8.2). A partial ceremony is a fund-loss path, so no
  receiving address may be derived or displayed until all three parties
  confirm the group verifying key. Failed ceremonies restart from scratch.
- DKG-based refresh, since recovery must not reintroduce the full-key
  moment. Notes that the new device's identity key is unauthenticated when
  recovery begins, making it the cryptographic face of the social
  engineering problem that delay and veto gate.
- Phase 2 firmware now needs DKG participation alongside signing and PCZT
  verification; air-gapped QR round-trips are enrolment UX to raise with
  the hardware partner early.
- Review scope asks the reviewer to attack the ceremony as the provider.
- Two open questions: whether to adopt frostd or own the transport, and
  whether out-of-band identity-key verification can beat pinning without
  reintroducing something phishable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHCbFGfn1LkGunb4hLGmVq
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