Chain Code Delegation
BIP: 89 Layer: Applications Title: Chain Code Delegation
No reviewsSpecification
BIP: 89 Layer: Applications Title: Chain Code Delegation Authors: Jesse PosnerJurvis Tan Comments-Summary: No comments yet. Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0089 Status: Draft Type: Specification Assigned: 2025-12-03 License: BSD-3-Clause Discussion: https://delvingbitcoin.org/t/chain-code-delegation-private-access-control-for-bitcoin-keys/1837 Requires: 32, 340, 341
Abstract
Chain Code Delegation (CCD) is a method for multi-signature wallets in which a privileged participant withholds BIP32 chain codes from one or more non-privileged participants, and supplies per-input scalar tweaks at signing time. This allows non-privileged participants to co-sign transactions without learning wallet-wide derivations, balances, or signing activity from other spending combinations. CCD defines the tweak exchange needed for verification and signing behavior when the signer does not possess a chain code.Motivation
In multisig deployments, sharing extended public keys (xpubs) or descriptors enables all participants to scan the chain and infer counterparties' activity. CCD limits that visibility by ensuring non-privileged participants only ever hold a non-extended keypair and only receive the minimum per-spend data needed to sign. The procedure keeps policy enforcement feasible for the non-privileged signer while preserving balance privacy, which is particularly useful in collaborative custody arrangements where the wallet owner wants balance privacy from their custodian.Terminology
In CCD, the chain code is the object of delegation—not signing authority. A participant who gives up their chain code delegates it to another.- A "Delegator" is a participant who delegates their chain code to another party. They hold only a non-extended keypair and receive scalar tweaks from the delegatee when asked to sign.
- A "Delegatee" is a participant who receives and retains a delegated chain code for another participant's public key, and computes derivation tweaks for that participant.
- A "Participant" is any key holder that can co-sign for UTXOs in the wallet (including delegators and delegatees).
- A "Non-hardened derivation" is a BIP32 child derivation where index < 2^31.
Overview
CCD operates by having Delegatees deprive Delegators of BIP32 chain codes during setup and later conveying the aggregated scalar tweak computed as the sum of non-hardened derivation tweaks along the remaining path to the child key used by a given input or change output. A Delegator uses the tweak to compute the child keys for verification and signing without being able to derive or recognize keys for other paths.Specification
Key material and setup
- Delegator key: Each delegator generates a standard (non-extended) secp256k1 keypair and provides the public key to the counterparties. A delegator MUST NOT retain or be provided a chain code for this key.
- Delegated chain code: A designated delegatee computes and retains a BIP32 chain code bound to the delegator's public key, forming an xpub that MUST NOT be disclosed to the delegator. The delegatee MAY share this xpub with other delegatees.
- Other participants: Non-delegator participants use conventional extended keys and share the public half as appropriate for the wallet descriptor.
- Derivation constraints: The delegatee holds an extended public key for the delegator. All derivation from this extended key MUST be non-hardened, as hardened derivation requires the private key, which the delegatee does not possess.
Notation
The following conventions are used, with constants as defined for secp256k1. We note that adapting this proposal to other elliptic curves is not straightforward and can result in an insecure scheme.- Lowercase variables represent integers or byte arrays.
- Uppercase variables refer to points on the curve with equation y2 = x3 + 7 over the integers modulo p.
- Functions and operations:
- Other:
Tweak Calculation
To produce CCD tweak data, a delegatee computes a per-participant scalar that aggregates the non-hardened derivation tweaks along the remaining path. Let the extended key retained by the delegatee be P at depth d, and let the target index vector be I = (id+1, …, in) with each ik < 231.- Inputs:
- Let t = 0 and E = P.
- For each index i in I (from left to right):
- If I is empty, let P′ = P; otherwise let P′ = Pchild from the final iteration.
- Return (t, P′).
Any attempt to apply a hardened derivation (index ≥ 231) MUST fail. Delegatees MAY discard P′ after extracting t if it is not otherwise required.
Delegation Bundle
CCD requires the delegatee to provide per-participant tweaks for inputs and (optionally) change outputs. Tweaks for change outputs are only required if a delegator wants to be able to compute the amount of bitcoin they are spending.A delegatee MUST provide each delegator with, for every signing context, a collection of tuples (Pi, ti) where Pi is the participant's base public key disclosed to the delegator and ti is the aggregated tweak returned by ComputeBIP32Tweak. The scalar ti MUST be encoded as a 32-byte big-endian integer.
The transport that carries this bundle is out of scope for this proposal; implementers MAY use PSBT proprietary keys, RPC payloads, or bespoke messages as long as the delegator can authenticate the origin of the data. Delegatees SHOULD attach the witness script (or sufficient script template information) built with the tweaked keys when the delegator is expected to verify the input or enforce spending policy on change outputs.
Delegators use the supplied CCD tweak bundle during verification (see Delegator input and change verification) and signature generation (see DelegatorSign). The message to be signed is provided separately as part of the standard signing protocol and is not part of the CCD-specific bundle.
Signing Modes
This BIP supports two modes:- Non‑blinded. The delegator receives the tweak for the child public key and the message. The delegator learns only about the specific child keys and transactions it signs for; it does not learn the wider address space.
- Blinded. The delegator receives only a blinded challenge and parity bits. The delegator learns nothing about the message or child key for which it produces a signature.
Non-Blinded Signing
For non-blinded signing, the delegator can produce signatures as usual using the tweaked key.=Delegator input and change verification (Optional)
= A delegator MAY validate the data it receives before producing signatures.For example, input verification reassures the delegator that every tweaked key they are asked to sign for corresponds to a wallet input they recognise. Change verification lets them establish the net outflow and enforce spending policy.
Both checks rely on the same delegated tweak bundle described above.
=Input verification
= For each input, the delegatee SHOULD disclose the descriptor template, the untweaked participant keys, the input witness script, and the per-participant tweaks. The delegator then applies the following procedure.- Inputs:
- For each participant key Pi referenced in D:
- Let D′ be the descriptor formed by substituting every occurrence of Pi in D with P′i.
- Derive the witness script W′ from D′.
- Return
trueif W′ = W, otherwisefalse.
Successful verification of an input confirms that the delegator is signing for a script that belongs to the wallet and that the aggregate tweak values align with the expected policy.
=Change-output verification
= When change outputs are disclosed, the delegator can perform an analogous check to ensure the destination script matches their policy template and to calculate outflows. Let D be the descriptor expressed in untweaked keys, W the provided witness script, and T the tweak mapping:- Inputs:
- For each participant key Pi referenced in T:
- Let D′ be the descriptor formed by substituting every occurrence of Pi in D with P′i.
- Derive the witness script W′ from D′.
- Return
trueif W′ = W, otherwisefalse.
Successful verification ensures the change output commits to the tweaked participant keys implied by the CCD tweaks, preserving the intended policy.
The delegator may perform addition
[Content truncated — view full spec at source]
Related Specs
Discussion (0 threads)
Loading discussions...