<p>There had to be a way to distinguish between segwit addresses and &quot;legacy&quot; addresses so that software could correctly identify the type of transaction it needed to create.</p>
<p>The obvious approach would have been to use a new &quot;version number&quot; on the usual Base58 address format (like how P2PKH addresses  start with 1, P2SH start with 3, so maybe SegWit could have started with S).</p>
<p>However, the totally new Bech32 address format had a lot of useful improvements unrelated just to SegWit. It was just a good time to introduce it. Benefits include much better error detection (and correction), better security to avoid hash collisions in P2WSH scripts because the hash encoded is longer, less ambiguity when transcribing addresses since mixed case isn't allowed (which also allows more efficient encoding in QR codes), and more descriptive human-readable prefixes.</p>

CC BY-SA 4.0
2022-03-30T18:40:35.850Z
2022-03-30T18:40:35.850Z
meshcollider
<p>I would consider myself quite up-to-par with the concept and in-depth functionalities of SegWit (segregated witness).</p>
<p>I just don't understand one key aspect of it; P2SH and bech32 addresses.</p>
<ol>
<li>why on earth was it necessary to create new address formats, what does that do for segwit?</li>
<li>Were the new address formats made as a reason to help segwits implementation, or do they serve a different use-case. (i.e similar to segwits transition to &quot;weight&quot; which had nothing to do with fixing tx malleability but rather optimizing blocks).</li>
</ol>
<p>I don't see how a P2PKH address couldn't be used in a segwit transaction. The ECDSA signature is still the source of validity of a transaction in segwit</p>

<segregated-witness><p2sh><bech32-address><p2pkh>
Why does SegWit implement new address formats?
bitcash complex
# Why does SegWit implement new address formats?

(Asked by: username_0 on 2022-03-30)

I would consider myself quite up-to-par with the concept and in-depth functionalities of SegWit (segregated witness).

I just don't understand one key aspect of it; P2SH and bech32 addresses.

1. why on earth was it necessary to create new address formats, what does that do for segwit?
2. Were the new address formats made as a reason to help segwits implementation, or do they serve a different use-case. (i.e similar to segwits transition to "weight" which had nothing to do with fixing tx malleability but rather optimizing blocks).

I don't see how a P2PKH address couldn't be used in a segwit transaction. The ECDSA signature is still the source of validity of a transaction in segwit

**Tags:** segregated-witness, p2sh, bech32-address, p2pkh


---

## 1 answers

### Answer by username_1 on 2022-03-30. Score: 4

There had to be a way to distinguish between segwit addresses and "legacy" addresses so that software could correctly identify the type of transaction it needed to create.

The obvious approach would have been to use a new "version number" on the usual Base58 address format (like how P2PKH addresses start with 1, P2SH start with 3, so maybe SegWit could have started with S).

However, the totally new Bech32 address format had a lot of useful improvements unrelated just to SegWit. It was just a good time to introduce it. Benefits include much better error detection (and correction), better security to avoid hash collisions in P2WSH scripts because the hash encoded is longer, less ambiguity when transcribing addresses since mixed case isn't allowed (which also allows more efficient encoding in QR codes), and more descriptive human-readable prefixes.


---

