The Branch You Never Reveal: How Taproot Hides a Script Tree Behind One Key

A cooperative multisig spend under Taproot is one 64-byte signature that looks like an ordinary payment. Nothing is encrypted — the unused branches simply never go on chain. Here is the tweak, the tree, and the boundary of what it hides.

One key on chain, a tree of alternatives off it

Nothing here is encrypted. It is simply not on chain.

BIP-341 taproot

Compare two transactions from the same multisig wallet, six years apart.

The 2019 one is a wall of public keys. Three signatures, five public keys, an OP_3 ... OP_5 OP_CHECKMULTISIG redeem script, a P2SH wrapper — all of it on chain, all of it readable by anyone with a block explorer, all of it screaming this is an institutional multisig with a five-person quorum. Roughly 370 bytes of input, and an announcement.

The 2022 one is one 64-byte signature. That is the entire witness. It looks exactly like a person paying for coffee with a single-key wallet. No keys, no script, no quorum, no indication that a script tree exists at all.

Same wallet. Same policy. Same five signers. The difference is Taproot, and the thing worth understanding is that Taproot does not encrypt the policy — it omits it. Nothing is hidden behind cryptography here. The data is simply not on chain, because in the cooperative case it never has to be.

The Branch You Never Reveal: How Taproot Hides a Script Tree Behind One Key
Arnab02, CC BY 4.0, via Wikimedia Commons

The Entity Stack

It helps to stack Taproot into five layers, because each layer answers exactly one question.

Layer 1 — The internal key (P)

A 32-byte x-only public key. In the multisig case this is an aggregated key: five parties run MuSig2 and produce one key that none of them can sign for alone. To an observer it is indistinguishable from a single person’s key.

Layer 2 — The script tree root (R)

An optional Merkle root over alternative spending conditions. Each leaf is a script plus a one-byte leaf version. If there are no alternative conditions, R is empty — and the construction below still runs, which is what prevents key reuse from leaking the internal key.

Layer 3 — The tweak (t)

t = TaggedHash("TapTweak", P || R). This is the step that commits the output to both the key and the tree, without revealing either.

Layer 4 — The output key (Q)

Q = lift_x(P) + tG, and the chain stores only x(Q). That is the 32-byte witness program. Every Taproot output is 34 bytes of scriptPubKey — OP_1 followed by that x coordinate — and they are all structurally identical regardless of what they commit to.

Layer 5 — The two ways to spend

Key path: one signature for Q. Script path: reveal one leaf, its inputs, and a control block. Layer 5 is where the privacy is actually spent or not spent.

Q = lift_x(P) + TaggedHash("TapTweak", P‖R)·G · scriptPubKey = OP_1 <32-byte x(Q)> · address = bc1p…

What the Two Spend Paths Cost

Nov 14, 2021Taproot activates at block 709,632 — a soft fork, no flag day for users
Key pathWitness is a single element: 64 bytes (SIGHASH_DEFAULT) or 65 with an explicit sighash byte
Script pathWitness is [script arguments…, leaf script, control block]
Control block33 + 32m bytes, where m is the Merkle path length, m ∈ [0, 128]
VerificationRebuild the root from leaf + path, recompute Q = P + tG, compare against the output

The control block is the piece that makes this auditable. Its first byte packs (leaf_version & 0xfe) | parity(Q); the next 32 bytes are the internal key P; everything after is the sibling hashes. A validator recomputes the tweak from what it was handed and checks that the result equals the output key it already has. If the path is wrong, the arithmetic does not close — there is no separate signature proving the script belonged to the output.

Key pathScript path
Witness contentsone 64-byte signaturestack args, then the leaf script, then the control block
What it revealsnothing at all about the treethat one leaf, plus the Merkle path to the root
Requires the parties to cooperateyesno
Why you would use itnormal spending, cheapest casefallback: counterparty silent, timelock reached, arbitration
On-chain fingerprintidentical to any single-key paymentvisibly a script spend, forever

Two details I find genuinely elegant:

Branch hashes are sorted lexicographically before hashing, so the Merkle path needs no left/right direction bits. Both children are hashed in a canonical order, so the verifier never has to be told which side it is climbing from. That is 1 bit saved per level and one whole class of implementation bug removed.

