<p>0x80 is the version number for private keys. It allows a decoder to know what to do with the data it received and to check that you have entered the correct thing. Like many magic numbers in Bitcoin, it was arbitrarily chosen by <strike>Satoshi</strike> Pieter Wuille.</p>

CC BY-SA 3.0
2018-04-10T17:42:11.277Z
Nope. It was arbitrarily chosen by me.
Pieter Wuille
CC BY-SA 3.0
2018-04-10T16:01:12.930Z
2018-04-10T17:54:59.670Z
2018-04-10T17:54:59.670Z
Ava Chow
<p>I forked a coin and found that whatever I put in pubKeyHash prefix, I need to add 0x80 to it, to calculate wif prefix and hence generate an address keypair, i.e address and private key corresponding to that address. If I add anything apart from 0x80, to calculate wif prefix,the private key generated doesn't correspond to that address.
Would anyone tell me the reason for the same.</p>

<bitcoin-core><blockchain><blockchain-fork>
Why is wif prefix 0x80 more than pubKeyHash prefix
troy_achilies
# Why is wif prefix 0x80 more than pubKeyHash prefix

(Asked by: username_0 on 2018-04-10)

I forked a coin and found that whatever I put in pubKeyHash prefix, I need to add 0x80 to it, to calculate wif prefix and hence generate an address keypair, i.e address and private key corresponding to that address. If I add anything apart from 0x80, to calculate wif prefix,the private key generated doesn't correspond to that address.
Would anyone tell me the reason for the same.

**Tags:** bitcoin-core, blockchain, blockchain-fork


---

## 1 answers

### Answer by username_1 on 2018-04-10. Score: 3

0x80 is the version number for private keys. It allows a decoder to know what to do with the data it received and to check that you have entered the correct thing. Like many magic numbers in Bitcoin, it was arbitrarily chosen by Satoshi username_2.

> **Comments:**
> **username_2**: Nope. It was arbitrarily chosen by me.  

---

