Blockchain/Level IV · Protocol depth/4.2 Upgrades/Lesson 1
Taproot and Schnorr signatures
The key that hides the contract, and the signature that fits in a pocket
MaterialsA block explorer capable of viewing raw transaction hexA wallet that supports Taproot addresses (bc1p)The BIP341 and BIP340 specification documents
Wonder
- Why does a complex multi-party agreement look exactly like a simple individual payment on the blockchain?
- How can multiple private keys combine into a single public key without ever revealing their existence to observers?
- What mathematical property allows a signature from ten people to be indistinguishable from one by a single person?
Explore
- Before Taproot, a complex spending condition was revealed in full whenever coins were spent (and, for bare scripts, sat in the output itself): a multisig spend showed every participant’s key, a timelock its duration, a hashlock its structure. This public transparency created privacy risks for sophisticated users and bloated block space with redundant data. The network treated all scripts as open books, forcing complex arrangements to broadcast their full logic to every node and observer.
- Taproot (BIP341) changes the commitment model. An output now points to a single 32-byte public key Q, calculated as P + t·G. Here, P is an internal key controlled by the primary spender, while t commits to the Merkle root of an optional tree of alternative scripts. On-chain the output looks like any single-key payment, hiding whatever complexity lies behind it.
- Schnorr signatures (BIP340) underpin this efficiency. Unlike ECDSA, which uses variable-length DER encoding averaging 71–72 bytes, Schnorr produces a fixed-size 64-byte signature (65 with a non-default signature hash type). The fixed size simplifies parsing and reduces transaction weight. The linearity of the Schnorr scheme also enables key aggregation: with a protocol such as MuSig2, several public keys can be combined into one aggregate key, allowing groups to sign as if they were a single entity without revealing individual participants.
- Spending proceeds via two distinct paths. In the key path, all parties cooperate and sign using their aggregate key; the resulting transaction is indistinguishable from any ordinary single-key payment. No scripts are revealed, and no extra data is attached. This preserves privacy for cooperative closes of Lightning channels or multisig wallets, ensuring that complex financial arrangements do not leak metadata to the blockchain’s public ledger.
- If cooperation fails, the script path activates. The spender reveals one specific leaf from the Merkle tree along with a proof of its membership. Unused branches remain hidden, preserving the privacy of alternative conditions. This mechanism, known as Merkelized Abstract Syntax Trees (MAST), allows for diverse spending rules—such as delayed withdrawals or emergency keys—to coexist within a single output without exposing them until strictly necessary.
- The practical impact is significant. Taproot addresses begin with ‘bc1p’. MuSig2 (BIP327) standardizes key aggregation, enabling interoperable multisig across different wallet vendors. Threshold schemes like FROST are under development for similar purposes. In November 2021, at block 709,632, the network adopted this structure, making complex scripts smaller, cheaper, and private by default when used cooperatively.
Key facts
- Taproot (BIP341) activated in November 2021 at block 709,632.
- A Taproot output commits to a single key Q = P + t·G, where t is a tagged hash of P and, if present, the root of a script tree.
- Schnorr signatures (BIP340) are fixed-size at 64 bytes, eliminating DER encoding overhead.
- Key path spending reveals no scripts and is indistinguishable from single-key payments.
- Script path spending reveals only the specific script leaf used, keeping other branches hidden.
- MuSig2 (BIP327) enables n-of-n key aggregation for interoperable multisig wallets.
Exercise nine, six, three, one
9CollectList 9 distinct types of Bitcoin spending conditions or scripts that existed before Taproot. Note the specific privacy leaks or size penalties associated with each on-chain.
6ClusterGroup the 9 conditions into 6 categories based on how they are handled in a Taproot output: fully hidden via key path, revealed only upon dispute, aggregated via MuSig2, or other structural changes.
3DistillReduce the 6 clusters to 3 core reasons why hiding scripts behind a single key improves network efficiency and user privacy.
1CrystallizeWrite one sentence explaining how the Merkle tree structure in Taproot allows for complex financial agreements without public disclosure of their terms.
Fact check
Dates, figures and claims checked against the published sources listed below.