<blockquote>
<p>A P2WPKH PubKey is shorter than a P2WSH PubKey.</p>
</blockquote>
<p>No, not quite. A P2WPKH <em>address</em> is shorter than a P2WSH <em>address</em>. The addresses are both based on a hash of the underlying witness program (i.e. the locking conditions of the output). In the case of Pay to Witness Public Key Hash (P2WPKH) the witness program contains only the public key. On the other hand, Pay to Witness Script Hash (P2WSH) doesn't have a public key, its witness program consists of a <em>witness script</em>. P2WPKH and P2WSH addresses differ in length, because the hash for P2WPKH is a RIPEMD-160 hash which produces a digest of 20 byte (160 bit), while the hash for P2WSH is a SHA-256d hash which produces a 32 byte (256 bit) digest. Thus, the address for P2WSH simply has to encode 12 bytes more data and is that much longer.</p>
<p>Regarding Taproot and Schnorr, the outputs are actually indistinguishable, either commits the funds to a public key. In fact, if the spender doesn't make use of a script path (one of the scripts in a leaf of the tree), but spends the output using the key path, they remain indistinguishable even at spending time.</p>
<p>So, all segwit v1 outputs are always the same length, while the inputs may differ in size depending on how they got spent. They aren't categorized as two different output types, they are all categorized as Pay to Taproot (P2TR). Since the encoding used for public keys in P2TR is also 32 bytes, P2TR outputs end up being the same length as P2WSH outputs: 43 bytes.</p>

CC BY-SA 4.0
2019-11-07T17:26:05.237Z
2020-10-23T15:27:58.907Z
2020-10-23T15:27:58.907Z
Murch
<p>A P2WPKH PubKey is shorter than a P2WSH PubKey. Would this also be the case that a Taproot PubKey is larger than a Schnorr PubKey?
If so, wouldn't people be incentivised to use the Schnorr PubKey and as a result Taproot would be less fungible?</p>

<segregated-witness><schnorr-signatures><taproot>
Would a Schnorr PubKey be a different length than a Taproot PubKey like P2WPKH and P2WSH?
Bertram Lund
# Would a Schnorr PubKey be a different length than a Taproot PubKey like P2WPKH and P2WSH?

(Asked by: username_0 on 2019-11-07)

A P2WPKH PubKey is shorter than a P2WSH PubKey. Would this also be the case that a Taproot PubKey is larger than a Schnorr PubKey?
If so, wouldn't people be incentivised to use the Schnorr PubKey and as a result Taproot would be less fungible?

**Tags:** segregated-witness, schnorr-signatures, taproot


---

## 1 answers

### Answer by username_1 on 2019-11-07. Score: 7 | Accepted answer

> A P2WPKH PubKey is shorter than a P2WSH PubKey.

No, not quite. A P2WPKH *address* is shorter than a P2WSH *address*. The addresses are both based on a hash of the underlying witness program (i.e. the locking conditions of the output). In the case of Pay to Witness Public Key Hash (P2WPKH) the witness program contains only the public key. On the other hand, Pay to Witness Script Hash (P2WSH) doesn't have a public key, its witness program consists of a *witness script*. P2WPKH and P2WSH addresses differ in length, because the hash for P2WPKH is a RIPEMD-160 hash which produces a digest of 20 byte (160 bit), while the hash for P2WSH is a SHA-256d hash which produces a 32 byte (256 bit) digest. Thus, the address for P2WSH simply has to encode 12 bytes more data and is that much longer.

Regarding Taproot and Schnorr, the outputs are actually indistinguishable, either commits the funds to a public key. In fact, if the spender doesn't make use of a script path (one of the scripts in a leaf of the tree), but spends the output using the key path, they remain indistinguishable even at spending time.

So, all segwit v1 outputs are always the same length, while the inputs may differ in size depending on how they got spent. They aren't categorized as two different output types, they are all categorized as Pay to Taproot (P2TR). Since the encoding used for public keys in P2TR is also 32 bytes, P2TR outputs end up being the same length as P2WSH outputs: 43 bytes.


---

