After reviewing the address prefixes page on the wiki, I have noticed that in Bitcoin and other altcoins that the secret key / dumped private key header is always the decimal version + 128. So with a decimal version of 0 you will get a regular Bitcoin address starting with 1, while adding 128 to that you can find the private key which starts with 5 / L / K depending on the compression state.

Further example would be Litecoin's decimal version which is 48 while the secret key version is 48 + 128 (176).

So the question is: what about decimal versions between 128 and 255? I can see this going one of two ways.

  • Instead of adding 128, you subtract 128. So for decimal version 128 you will end up with a secret key of 0.
  • You round up to 255 in all cases of 128 and over.

I looked through the wiki and I couldn't find a reason as to why the secret key header is 128 greater than the public key header. One example that contradicts my two points above would be Unobtanium Coin whose public key header is 130 while the secret key is 224 (94 difference).

Is there any point at all for the secret key and public key headers being so far apart? Or is it fine to just have the headers be different in the first place, not necessarily 128 apart?

1 Answer 1


The reason is historical.

The 'version' byte was originally really just a version number. Satoshi probably intended to introduce more types of standard scripts to addresses. There were comments in the code about upgrading an address from one version to a new one even.

In that vision, to not restrict the options for future versions, I chose to make the private key just set the highest bit, leaving still 127 possible future versions.

Only one new version was ever introduced (P2SH), and since it is so powerful (it can encode any script indirectly), no other versions ever appeared.

So the short answer is: it does not matter at all.

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.