P2SH (Pay-to-Script-Hash)
A Bitcoin address format, recognizable by addresses starting with '3', that locks funds to a hash of a script rather than a single key, enabling conditions like multisig.
Pay-to-Script-Hash, or P2SH, is a Bitcoin address format, producing addresses that start with the digit "3," that locks funds to the hash of an arbitrary script rather than directly to a single public key. This lets Bitcoin support more complex spending conditions — most notably multisig (see Kaavon's "Multi-Signature Wallet" glossary definition) arrangements requiring multiple signatures to spend — without needing to reveal the full, more complex script publicly until the funds are actually spent.
P2SH was a significant step beyond the simpler P2PKH (see Kaavon's "P2PKH (Pay-to-Public-Key-Hash)" glossary definition) format specifically because it generalized what kinds of spending conditions a Bitcoin address could represent, while keeping the address itself a short, fixed-length hash regardless of how complex the underlying script actually is. P2SH is also commonly used to "wrap" SegWit outputs for compatibility with older wallet software that doesn't yet support native Bech32 addresses directly.
Examples
- A Bitcoin address starting with the digit '3' uses the P2SH format, commonly indicating a multisig arrangement or a wrapped SegWit address.
- P2SH lets a Bitcoin address represent an arbitrarily complex spending script while keeping the address itself a short, fixed-length hash.