<p>Yes, a transaction includes the public key. So, only when you spend the coins from an address a public key actually becomes public (unless you have shared it with anyone otherwise).</p>

<p>So, as long as you don't reuse addresses, the public key is only known after a transaction, which usually is just a few confirmations away from the address' balance to be 0.</p>

CC BY-SA 3.0
2015-10-06T11:40:12.503Z
2015-10-09T12:20:52.467Z
2015-10-09T12:20:52.467Z
Jannes
<blockquote>
  <p>Is the public key included in the transaction I am sending ?</p>
</blockquote>

<p>Yes it is, as part of the signature process, or more precisely, of the sigscript - have a look here: 
<a href="https://bitcoin.stackexchange.com/questions/32305/how-does-the-ecdsa-verification-algorithm-work-during-transaction/32308#32308">How does the ECDSA verification algorithm work during transaction?</a></p>

CC BY-SA 3.0
2016-07-09T20:15:51.313Z
2016-07-11T12:27:47.993Z
2017-04-13T12:47:32.940Z
pebwindkraft
<p>Some simplified explanations of Bitcoin say, that the Bitcoin address is the public key, and anybody can easily verify that a signed transaction is valid since it was signed with corresponding private key.</p>

<p>But in reality, the address is the hash of another hash of the public key.</p>

<p>So, it's not possible to derive the public key from the address alone.</p>

<p>How do miners obtain my public key, then?
Is the public key included in the transaction I am sending ?</p>

CC BY-SA 3.0
2015-10-06T08:15:11.303Z
Possible duplicate: http://bitcoin.stackexchange.com/questions/20718/how-to-export-public-key-for-an-address-in-bitcoin-qt
Nick ODell
CC BY-SA 3.0
2015-10-06T08:25:46.247Z
@Nick ODell - the linked question explains how the owner can get public key from the private key. But it does not explain how the miners get public key corresponding to my address. Therefore, I believe my question is not a duplicate.
Martin Vegter
<transactions><address><public-key><message-signing>
Where is the public key corresponding to my address stored?
Martin Vegter
# Where is the public key corresponding to my address stored?

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

Some simplified explanations of Bitcoin say, that the Bitcoin address is the public key, and anybody can easily verify that a signed transaction is valid since it was signed with corresponding private key.

But in reality, the address is the hash of another hash of the public key.

So, it's not possible to derive the public key from the address alone.

How do miners obtain my public key, then?
Is the public key included in the transaction I am sending ?

**Tags:** transactions, address, public-key, message-signing

> **Comments:**
> **username_1**: Possible duplicate: http://bitcoin.stackexchange.com/questions/20718/how-to-export-public-key-for-an-address-in-bitcoin-qt  
> **username_0**: @username_1 - the linked question explains how the owner can get public key from the private key. But it does not explain how the miners get public key corresponding to my address. Therefore, I believe my question is not a duplicate.  

---

## 2 answers

### Answer by username_2 on 2015-10-06. Score: 4

Yes, a transaction includes the public key. So, only when you spend the coins from an address a public key actually becomes public (unless you have shared it with anyone otherwise).

So, as long as you don't reuse addresses, the public key is only known after a transaction, which usually is just a few confirmations away from the address' balance to be 0.


---

### Answer by username_3 on 2016-07-09. Score: 1

> Is the public key included in the transaction I am sending ?

Yes it is, as part of the signature process, or more precisely, of the sigscript - have a look here:
[How does the ECDSA verification algorithm work during transaction?](https://bitcoin.stackexchange.com/questions/32305/how-does-the-ecdsa-verification-algorithm-work-during-transaction/32308#32308)


---

