<p>Take the private key. It's probably expressed in base-58 encoding, so you just have to translate the number into base-16. The prefix is there in hexadecimal form.</p>

<p>To convert a base58 number to hex, check <a href="https://bitcointalk.org/index.php?topic=29140.msg370477#msg370477" rel="nofollow">etotheipi's code</a>. Based on it:</p>

<pre><code>b58_digits = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'

def base58_to_hex(b58str):
  n = 0
  for s in b58str:
    n *= 58
    digit = b58_digits.index(s)
    n += digit
  return hex(n)
</code></pre>

CC BY-SA 3.0
2014-01-10T16:01:50.353Z
2014-01-10T16:07:01.447Z
2014-01-10T16:07:01.447Z
kaoD
<p>I want to create a paperwallet for an altcoin (<a href="http://protoshares.net/" rel="nofollow">Protoshares</a>).</p>

<p>I know the public key version byte is <code>0x38</code> (56) and the addresses start with <code>P...</code></p>

<p>But how do I find out the ECDSA private key prefix? For bitcoin it's <code>0x80</code>, for litecoin it's <code>0xb0</code>.</p>

<p>The Protoshares private keys start with <code>7...</code> if that helps. Any idea where to look at?</p>

<private-key><ecdsa>
How to find out the ECDSA private key perfix version for Altcoins?
q9f
# How to find out the ECDSA private key perfix version for Altcoins?

(Asked by: username_0 on 2014-01-10)

I want to create a paperwallet for an altcoin ([Protoshares](http://protoshares.net/)).

I know the public key version byte is `0x38` (56) and the addresses start with `P...`

But how do I find out the ECDSA private key prefix? For bitcoin it's `0x80`, for litecoin it's `0xb0`.

The Protoshares private keys start with `7...` if that helps. Any idea where to look at?

**Tags:** private-key, ecdsa


---

## 1 answers

### Answer by username_1 on 2014-01-10. Score: 2 | Accepted answer

Take the private key. It's probably expressed in base-58 encoding, so you just have to translate the number into base-16. The prefix is there in hexadecimal form.

To convert a base58 number to hex, check [etotheipi's code](https://bitcointalk.org/index.php?topic=29140.msg370477#msg370477). Based on it:

```
b58_digits = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'

def base58_to_hex(b58str):
  n = 0
  for s in b58str:
    n *= 58
    digit = b58_digits.index(s)
    n += digit
  return hex(n)

```


---

