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?

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.