<p>No, you are not missing anything. Yes using P2PKH obfuscates the public key, and yes the public key will be revealed when the UTXO is spent (the public key is needed to check the signature). Hence, the obfuscation of the public key only exists until the UTXO is spent and not after. <strong>This is why it is recommended not to use the same address twice</strong>. If you partially spend a UTXO, the 'change amount' should be sent to a new address, so the public key of the new UTXO is still obfuscated. </p>

CC BY-SA 3.0
2017-03-09T11:06:17.907Z
Ok, thanks for bringing back my trust in my learning abilities :)
Alexander Arendar
CC BY-SA 3.0
2017-03-09T10:59:32.393Z
2017-03-09T10:59:32.393Z
Sven Williamson
<p>I am learning about blockchain and reading a lot of stuff, but one question bothers me for last few days.
So in docs they say that P2PKH transactions use hash of the public key instead of a public key and they persistently put a following reason behind this: usage of hash of a public key obfuscates the real public key which may provide some additional security.</p>

<p>Ok, hash really obfuscates. So in the pubkey script of the transaction output I will use the hash of the pk and in that way will not expose to the P2P network the real pk of the transaction recipient. But at the same time, when transaction recipient wants to spend it he will need to provide matching signature script and there he needs to insert full unhashed public key, which will then be broadcasted to P2P network in his next transaction.</p>

<p>So why the hack they repeat saying in different lectures that using hash of the pk obfuscates and hides the real full pk, while at the same time everyone will see and have full pk when spender submits his next transaction?
Do I miss something important here?</p>

<p2pkh>
Inconsistency in pubkey hashes usage explanation
Alexander Arendar
# Inconsistency in pubkey hashes usage explanation

(Asked by: username_0 on 2017-03-09)

I am learning about blockchain and reading a lot of stuff, but one question bothers me for last few days.
So in docs they say that P2PKH transactions use hash of the public key instead of a public key and they persistently put a following reason behind this: usage of hash of a public key obfuscates the real public key which may provide some additional security.

Ok, hash really obfuscates. So in the pubkey script of the transaction output I will use the hash of the pk and in that way will not expose to the P2P network the real pk of the transaction recipient. But at the same time, when transaction recipient wants to spend it he will need to provide matching signature script and there he needs to insert full unhashed public key, which will then be broadcasted to P2P network in his next transaction.

So why the hack they repeat saying in different lectures that using hash of the pk obfuscates and hides the real full pk, while at the same time everyone will see and have full pk when spender submits his next transaction?
Do I miss something important here?

**Tags:** p2pkh


---

## 1 answers

### Answer by username_1 on 2017-03-09. Score: 2 | Accepted answer

No, you are not missing anything. Yes using P2PKH obfuscates the public key, and yes the public key will be revealed when the UTXO is spent (the public key is needed to check the signature). Hence, the obfuscation of the public key only exists until the UTXO is spent and not after. **This is why it is recommended not to use the same address twice**. If you partially spend a UTXO, the 'change amount' should be sent to a new address, so the public key of the new UTXO is still obfuscated.

> **Comments:**
> **username_0**: Ok, thanks for bringing back my trust in my learning abilities :)  

---

