<p>The reason is historical.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>So the short answer is: it does not matter at all.</p>

CC BY-SA 3.0
2015-09-06T15:42:11.267Z
2015-09-06T15:51:40.993Z
2015-09-06T15:51:40.993Z
Pieter Wuille
<p>After reviewing the <a href="https://en.bitcoin.it/wiki/List_of_address_prefixes" rel="nofollow">address prefixes page</a> 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.</p>

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

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

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

<p>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 <a href="http://unobtanium.uno/" rel="nofollow">Unobtanium Coin</a> whose public key header is <a href="https://github.com/unobtanium-official/Unobtanium/blob/master/src/chainparams.cpp#L171" rel="nofollow">130</a> while the secret key is <a href="https://github.com/unobtanium-official/Unobtanium/blob/master/src/chainparams.cpp#L173" rel="nofollow">224</a> (94 difference).</p>

<p>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?</p>

<address><private-key><public-key><base58>
Secret Key value for decimal versions over 127
rdadkins
# Secret Key value for decimal versions over 127

(Asked by: username_0 on 2015-09-06)

After reviewing the [address prefixes page](https://en.bitcoin.it/wiki/List_of_address_prefixes) 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](http://unobtanium.uno/) whose public key header is [130](https://github.com/unobtanium-official/Unobtanium/blob/master/src/chainparams.cpp#L171) while the secret key is [224](https://github.com/unobtanium-official/Unobtanium/blob/master/src/chainparams.cpp#L173) (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?

**Tags:** address, private-key, public-key, base58


---

## 1 answers

### Answer by username_1 on 2015-09-06. Score: 2 | Accepted answer

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.


---

