<p>As far as Bitcoin's consensus rules are concerned, compressed and uncompressed keys for the same private key, are distinct keys.</p>
<p>The answer to your question is: whatever the receiver's wallet uses. As the receiver is also the one who creates the address generally, the sender does not need to know or care about this. New software should generally only use compressed keys, as they are cheaper at spending time.</p>
<p>In P2PKH both can be used. In P2WPKH only compressed keys are allowed by policy. P2TR uses a different (x-only) type of key altogether.</p>

CC BY-SA 4.0
2024-05-03T17:41:12.283Z
2024-05-03T17:45:10.837Z
2024-05-03T17:45:10.837Z
Pieter Wuille
<p>Simple question but I didn’t find a reference. Is it the compressed public key that is used or the uncompressed public key ? Or can it be both ?</p>

<public-key><p2pkh>
Does a P2PKH transaction send to the hash of the uncompressed key or the compressed key?
user2284570
# Does a P2PKH transaction send to the hash of the uncompressed key or the compressed key?

(Asked by: username_0 on 2024-05-03)

Simple question but I didn’t find a reference. Is it the compressed public key that is used or the uncompressed public key ? Or can it be both ?

**Tags:** public-key, p2pkh


---

## 1 answers

### Answer by username_1 on 2024-05-03. Score: 6 | Accepted answer

As far as Bitcoin's consensus rules are concerned, compressed and uncompressed keys for the same private key, are distinct keys.

The answer to your question is: whatever the receiver's wallet uses. As the receiver is also the one who creates the address generally, the sender does not need to know or care about this. New software should generally only use compressed keys, as they are cheaper at spending time.

In P2PKH both can be used. In P2WPKH only compressed keys are allowed by policy. P2TR uses a different (x-only) type of key altogether.


---

