P2WPKH Scripts, P2PKH Addresses, and Uncompressed Public Keys



Summary:

Alice has a P2PKH address derived from an uncompressed public key, but BIPs 141 and 143 state that P2WPKH scripts may only derive from compressed public keys. Given this restriction, if Alice gives Bob her P2PKH address, Bob cannot safely issue Native P2WPKH outputs to Alice because he has no way of knowing whether Alice's P2PKH address represents a compressed or uncompressed public key. The existing P2PKH address format is generally unsafe to use with SegWit since P2PKH addresses may be derived from uncompressed public keys. According to BIP143, transactions that break the rule of using only compressed public keys in P2WPKH and P2WSH will not be relayed or mined by default. Users must not use uncompressed keys in version 0 witness programs to avoid potential future funds loss.


Updated on: 2023-05-20T03:29:03.682359+00:00