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.

1 Answer 1


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 Pieter Wuille.

  • 7
    Nope. It was arbitrarily chosen by me. Commented Apr 10, 2018 at 17:42

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.