The most likely script belongs near the root. A typical policy is “cooperative path, or after 90 days a timelock recovery, or in an emergency the arbitration key.” Put the timelock recovery at depth 1 and the emergency key at depth 4, and the common failure case proves in 32 bytes instead of 128.

The Branch You Never Reveal: How Taproot Hides a Script Tree Behind One Key
Dale Cruse, CC BY 4.0, via Wikimedia Commons

What Taproot Does Not Hide

This is where the marketing gets ahead of the specification, so let me be blunt about the boundary.

Amounts are still public. Taproot hides conditions, not values. Every output’s satoshi figure is in the transaction in plaintext and always will be, unless something like Confidential Transactions ships, which it has not.

Input and output linkage is still public. A key-path spend reveals nothing about the script tree, and simultaneously reveals that these specific coins moved to those specific outputs. Chain analysis does not need your script; it needs your graph.

The absence of a script path is not evidence of a simple wallet. That is the point of the uniform 34-byte output: you cannot tell whether a bc1p address is a single key or a five-way quorum with an arbitration fallback. Anonymity here is indistinguishability, not concealment — and indistinguishability is only as strong as the number of ordinary single-key users who also use bc1p.

Taproot did not make transactions private. It made one specific fact — how many conditions you attached — stop being visible. People keep reading that as “Bitcoin got privacy,” and then get surprised when their change output still links their coins.
A wallet engineer
conflating two different guarantees
The Branch You Never Reveal: How Taproot Hides a Script Tree Behind One Key
KVDP, Public domain, via Wikimedia Commons

Tapscript: What Changed Inside the Leaf

The script rules for leaf version 0xc0 are not the same rules as pre-Taproot Script, and the differences are not cosmetic:

  • OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY are disabled. In their place, OP_CHECKSIGADD counts successful individual checks. Threshold policy becomes a counting exercise rather than a special-cased opcode. Note what this does not do: it does not aggregate signatures. A 3-of-5 script-path spend still carries three separate signatures; aggregation is MuSig2’s job, off chain, on the key path.
  • The 10,000-byte script size limit and the 201 non-push-opcode limit are gone. They are replaced by a per-input signature-operation budget that starts at 50 plus the serialized witness size and loses 50 for each executed signature opcode with a non-empty signature. Run out and validation fails.
  • The stack limits stay. 1,000 elements combined across stack and altstack, 520 bytes per element. Removing the opcode cap did not remove the memory bound.
  • OP_SUCCESSx reserves opcode values for future soft forks. Encountering one in a valid Taproot script makes validation succeed before ordinary execution — including inside a branch that would not have run. That is an upgrade hook, and it is also why you should never accept a Taproot script you have not read.
  • The annex exists. If the witness has at least two elements and the last one starts with 0x50, it is stripped, counted toward weight, and committed to by the signature — otherwise ignored. Reserved space, currently unused.

So, When Do You Actually Get the Privacy?

The honest answer is: only in the cooperative case, and only if everyone else also looks the same. Concretely:

  • Get the co-signers online. Every script-path spend publishes a leaf and a Merkle path forever. If your quorum rarely agrees, you paid for Taproot and will still show the world your tree.
  • Put the common case at key path, the exceptions in the tree. A timelock recovery, an arbitration key, a hash-locked atomic swap — those belong in leaves precisely because they should almost never execute.
  • Do not treat bc1p as a privacy flag. Its guarantee is that the output looks uniform. The graph around it is unchanged, and the moment you spend via script path, that leaf is public for the rest of the chain’s history.
  • Count the cost honestly. Key path is the cheapest input Bitcoin has at roughly 57.5 vB. Script path with a depth-4 proof adds 128 bytes of control block plus the leaf. Both are cheaper than the 148 vB legacy equivalent — the privacy is a side effect of a fee optimization that happened to also be a good idea.

(The End)

Bitcoin

311 Bytes: Reading a Bitcoin Transaction Field by Field

2026-10-20 23:52:44

Bitcoin

The Signature Bitcoin Waited 12 Years For: What Schnorr Adds That ECDSA Couldn't

2026-10-27 0:11:24

❯
Profile
Cart
Coupons
Search