<p>Concerning the output of <code>dumpwallet</code>, this is the best answer:</p>
<p><a href="https://bitcoin.stackexchange.com/questions/101767/dumpwallet-output-documentation-explanation">dumpwallet output documentation &amp; explanation?</a></p>
<p>About your questions:</p>
<blockquote>
<p>Why does a private key address correspond to two payment addresses?</p>
</blockquote>
<p>Addresses are instructions from your wallet to the paying wallet.</p>
<p>These instructions are divided in 2 parts: a prefix and some string.</p>
<p>If the prefix is:</p>
<ul>
<li>&quot;1&quot; this means your wallet wants the receiving coins to be locked in a <em><strong>P2PKH</strong></em> script (Pay To Public Key Hash), and the hash of <em><strong>your public key</strong></em> is the string part of the address;</li>
<li>&quot;3&quot; this means your wallet wants the receiving coins to be locked in a <em><strong>P2SH</strong></em> script (Pay To Script Hash), and the hash of <em><strong>the script</strong></em> is the string part of the address;</li>
<li>&quot;bc1q&quot; this means your wallet wants the receiving coins to be locked in a <em><strong>Segwit</strong></em> script, and the hash of <em><strong>the script</strong></em> is the string part of the address;</li>
<li>&quot;bc1p&quot; this means your wallet wants the receiving coins to be locked in a <em><strong>Taproot</strong></em> script, and the hash of <em><strong>the script</strong></em> is the string part of the address.</li>
</ul>
<p>So, the same exact private key can originate 4 different addresses.</p>
<blockquote>
<p>In the 1.txt file, the receiving address beginning with 3 is followed by 00...... This code should not be a private key. What is it?</p>
</blockquote>
<p>It's the P2SH address for that private key.</p>

CC BY-SA 4.0
2024-06-24T16:26:16.613Z
Taproot scripts contain a tweaked public key, not a hash (though the tweak used is derived from the hash of the (set of) scripts in its script tree).
Pieter Wuille
CC BY-SA 4.0
2024-06-24T17:12:52.953Z
Also `bc1q` addresses come in two flavors: P2WPKH (which contain a pubkey hash like P2PKH) and P2WSH (which contain a script hash like P2SH).
Pieter Wuille
CC BY-SA 4.0
2024-06-24T17:52:47.870Z
Thanks @PieterWuille
bordalix
CC BY-SA 4.0
2024-06-24T15:25:07.350Z
2024-06-24T15:25:07.350Z
bordalix
<p>A private key &quot;X&quot; can generate multiple address types (legacy and SegWit). So, it’s normal to see it corresponding to both a legacy address (starting with 3) and a SegWit address (starting with bc1).</p>
<p>The address starting with 3 followed by 00 in 1.txt is a P2SH (Pay-to-Script-Hash) address. This isn’t a private key but another type of receiving address format used in Bitcoin transactions.</p>
<p>Hope that clears things up! </p>
<p>Cheers,</p>

CC BY-SA 4.0
2024-06-25T08:21:08.657Z
2024-06-25T08:21:08.657Z
CoinChampion24
<p>I use the wallet to generate a receiving address <code>A</code> starting with 3 and temporarily name it &quot;A&quot;. I export the private key and temporarily name it &quot;X&quot;.</p>
<p>I run the command <code>dumpwallet /Users/my/Desktop/1.txt</code>, then open <code>1.txt</code>. In <code>1.txt</code>, I find a receiving address starting with <code>bc1</code> corresponding to the private key &quot;X&quot;.</p>
<ol>
<li>Why does a private key address correspond to two payment addresses?</li>
<li>In the <code>1.txt</code> file, the receiving address beginning with 3 is followed by 00...... This code should not be a private key. What is it?</li>
</ol>

<bitcoin-core><address><private-key-export>
Why are there multiple payment addresses associated with a private key?
Bitman
# Why are there multiple payment addresses associated with a private key?

(Asked by: username_0 on 2024-06-24)

I use the wallet to generate a receiving address `A` starting with 3 and temporarily name it "A". I export the private key and temporarily name it "X".

I run the command `dumpwallet /Users/my/Desktop/1.txt`, then open `1.txt`. In `1.txt`, I find a receiving address starting with `bc1` corresponding to the private key "X".

1. Why does a private key address correspond to two payment addresses?
2. In the `1.txt` file, the receiving address beginning with 3 is followed by 00...... This code should not be a private key. What is it?

**Tags:** bitcoin-core, address, private-key-export


---

## 2 answers

### Answer by username_1 on 2024-06-24. Score: 1

Concerning the output of `dumpwallet`, this is the best answer:

[dumpwallet output documentation & explanation?](https://bitcoin.stackexchange.com/questions/101767/dumpwallet-output-documentation-explanation)

About your questions:

> Why does a private key address correspond to two payment addresses?

Addresses are instructions from your wallet to the paying wallet.

These instructions are divided in 2 parts: a prefix and some string.

If the prefix is:

* "1" this means your wallet wants the receiving coins to be locked in a ***P2PKH*** script (Pay To Public Key Hash), and the hash of ***your public key*** is the string part of the address;
* "3" this means your wallet wants the receiving coins to be locked in a ***P2SH*** script (Pay To Script Hash), and the hash of ***the script*** is the string part of the address;
* "bc1q" this means your wallet wants the receiving coins to be locked in a ***Segwit*** script, and the hash of ***the script*** is the string part of the address;
* "bc1p" this means your wallet wants the receiving coins to be locked in a ***Taproot*** script, and the hash of ***the script*** is the string part of the address.

So, the same exact private key can originate 4 different addresses.

> In the 1.txt file, the receiving address beginning with 3 is followed by 00...... This code should not be a private key. What is it?

It's the P2SH address for that private key.

> **Comments:**
> **username_2**: Taproot scripts contain a tweaked public key, not a hash (though the tweak used is derived from the hash of the (set of) scripts in its script tree).  
> **username_2**: Also `bc1q` addresses come in two flavors: P2WPKH (which contain a pubkey hash like P2PKH) and P2WSH (which contain a script hash like P2SH).  
> **username_1**: Thanks @PieterWuille  

---

### Answer by username_3 on 2024-06-25. Score: 0

A private key "X" can generate multiple address types (legacy and SegWit). So, it’s normal to see it corresponding to both a legacy address (starting with 3) and a SegWit address (starting with bc1).

The address starting with 3 followed by 00 in 1.txt is a P2SH (Pay-to-Script-Hash) address. This isn’t a private key but another type of receiving address format used in Bitcoin transactions.

Hope that clears things up!

Cheers,


---

