<p>Dogecoin uses the same public key cryptography ECC with curve secp256k1, so public key generation is the same. </p>

<blockquote>
  <p>When I enter a Doge private key to the input the output is still a
  Bitcoin public key (Starts with 1 for example instead of D).</p>
</blockquote>

<p>You are confusing addresses with public keys. The 1 or the D is just a prefix to an address, depending on the type of address, see <a href="https://en.bitcoin.it/wiki/List_of_address_prefixes" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/List_of_address_prefixes</a></p>

<p>After you generate the public key, you have to do the following in order to get an address:</p>

<p><code>BASE58CHECK(&lt;address-prefix&gt; HASH160(&lt;pubKey&gt;))</code></p>

<p>Dogecoin uses different prefixes for the different types of addresses, see <a href="https://github.com/dogecoin/dogecoin/blob/master/src/chainparams.cpp" rel="nofollow noreferrer">https://github.com/dogecoin/dogecoin/blob/master/src/chainparams.cpp</a> (note these are for mainnet only):</p>

<pre><code>base58Prefixes[PUBKEY_ADDRESS] = std::vector&lt;unsigned char&gt;(1,30);  // 0x1e
base58Prefixes[SCRIPT_ADDRESS] = std::vector&lt;unsigned char&gt;(1,22);  // 0x16
base58Prefixes[SECRET_KEY] = std::vector&lt;unsigned char&gt;(1,158); // 0x9e
</code></pre>

<p>Changing the address prefixes should yield compatible addresses.</p>

CC BY-SA 4.0
2018-08-23T13:49:50.743Z
2018-08-23T13:49:50.743Z
JBaczuk
<p>I am looking for the differences between the creation of Doge public keys and Bitcoin public keys when inserting a private key.</p>

<p>I am trying to make a small web-app that signs messages. There are a tons of them with bitcoin. They receive a private key and creates the public key from there. When I enter a Doge private key to the input the output is still a Bitcoin public key (Starts with 1 for example instead of D).</p>

<private-key><public-key><signature><dogecoin><message-signing>
How does a Doge public key is created from a private key?
Rando
# How does a Doge public key is created from a private key?

(Asked by: username_0 on 2018-08-23)

I am looking for the differences between the creation of Doge public keys and Bitcoin public keys when inserting a private key.

I am trying to make a small web-app that signs messages. There are a tons of them with bitcoin. They receive a private key and creates the public key from there. When I enter a Doge private key to the input the output is still a Bitcoin public key (Starts with 1 for example instead of D).

**Tags:** private-key, public-key, signature, dogecoin, message-signing


---

## 1 answers

### Answer by username_1 on 2018-08-23. Score: 2

Dogecoin uses the same public key cryptography ECC with curve secp256k1, so public key generation is the same.

> When I enter a Doge private key to the input the output is still a
> Bitcoin public key (Starts with 1 for example instead of D).

You are confusing addresses with public keys. The 1 or the D is just a prefix to an address, depending on the type of address, see <https://en.bitcoin.it/wiki/List_of_address_prefixes>

After you generate the public key, you have to do the following in order to get an address:

`BASE58CHECK(<address-prefix> HASH160(<pubKey>))`

Dogecoin uses different prefixes for the different types of addresses, see <https://github.com/dogecoin/dogecoin/blob/master/src/chainparams.cpp> (note these are for mainnet only):

```
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,30);  // 0x1e
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,22);  // 0x16
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,158); // 0x9e

```

Changing the address prefixes should yield compatible addresses.


---

