<p>Addresses are textually encoded <strong>public key hashes</strong>, which means that somebody in possession of only the address cannot read the public key - but eventually the public key must be revealed in order to spend the funds which are locked by an address - so it may become a privacy concern if addresses are reused, which is discouraged anyway.</p>

<p>With a HD wallet, we have what are known as <em>extended public keys</em>, which, as well as a regular secp256k1 public key, also contain a chaining code and an index, and a fingerprint of the parent key. They usually begin with <code>xpub</code>. These should never be publicly shared as it is not necessary for anybody to know more than the secp256k1 public key in order to verify information from the blockchain. The purpose of the extended key is to allow you to create more child keys from a given key pair.</p>

<p>In the case of non-hardeded extended public keys, it is possible for anybody with the xpub to create the extended child public keys, which could reveal a lot more information linking your transaction activity. These kind of keys are useful for auditing purposes as you do not need to reveal private keys, but should not be shared otherwise.</p>

<p>Also note that, even if you never share extended public keys and you never reuse addresses, this does not give any guarantee of privacy. It may still be possible to link your transactions if multiple inputs are used, or if you transact with KYC services which relate them to other identity documents. You should never assume that any KYC service is not sharing that information with other parties, or that they won't at some point be hacked and have all of the data dumped on the web.</p>

<p>In regards to the way addresses are created from public keys, this is nicely illustrated by the diagram below, taken from the <a href="https://en.bitcoin.it/wiki/Address" rel="noreferrer">bitcoin wiki</a><a href="https://i.sstatic.net/BUzX3.jpg" rel="noreferrer"><img src="https://i.sstatic.net/BUzX3.jpg" alt="enter image description here"></a></p>

CC BY-SA 4.0
2020-02-21T09:29:19.753Z
2020-02-21T09:29:19.753Z
Mark H
<p>I am trying to understand relationship between your Public Key and bitcoin address. After reading few blogs my understanding was that after generating your Master Key pair, in HD wallet. One should not share any part of it (neither public nor private) but create child keys and use those child key pair to create address but later when reading on Atmoic Wallet came across following </p>

<p></p>

<p>Now confused: is it must to share Public Key. Isnt it privacy risk. I thought one will create unique addresses for each transaction and avoid any privacy leaks.</p>

<p>ps. noob in BlockChain and Bitcoin</p>

<bitcoin-core><security><private-key><wallet-security>
Relationship of Bitcoin address and Public Key
freewill008
# Relationship of Bitcoin address and Public Key

(Asked by: username_0 on 2020-02-21)

I am trying to understand relationship between your Public Key and bitcoin address. After reading few blogs my understanding was that after generating your Master Key pair, in HD wallet. One should not share any part of it (neither public nor private) but create child keys and use those child key pair to create address but later when reading on Atmoic Wallet came across following

Now confused: is it must to share Public Key. Isnt it privacy risk. I thought one will create unique addresses for each transaction and avoid any privacy leaks.

ps. noob in BlockChain and Bitcoin

**Tags:** bitcoin-core, security, private-key, wallet-security


---

## 1 answers

### Answer by username_1 on 2020-02-21. Score: 5

Addresses are textually encoded **public key hashes**, which means that somebody in possession of only the address cannot read the public key - but eventually the public key must be revealed in order to spend the funds which are locked by an address - so it may become a privacy concern if addresses are reused, which is discouraged anyway.

With a HD wallet, we have what are known as *extended public keys*, which, as well as a regular secp256k1 public key, also contain a chaining code and an index, and a fingerprint of the parent key. They usually begin with `xpub`. These should never be publicly shared as it is not necessary for anybody to know more than the secp256k1 public key in order to verify information from the blockchain. The purpose of the extended key is to allow you to create more child keys from a given key pair.

In the case of non-hardeded extended public keys, it is possible for anybody with the xpub to create the extended child public keys, which could reveal a lot more information linking your transaction activity. These kind of keys are useful for auditing purposes as you do not need to reveal private keys, but should not be shared otherwise.

Also note that, even if you never share extended public keys and you never reuse addresses, this does not give any guarantee of privacy. It may still be possible to link your transactions if multiple inputs are used, or if you transact with KYC services which relate them to other identity documents. You should never assume that any KYC service is not sharing that information with other parties, or that they won't at some point be hacked and have all of the data dumped on the web.

In regards to the way addresses are created from public keys, this is nicely illustrated by the diagram below, taken from the [bitcoin wiki](https://en.bitcoin.it/wiki/Address)[![enter image description here](https://i.sstatic.net/BUzX3.jpg)](https://i.sstatic.net/BUzX3.jpg)


---

