<blockquote>
<p><strong>How it really works?</strong></p>
</blockquote>
<p>I think the easiest way forward is to cling firmly to the truth that addresses are a fiction. They are an occasionally convenient way to refer to a locking script. Too much focus on addresses will lead you away from the underlying truth.</p>
<p>If you think about locking scripts instead of addresses, I would expect things to become clearer.</p>
<p>From one pair of private-key and public-key, there are various ways of using the public key to construct different types of locking script that can be unlocked using the private key. There are several different standard locking scripts in which a public key is used.</p>
<p>An owner of a key-pair can separately track transactions that contain specific but distinct types of locking scripts involving the same underlying keys.</p>
<p>I believe blockchain explorers mostly index by abstract of locking script - so they produce separate lists of transactions for each unique locking script.</p>
<blockquote>
<p><strong>the transaction lists from all [the different address types] are different. How can it be, if the private key is the same?</strong></p>
</blockquote>
<p>The truth is that transactions don't pay to a specific private key, they pay to anyone who can unlock a locking script. Sometimes that unlocking might involve no private keys, sometimes that might involve several private keys.</p>
<p>Additionally, some types of locking script disclose a public key but some dont. So an explorer doesn't know if some types of transactio-output involve the same key pair. So the explorer can't reliably group transaction-outputs by common private key.</p>

CC BY-SA 4.0
2023-07-09T09:26:24.683Z
2023-07-09T09:48:26.853Z
2023-07-09T09:48:26.853Z
RedGrittyBrick
<p>As far as I understand, if we have one private key, we're able to create 4+ matching addresses. I'll use famous int(1) as a private key for example here. Then we can create:</p>
<ul>
<li>P2PKH from the compressed key: 1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH</li>
<li>P2PKH from the UNcompressed key:  1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm</li>
<li>Bech32 from the compressed key: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4</li>
<li>P2SH: 3JvL6Ymt8MVWiCNHC7oWU6nLeHNJKLZGLN</li>
</ul>
<p>When I check transactions of those addresses e.g. at <a href="https://www.blockchain.com/explorer/" rel="nofollow noreferrer">https://www.blockchain.com/explorer/</a>, looks like the transaction lists from all of them are different.</p>
<p>How can it be, if the private key is the same?</p>
<p>There's one guess I have, maybe stupid: when the owner obtains btc (either by mining or regular transaction), they arrive to one of those addresses. And despite the private key being the same, btc cannot be spent from other addresses. If it's correct, then we have three+ almost independent accounts that are managed by the same private key.</p>
<p>How it really works?</p>

<private-key><public-key>
How three addresses from the same (un)compressed key works?
Putnik
# How three addresses from the same (un)compressed key works?

(Asked by: username_0 on 2023-07-09)

As far as I understand, if we have one private key, we're able to create 4+ matching addresses. I'll use famous int(1) as a private key for example here. Then we can create:

* P2PKH from the compressed key: 1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH
* P2PKH from the UNcompressed key: 1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm
* Bech32 from the compressed key: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4
* P2SH: 3JvL6Ymt8MVWiCNHC7oWU6nLeHNJKLZGLN

When I check transactions of those addresses e.g. at <https://www.blockchain.com/explorer/>, looks like the transaction lists from all of them are different.

How can it be, if the private key is the same?

There's one guess I have, maybe stupid: when the owner obtains btc (either by mining or regular transaction), they arrive to one of those addresses. And despite the private key being the same, btc cannot be spent from other addresses. If it's correct, then we have three+ almost independent accounts that are managed by the same private key.

How it really works?

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


---

## 1 answers

### Answer by username_1 on 2023-07-09. Score: 1

> **How it really works?**

I think the easiest way forward is to cling firmly to the truth that addresses are a fiction. They are an occasionally convenient way to refer to a locking script. Too much focus on addresses will lead you away from the underlying truth.

If you think about locking scripts instead of addresses, I would expect things to become clearer.

From one pair of private-key and public-key, there are various ways of using the public key to construct different types of locking script that can be unlocked using the private key. There are several different standard locking scripts in which a public key is used.

An owner of a key-pair can separately track transactions that contain specific but distinct types of locking scripts involving the same underlying keys.

I believe blockchain explorers mostly index by abstract of locking script - so they produce separate lists of transactions for each unique locking script.

> **the transaction lists from all [the different address types] are different. How can it be, if the private key is the same?**

The truth is that transactions don't pay to a specific private key, they pay to anyone who can unlock a locking script. Sometimes that unlocking might involve no private keys, sometimes that might involve several private keys.

Additionally, some types of locking script disclose a public key but some dont. So an explorer doesn't know if some types of transactio-output involve the same key pair. So the explorer can't reliably group transaction-outputs by common private key.


---

