TeachMeBitcoin

P2SH-P2WSH Overview

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

P2SH-P2WSH: Nested SegWit Multisig

P2SH-P2WSH (Nested SegWit Multisig) is the more advanced sibling of the single-key Nested SegWit format. It allows organizations and power users to run complex multisig wallets with lower fees while maintaining compatibility with legacy Bitcoin "3" addresses.

1. Multi-Layer Security

Nested SegWit Multisig uses a three-layer "Matryoshka doll" structure:

  1. Layer 1 (The P2SH Wrapper): A standard address starting with 3.

  2. Layer 2 (The P2WSH Signal): A 34-byte script that tells the network to use the Witness logic.

  3. Layer 3 (The Witness Script): The actual M-of-N multisig logic.

2. Why Use Nested Multisig?

In 2017 and 2018, many multisig hardware wallets and institutional custody providers were slow to adopt the new Bech32 (bc1...) addresses. Nested SegWit Multisig allowed them to:

3. The 34-Byte Identifier

While single-key Nested SegWit uses a 22-byte script, Multisig Nested SegWit uses a 34-byte script. This difference is critical for nodes to know whether they are looking for a public key or a complex script hash.

4. The Legacy Standard

For several years, P2SH-P2WSH was the "Gold Standard" for institutional Bitcoin storage. It combined the battle-tested security of P2SH with the modern efficiency of SegWit.

Feature Legacy Multisig (P2SH) Nested SegWit Multisig Native SegWit Multisig
Address Starts with 3 Starts with 3 Starts with bc1q
Hash Size 20 Bytes (HASH160) 32 Bytes (SHA256) 32 Bytes (SHA256)
Fee Savings 0% ~40-50% ~50-60%
Structure Script in Input Script in Witness Script in Witness

In the next section, we will analyze the 34-byte Redeem Script.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!